Hi all, Hope you're all doing well in this unusual context.
I'm working on a postfix that routes outgoing mail only. It's been a while I try to configure postfix to restrict a specific client (by its IP@) to send from a specific sender only. I browsed forums, but never found exactly what I'm looking for. The context : we have an application that sends mail without the possibility for IT Department to force the sender in its configuration. So end users may change the default sender to whatever they want... I would like to reject, for this specific IP ONLY, all mails NOT from x...@yyy.com Please note that I already have a "check_sender_access" policy with a list of permitted "from" domains. Config looks like this, and works fine : smtpd_sender_restrictions = reject_non_fqdn_sender, check_sender_access pcre:/etc/postfix/sender_access, reject /etc/postfix/sender_access : /@mycompany\.com/ OK /@altdomain1\.com/ OK /@altdomainX\.com/ OK (had to use pcre and regex to be able to forbid subdomains of permitted domains) In other words, I would like to apply a different sender_access list, depending on the client IP@. How can I achieve this ? I guess I should use smtpd_restriction_classes, maybe smthg like this : in main.cf: smtpd_restriction_classes = client_applicationX client_applicationX = check_client_access hash:/etc/postfix/client_applicationX, permit in /etc/postfix/client_applicationX 10.16.17.18 reject but what else ? how to configure the behavior to depend on the source IP ? Am I in the right way ? Last thing, I know it's easy to spoof a sender email, but in my case, I don't want this app to send from something else than what we decided. Thanks a lot in advance for your help. Jix -- Sent from: http://postfix.1071664.n5.nabble.com/Postfix-Users-f2.html