SysAdmin EM via Postfix-users:
> Good days, request help, is it possible to use conditions in the
> sender_canonical file? we are migrating an entire system and some customers
> do not have our SPF added.
> 
> I would like to add a condition for you to rewrite the from when it does
> not match a condition.
> 
> Example,
> 
> If the from is not domain1.com and domain2.com do a rewrite of the from by
> [email protected].
> 
> Any helps?

A regexp or pcre table could do that:

/etc/postfix/main.cf:
sender_canonical_maps = regexp:/etc/postfix/sender_canonical.regexp

/etc/postfix/sender_canonical.regexp:
!/@(domain1\.example|domain2\.example)$/ [email protected]

Don't forget the '@', '\', and '$'.

        Wietse
_______________________________________________
Postfix-users mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to