natan via Postfix-users: > Hi > The logs show that Postfix does not pass the from key because the From > header comes from the message body, and Postfix by default only supports > sender information from the Envelope From (sender). Right?
check_policy_service is an envelope feature. To enforce policy on head and envelope, use milter-regex. > I'm trying to write something "like DMARC" in Python to reject if the > From and return-path for the selected domain are different > only that much and as much as that...... > I cannot find other user-friendly solutions Why not use use DMARC tools to enforce DMARC policy? Whether milter-regex is user-friendly depends on the user. Untested example: reject envelope from example.com does not match header from envfrom /@example\.com$/i and not header /From/ /@example\.com\b/ei This uses the following flags: i to make matches case-insensitive e to match a word boundary with \b The header from matching can be improved if the address is always inside < and >. Wietse _______________________________________________ Postfix-users mailing list -- postfix-users@postfix.org To unsubscribe send an email to postfix-users-le...@postfix.org