I search one issue for apply a postfix rule.
I would that postfix send to a server with virus scanner all mails before sending to the internet.
My customer make a AUTH connect to the postfix SMTP (port 25) after check if the customer have the right user and pass, the SMTP server would send the mail to another server (mail-filter).
I've play with the "smtpd_sender_restrictions" variable and the value "check_client_access cidr:/etc/postfix/antivirus_sortant".
Into the file I've put "0.0.0.0/0 FILTER smtp:[IP.SERVEUR.FILTRAGE]:10024".
The rule work find, all mails are sending to the Filter server, but the problem ... All incoming mail from the network are filter ...
I would just check the mail sending with SMTP login & pass from my customer.
Not the mail receive for example by another smtp server :)
How I can filter only mail coming from a customer ?