[SOLVED] Undeliverable mail message not signed by DKIM

bberny

New Member
Dec 11, 2020
5
0
1
27
I have proxmox mailgw as a relay to more mail servers in my local network and when someone tries to send mail to non-existing address, PMG returns Undelivered Mail Returned to Sender which is marked as spam because the message is not signed with DKIM, how can I have PMG automatically sign those messages ?
 
mail originating on PMG (such as the NDR (=Undelivered Mail Returned to Sender), you're referring to) are not passed through PMG's filter, which does the DKIM signing.

Some users use a different DKIM implementation to get around this (e.g. opendkim-milter)

I hope this helps!
 
Thank you for information, sadly this is quite crucial to use when you use DMARC on your domain. I am giving example of how I resolved this issue below.


I have installed opendkim and generated key for just my mail gateway, then set postfix in PMG to use opendkim (there is plenty of tutorials to use dkim with postfix).
Then you need to set up filtering of postfix generated messages by adding
Code:
internal_mail_filter_classes = bounce
to your /etc/postfix/main.cf
I am using milter_protocol 6