On Tuesday, 25 February 2020 8:26:07 AM AEDT Don Armstrong wrote:
> Control: tag -1 moreinfo
> 
> On Mon, 24 Feb 2020, Russell Coker wrote:
> > spamc -u russ...@coker.com.au --max-size=10485760 127.0.0.1 < spam.mbox
> > 
> > The above command will correctly scan a file that's more than 500K in
> > size.
> > 
> > spamc -u russ...@coker.com.au 127.0.0.1 --max-size=10485760 < spam.mbox
> > 
> > The above command (differing only in the order of 2 parameters)
> > doesn't work, spamc logs "skipped message, greater than max message
> > size (512000 bytes)" to syslog. The man page for spamc doesn't
> > document this, it may be a bug in spamc.
> > 
> > execve("/usr/bin/spamc", ["/usr/bin/spamc", "-u", "russ...@coker.com.au",
> > "127.0.0.1", "-s", "10485760"], 0x7ffef748a960 /* 15 vars */) = 0
> > 
> > The above is from stracing spamass-milter, it does what spamc doesn't like
> > and there seems to be no way to stop it.
> 
> That's really strange; I would have expected the call to spamc to be:
> 
> /usr/bin/spamc -u rus...@cocker.com.au -d 127.0.0.1 -s 10485760
> 
> That's what the codebase does, and there's no (documented) way to
> specify the host without using -d.

OPTIONS="-u spamass-milter -e -i 127.0.0.1 -r 5 -- -s 10485760"

The above is what I had.  I just realised that -e expects a domain parameter, 
so then "-i" would be taken as a domain and 127.0.0.1 would be taken as 
something else.

/usr/sbin/spamass-milter -P /var/run/spamass/spamass.pid -f -p /var/spool/
postfix/spamass/spamass.sock -u spamass-milter -e -i 127.0.0.1 -r 5 -- -s 
10485760

The above is what was being run.

It seems that any command-line parameter that doesn't start with '-' will be 
passed as a parameter to spamc.  I don't think this is something many people 
will expect or desire.

Maybe a good option would be to log what the spamc parameters will be at 
daemon start time so the user doesn't have to strace it to find out what it's 
doing.

-- 
My Main Blog         http://etbe.coker.com.au/
My Documents Blog    http://doc.coker.com.au/

Reply via email to