How to quote spaces in reject message?

Asked by Bjoern Voigt

The configuration file for spamass-milter is /etc/default/spamass-milter.

I want to change the reject message with "-R RejectText: using this Reject Text."

But most reject messages contain spaces. I tried different formats like

1. OPTIONS="-R 'Mail looks like SPAM'"
2. OPTIONS="-R \"Mail looks like SPAM\""
3. OPTIONS="-R Mail\ looks\ like\ SPAM"

but none of them correctly applies the options for spamass-milter. "ps" shows the problem, see "ps" output

1. /usr/sbin/spamass-milter -P /var/run/spamass/spamass.pid -f -p /var/run/spamass/spamass.sock -u spamass-milter -R 'Mail looks like SPAM'
2. /usr/sbin/spamass-milter -P /var/run/spamass/spamass.pid -f -p /var/run/spamass/spamass.sock -u spamass-milter -R "Mail looks like SPAM"
3. /usr/sbin/spamass-milter -P /var/run/spamass/spamass.pid -f -p /var/run/spamass/spamass.sock -u spamass-milter -R Mail\ looks\ like\ SPAM

If I start spamass-milter manually correctly with

/usr/sbin/spamass-milter -P /var/run/spamass/spamass.pid -f -p /var/run/spamass/spamass.sock -u spamass-milter -R "Mail looks like SPAM"

this correct "ps" outlook is different from 1-3:

/usr/sbin/spamass-milter -P /var/run/spamass/spamass.pid -f -p /var/run/spamass/spamass.sock -u spamass-milter -R Mail looks like SPAM

Probably it's impossible to quote correctly and a patch is needed for /etc/init.d/spamass-milter

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu spamass-milter Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
actionparsnip (andrew-woodhead666) said :
#1

Ubuntu uses systemd, not init. This may be the issue. I also see that /etc/spamassassin/local.conf is used to configure the service. Are you setting the option there?
https://crates.io/crates/spamassassin-milter

That also gives the systemd module file name to use

Can you help with this problem?

Provide an answer of your own, or ask Bjoern Voigt for more information if necessary.

To post a message you must log in.