Jan P. Kessler schrieb:
Tom Diehl schrieb:
Hi,

I have a machine running postfix-2.3.2 that processes mail for about 100 virtual domains. One of my customers wants to try using one of those anti-spam services that filters mail before it gets to our box. The problem is that I know spammy will ignore the MX and try to deliver directly to our server even after I switch the MX. So my question is, how can I configure postfix to only accept mail for that one domain that only comes from the filter service and still accept mail for
the other domains from anywhere?

So far I do not seem to be able to find the relevant doc.

Regards,


You could use a restriction class, like

main.cf
--------
smtpd_restriction_classes = must_come_from_XXX
must_come_from_spammy = check_client_access cidr:/etc/postfix/XXX_addresses

Typo here! Of course it must be

smtpd_restriction_classes = must_come_from_XXX
must_come_from_XXX = check_client_access cidr:/etc/postfix/XXX_addresses


smtpd_recipient_restrictions =
   <other restrictions>
   check_recipient_access hash:/etc/postfix/XXX_domains
   <other restrictions>


/etc/postfix/XXX_domains
------------------------------
mydomain.local   must_come_from_XXX


/etc/postfix/XXX_addresses
----------------------------------
1.2.3.4   DUNNO
0.0.0.0/0   REJECT not from XXX

or use a policy daemon like postfwd with a rule like

   recipient_domain=mydomain.local; \
   client_address= !!(1.2.3.4); \
   action=REJECT

Reply via email to