Solved Workaround - Postfix DMARC alignment with multiple domains

I have been poring over mail/postfix documentation in vain looking for a solution to my problem. I want to set up DMARC alignment for my three domains to assist delivery on fussy e-mail hosts such as gmail and Outlook cloud services which are becoming increasingly popular even with businesses these days.

I have three domains from which I send mail. My ISP's mail service, which they now consider largely redundant, doesn't do DKIM, so to enable that I have set up my own server on a FreeBSD virtual machine on my (PCLinuxOS) desktop. That is now working well.

However, looking forward, I think I need to get DMARC working. This does work if my sending address (Header Sender) matches myorigin which is used as the Envelope Sender, but not when I send from the other two domains. For DMARC to pass the Header Sender and Envelope Sender need to have the same main domain.

So, it seems I need to set up Postfix to use the Header Sender as the Envelope Sender on my three domains, but this is not answered in a way I can understand in the documentation. Short of relaying through three separate VMs (or three jails) running separate Postfix instances, which would be wasteful of resources, is there a way I can persuade Postfix to use alternative Envelope Sender domains?

Update: It seems since myorigin needs to be set at server start rather than during sending there is no easy way to do this. That might even be by design since enabling dynamic setting of the Envelope Sender could make it trivial for spammers to achieve DMARC alignment, much reducing its value. At least it forces them to develop their own software to do that.

However, FreeBSD and mail/postfix with storage for mail with up to 50MB attachments can run in 256MB RAM and VirtualBox can provide Linked Clones which need only difference files for their virtual drives, so the resource load of three VMs differing only in IP address and myorigin setting is not that great. Therefore, I went with the three VM solution in the end. It solves my problem, though not my original question, which might actually be insoluble.
 
Last edited:
Back
Top