[email protected] a écrit :
>
>
>
> Currently running postfix with amavisd and spam assassin. I'm now
> cleverly using recipient_delimiter and amavisd so that amavisd flags
> spam as [email protected]
>
> WAY cool feature BTW, now I don't have to set filters up for each user.
> Thanks for all the help I got there.
>
> The problem appears to be that Amavisd is filtering outbound mail. all
> good (want to stop sending virus and all that), but if it filters an
> outbound message as spam, it changes the email address from
> [email protected] to [email protected]
>
> If that site isn't ALSO using recipient_delimiters, then that mail not
> surprisingly bounces. I can't determine whether I fix this with postfix
> or amavisd
>
> I'm getting close to the end. I had a working environment until I
> enabled recipient_delimiters, now I'm just working out the final kinks!
> [snip]
I didn't test this, but in principle, amavisd-new only "tags" mail if
the recipient is in a "local" domain. did you abuse @local_domains_maps
(or one of the alternative ways to declare local domains)?
Anyway, you can be selective in amavisd-new.conf:
@addr_extension_spam_maps = (
{ '.sub.example.com' => 'spam', # an entire subdomain
'.' => '' } # no extension for the rest
);
See
http://www.ijs.si/software/amavisd/amavisd-new-docs.html
Note that you can disable filtering for outbound mail. if this is what
you want:
- configure amavisd-new to listen on an additional port, say 10586 (I
use this because it is 10587 - 1, and 587 is the standard submission
port. so you get the same logic as for 25 -> 10025 -> 10024).
- define a policy bank for this port
- in this policy bank, disable spam filtering.
- configure postfix to pass "outbound" mail to this port of amavisd-new.:
*) if you use port 587 for mail submission, this is easy. just set a
content_filter for this port (in master.cf, with -o ...).
*) if you allow submission on port 25, then use smtpd restrictions. for
example:
smtpd_sender_restrictions =
check_client_access pcre:/etc/postfix/filter_outbound
permit_mynetworks
permit_sasl_authenticated
check_client_access pcre:/etc/postfix/filter_inbound
== filter_outbound:
/./ FILTER filter:[127.0.0.1]:10586
== filter_inbound
/./ FILTER filter:[127.0.0.1]:10024