Emails not received when attempting per-user spamassassin command when sending to multiple recipients on a server

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Emails not received when attempting per-user spamassassin command when sending to multiple recipients on a server

Steve Dondley-2
Sending to [hidden email] works with these SA settings in master.cf:

smtp     inet  n     -     y     -     -        smtpd
      -o content_filter=spamassassin
      -o receive_override_options=no_address_mappings

spamassassin unix -     n       n       -       -       pipe
      user=debian-spamd argv=/usr/bin/spamc -u ${user} -f -e
/usr/sbin/sendmail -oi -f ${sender} ${recipient}


However, sending the same email to both [hidden email] and
[hidden email] results in neither user receiving the email.

I can fix this problem by removing the -u ${user} bit from the master.cf
file (see above). Once removed, both recipients receive the email.

How can I get the best of both worlds and get per-user SA settings and
actually get email delivered? I tried removing the "-o
receive_override_options=no_address_mappings" line but that didn't help.

Thanks.

Reply | Threaded
Open this post in threaded view
|

Re: Emails not received when attempting per-user spamassassin command when sending to multiple recipients on a server

Bill Cole-3
On 5 Apr 2021, at 17:49, Steve Dondley wrote:

> Sending to [hidden email] works with these SA settings in
> master.cf:
>
> smtp     inet  n     -     y     -     -        smtpd
>      -o content_filter=spamassassin
>      -o receive_override_options=no_address_mappings
>
> spamassassin unix -     n       n       -       -       pipe
>      user=debian-spamd argv=/usr/bin/spamc -u ${user} -f -e
> /usr/sbin/sendmail -oi -f ${sender} ${recipient}
>
>
> However, sending the same email to both [hidden email] and
> [hidden email] results in neither user receiving the email.
>
> I can fix this problem by removing the -u ${user} bit from the
> master.cf file (see above). Once removed, both recipients receive the
> email.
>
> How can I get the best of both worlds and get per-user SA settings and
> actually get email delivered? I tried removing the "-o
> receive_override_options=no_address_mappings" line but that didn't
> help.

Add this to your main.cf:

spamassassin_destination_recipient_limit = 1

Refer to the SINGLE-RECIPIENT DELIVERY section of the pipe(8) man page
for why. There is also relevant discussion of this and related issues at
https://unix.stackexchange.com/questions/247433/postfix-spamassassin-incoming-mail-headers-changes.




--
Bill Cole
[hidden email] or [hidden email]
(AKA @grumpybozo and many *@billmail.scconsult.com addresses)
Not Currently Available For Hire
Reply | Threaded
Open this post in threaded view
|

Re: Emails not received when attempting per-user spamassassin command when sending to multiple recipients on a server

Matus UHLAR - fantomas
>On 5 Apr 2021, at 17:49, Steve Dondley wrote:
>>Sending to [hidden email] works with these SA settings in
>>master.cf:
>>
>>smtp     inet  n     -     y     -     -        smtpd
>>     -o content_filter=spamassassin
>>     -o receive_override_options=no_address_mappings
>>
>>spamassassin unix -     n       n       -       -       pipe
>>     user=debian-spamd argv=/usr/bin/spamc -u ${user} -f -e
>>/usr/sbin/sendmail -oi -f ${sender} ${recipient}
>>
>>
>>However, sending the same email to both [hidden email] and
>>[hidden email] results in neither user receiving the email.
>>
>>I can fix this problem by removing the -u ${user} bit from the
>>master.cf file (see above). Once removed, both recipients receive
>>the email.
>>
>>How can I get the best of both worlds and get per-user SA settings
>>and actually get email delivered? I tried removing the "-o
>>receive_override_options=no_address_mappings" line but that didn't
>>help.

On 05.04.21 18:27, Bill Cole wrote:
>Add this to your main.cf:
>
>spamassassin_destination_recipient_limit = 1
>
>Refer to the SINGLE-RECIPIENT DELIVERY section of the pipe(8) man page
>for why. There is also relevant discussion of this and related issues
>at https://unix.stackexchange.com/questions/247433/postfix-spamassassin-incoming-mail-headers-changes.

much more effective would be using something like amavis. It can handle
multiple recipients.

But since this receives mail from the world, even better would be using
milter, like spamass-milter or amavisd-milter (requires amavis).  That can
refuse spam at SMTP level.

--
Matus UHLAR - fantomas, [hidden email] ; http://www.fantomas.sk/
Warning: I wish NOT to receive e-mail advertising to this address.
Varovanie: na tuto adresu chcem NEDOSTAVAT akukolvek reklamnu postu.
WinError #99999: Out of error messages.