You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@spamassassin.apache.org by R <a_...@radel.org> on 2017/01/06 12:07:45 UTC
Spamd per-user prefs with aliases
Hello all,
I'm running a mail server with this setup: Debian based postfix +
spamassassin (called using spamass-milter) and I have a config problem I
cannot fix by myself...
All the users are virtual users (using a sql database) and both delivery
and per-user spamassassin prefs/bayes are working just fine.
Unfortunately I have a problem with mailbox aliases. They works just
fine and the mail is correctly delivered to the main mailbox, but I
would like spamassassin to use the main mailbox user prefs and bayes....
For this reason I've tried adding the "-x" option in
/etc/default/spamass-milter, but it breaks everything, and no user
prefs/bayes works anymore.
This are some config lines from my setup, but I can provide more info if
needed.
I suppose I could switch to sql preferences for spamassassin, but I will
do this only if really needed...
Below I've changed my real domain/mailboxname with MYDOMAIN.COM and
MYEMAIL, nothing else changed.
In /etc/default/spamassassin I've set this options
OPTIONS="--create-prefs --max-children 5 --helper-home-dir -x -u vmail
--virtual-config-dir=/var/vmail/%d/%l/.spamassassin"
and in /etc/default/spamass-milter
OPTIONS="-u spamass-milter -e MYDOMAIN.COM -i 127.0.0.1"
All of this is called by postfix with
in /etc/postfix/main.cf
smtpd_milters = unix:/spamass/spamass.sock
milter_connect_macros = j {daemon_name} v {if_name} _
in /etc/postfix/master.cf
maildrop unix - n n - - pipe
flags=DRhu user=vmail argv=/usr/bin/maildrop -d ${recipient}
**********
without "-x" works just fine
OPTIONS="-u spamass-milter -e MYDOMAIN.COM -i 127.0.0.1"
Jan 6 11:27:57 mail spamd[18251]: spamd: using default config for
MYEMAIL@MYDOMAIN.COM
/var/vmail/MYDOMAIN.COM/MYMAIL/.spamassassin/user_prefs
Jan 6 11:27:57 mail spamd[18251]: spamd: processing message
<878284e3fd78d1feec2e5e79a4ec947a.Seasickness.Cellaret.MYDOMAIN.COM> for
MYEMAIL@MYDOMAIN.COM:5000
Jan 6 11:27:57 mail spamd[18251]: spamd: identified spam (22.3/5.0) for
MYEMAIL@MYDOMAIN.COM:5000 in 0.3 seconds, 6638 bytes.
**********
with "-x" nothing works
OPTIONS="-u spamass-milter -x -e mydomain.com -i 127.0.0.1"
Jan 6 11:23:39 mail spamd[18251]: spamd: using default config for
spamass-milter: /var/vmail///.spamassassin/user_prefs
Jan 6 11:23:39 mail spamd[18251]: spamd: processing message (unknown)
for spamass-milter:5000
Jan 6 11:23:39 mail spamd[18251]: spamd: clean message (3.7/5.0) for
spamass-milter:5000 in 0.3 seconds, 272 bytes.
and I've got also a "probe" mail locally delivered to
spamass-milter@MYDOMAIN.COM.
Can someone help me with this config? I'm really stuck with no ideas...
Thanks in advance,
Raffaele
Re: Spamd per-user prefs with aliases
Posted by Axb <ax...@gmail.com>.
On 01/06/2017 05:06 PM, R wrote:
> Perhaps I just need to remove/replace spamass-milter,
If you're using Postfix I can recommend Fuglu (https://fuglu.org) in pre
queue mode.
lightweight, very well documented and has been rock solid.
Axb
Re: Spamd per-user prefs with aliases
Posted by "Kevin A. McGrail" <KM...@PCCC.com>.
On 1/6/2017 11:06 AM, R wrote:
> thank you for highlighting that... I've always tried to fix this
> trying to make spamassassin "alias aware". I'll try instead to just
> pass the intended mailbox name to spamc.
>
> Excluding the spamassassin word from my online researches finally I've
> started finding people with the same issue.
>
> I know have too look through all this new infos and I'll hopefully
> find something I can use.
>
> Perhaps I just need to remove/replace spamass-milter,
Exactly right. The Alias-aware-ness comes from the glue used to call
SA. I thought spamass-milter could do that but many people use other glues.
Off-hand, amavisd-new and mimedefang. You can start a religious war if
you ask which is better and why. :-) I'm guessing amavisd-new is likely
where I would have you look next if you can't get your current solution
to work.
Regards,
KAM
Re: Spamd per-user prefs with aliases
Posted by R <a_...@radel.org>.
Hi Kevin,
thank you for highlighting that... I've always tried to fix this trying
to make spamassassin "alias aware". I'll try instead to just pass the
intended mailbox name to spamc.
Excluding the spamassassin word from my online researches finally I've
started finding people with the same issue.
I know have too look through all this new infos and I'll hopefully find
something I can use.
Perhaps I just need to remove/replace spamass-milter,
BR,
Raffaele
On 2017-01-06 14:29, Kevin A. McGrail wrote:
> On 1/6/2017 7:07 AM, R wrote:
>
>> Hello all,
>>
>> I'm running a mail server with this setup: Debian based postfix +
>> spamassassin (called using spamass-milter) and I have a config
>> problem I cannot fix by myself...
> SpamAss-milter, known as the glue, is not an Apache SpamAssassin
> product.
>
> Someone here might know or be able to help you but the concept is that
> your glue must expand all mail settings to get to the destination
> username so that SA can pull the correct user config.
>
> -x is that concept in spamass-milter to my knowledge
>
> So SA is working perfectly I would guess, just not getting passed the
> correct username. Whether the preferences are db or file stored
> likely has no bearing on the issue.
>
> I would look at what username spamass-milter and I think you can do
> some command line testing. Sorry, it's been a long time since I used
> SpamAss-milter.
>
> Regards,
> KAM
Re: Spamd per-user prefs with aliases
Posted by "Kevin A. McGrail" <KM...@PCCC.com>.
On 1/6/2017 7:07 AM, R wrote:
> Hello all,
>
> I'm running a mail server with this setup: Debian based postfix +
> spamassassin (called using spamass-milter) and I have a config problem
> I cannot fix by myself...
>
SpamAss-milter, known as the glue, is not an Apache SpamAssassin product.
Someone here might know or be able to help you but the concept is that
your glue must expand all mail settings to get to the destination
username so that SA can pull the correct user config.
-x is that concept in spamass-milter to my knowledge
So SA is working perfectly I would guess, just not getting passed the
correct username. Whether the preferences are db or file stored likely
has no bearing on the issue.
I would look at what username spamass-milter and I think you can do some
command line testing. Sorry, it's been a long time since I used
SpamAss-milter.
Regards,
KAM
Re: Spamd per-user prefs with aliases
Posted by R <a_...@radel.org>.
On 2017-01-06 16:02, Bowie Bailey wrote:
> On 1/6/2017 7:07 AM, R wrote:
>
>>
>> OPTIONS="-u spamass-milter -x -e mydomain.com -i 127.0.0.1"
>>
>> Jan 6 11:23:39 mail spamd[18251]: spamd: using default config for
>> spamass-milter: /var/vmail///.spamassassin/user_prefs
>> Jan 6 11:23:39 mail spamd[18251]: spamd: processing message
>> (unknown) for spamass-milter:5000
>> Jan 6 11:23:39 mail spamd[18251]: spamd: clean message (3.7/5.0)
>> for spamass-milter:5000 in 0.3 seconds, 272 bytes.
>>
>> and I've got also a "probe" mail locally delivered to
>> spamass-milter@MYDOMAIN.COM.
>
> I don't use spamass-milter, but I would guess that the -x option may
> require some extra configuration.
>
Unfortunately not... "-x" is a simple switch that calls "sendmail -bv".
This command has a simple input (the alias) and should provide the
mailbox name as output.
But (now I know) postfix's "sendmail -bv" behaves in a very weird way
(compared to the original sendmail implementation): it prints nothing on
the standard output and, instead, it sends an email (!) with the tests
performed.
So, IMHO, the spamass-milter + postfix configuration simply cannot work
with aliases.
Perhaps one can write a wrapper, sitting between postfix and the
spamass-milter, but you have to perform the alias expansion, or read the
emails from postfix ... Way too much!
I think I'll try calling spamc directly and/or moving to sql user
preferences.
I'll keep you posted.
BR,
Raffaele
Re: Spamd per-user prefs with aliases
Posted by RW <rw...@googlemail.com>.
On Fri, 6 Jan 2017 10:02:20 -0500
Bowie Bailey wrote:
> I don't use spamass-milter, but I would guess that the -x option may
> require some extra configuration.
>
According to the man page it uses sendmail -bv to perform the
translation. It also has a "Recipient processing" debug flag.
Re: Spamd per-user prefs with aliases
Posted by Bowie Bailey <Bo...@BUC.com>.
On 1/6/2017 7:07 AM, R wrote:
> Hello all,
>
> I'm running a mail server with this setup: Debian based postfix +
> spamassassin (called using spamass-milter) and I have a config problem
> I cannot fix by myself...
>
> All the users are virtual users (using a sql database) and both
> delivery and per-user spamassassin prefs/bayes are working just fine.
>
> Unfortunately I have a problem with mailbox aliases. They works just
> fine and the mail is correctly delivered to the main mailbox, but I
> would like spamassassin to use the main mailbox user prefs and bayes....
The simplest solution may be to make the .spamassassin folder a link to
the one in the main mailbox.
>
> with "-x" nothing works
> OPTIONS="-u spamass-milter -x -e mydomain.com -i 127.0.0.1"
>
>
> Jan 6 11:23:39 mail spamd[18251]: spamd: using default config for
> spamass-milter: /var/vmail///.spamassassin/user_prefs
> Jan 6 11:23:39 mail spamd[18251]: spamd: processing message (unknown)
> for spamass-milter:5000
> Jan 6 11:23:39 mail spamd[18251]: spamd: clean message (3.7/5.0) for
> spamass-milter:5000 in 0.3 seconds, 272 bytes.
>
> and I've got also a "probe" mail locally delivered to
> spamass-milter@*mydomain.com*.
I don't use spamass-milter, but I would guess that the -x option may
require some extra configuration.
--
Bowie