Georgy Goshin a écrit :
>
>
>>
>> what do you really mean?
>>
>
> I really mean that the server is a relay for some domains and a local
> mailserver for one domain, so I need to check mails with spamassassin
> only mails that came here and not to check relayed mails.
>
so you want per recipient filtering. the problem here is when mail comes
in for multiple recipients.
1- if it's ok to filter mail if one of the recipient is local
(eventhough other recipients may belong to other domains), you can use
check_recipient_access:
content_filter =
smtpd_sender_restrictions =
check_recipient_access hash:/etc/postfix/filter
== filter:
example.com FILTER spamfilter:nexthop
2- otherwise, you need multiple postfix instance (run postfix twice) and
use transport_maps instead of content_filter.
In (1), a multi-recipient message is not split into local and relay
copies. it's passed to the filter as soon as one of the recipients is
local (is *[email protected]).
In (2), the message is split: one copy is sent to "local" users after
filtering. another copy is relayed without filtering.