On 2022-05-23 juan smitt wrote: > We got a request to match the envelope sender with a certain mail > header (i.e. X-Something) on our relay servers for every outbound > mails and reject the email if the sender and the value of this header > don't match. > > It's also possible for a sender to have more than one valid > X-Something value. > > Something like this: > * senderdomain1.example is only valid with 'v1', 'v66', 'v99' > X-Something header values > * senderdomain2.example is only valid with 'v5' > * senderdomain3.example is only valid with 'v11' and 'v546' > > etc, etc > > Is this possible with postfix?
This should be doable with restriction classes [1], but it's probably easier (and more straightforward) to implement it with a policy service like postfwd [2]. [1] http://www.postfix.org/RESTRICTION_CLASS_README.html [2] https://postfwd.org/ Regards Ansgar Wiechers -- "Abstractions save us time working, but they don't save us time learning." --Joel Spolsky