email domain change to cname if the domain is DNS aliases

hkfrankie

New Member
May 23, 2024
4
0
1
Please help on my case :
We send email to test@billionelite.cn but pmg change the email address to test@g1-excn.ssl.cdncenter.cn
since the change it resolve an invalid MX record and the email cannot be sent.
This problem is applied to all similar cases if the email domain is a DNS aliases.

Condition :
billionelite.cn -- a DNS aliases
g1-excn.ssl.cdncenter.cn -- a DNS cname

How to enforce pmg not to resolve and use cname?

Thanks!

2024-08-23 18_58_16-Free online network tools - traceroute, nslookup, dig, whois lookup, ping ...jpg2024-08-23 19_00_00-pmg.moonpo.com - PuTTY.jpg
 
We send email to test@billionelite.cn but pmg change the email address to
That is nothing PMG does in the default configuration - please post the complete logs from this email (e.g. from the tracking center) as text - maybe we can see what's going on there
 
The below are two mails log

1. failed

2. ok -- need to do the following for each case
Add virtual_alias_maps = hash:/etc/postfix/virtual in /etc/pmg/template/main.cf.in

/etc/postfix/virtual
@g1-excn.ssl.cdncenter.cn @billionelite.cn

and update /etc/pmg/transport (or use GUI)
billionelite.cn smtp:[mx-n.global-mail.cn]:25





2024-08-27 16_46_05-pmg - Proxmox Mail Gateway.jpg
 
Send the log text as well
====================


Aug 27 16:33:14
mis@xxx.com
test@g1-excn.ssl.cdncenter.cn
queued/deferred
2024-08-27T16:26:55.767489+08:00 pmg postfix/smtpd[3445]: connect from localhost.localdomain[127.0.0.1]
2024-08-27T16:26:55.769314+08:00 pmg postfix/smtpd[3445]: BBC95C236C: client=localhost.localdomain[127.0.0.1], orig_client=.com[172.]
2024-08-27T16:26:55.811445+08:00 pmg postfix/cleanup[3119]: BBC95C236C: message-id=<692290029.96121.1724747210429.JavaMail.zimbra@xxx.local>
2024-08-27T16:26:55.814359+08:00 pmg postfix/qmgr[2147]: BBC95C236C: from=<mis@xxx.com>, size=1678, nrcpt=1 (queue active)
2024-08-27T16:26:55.814776+08:00 pmg postfix/smtpd[3445]: disconnect from localhost.localdomain[127.0.0.1] ehlo=1 xforward=1 mail=1 rcpt=1 data=1 commands=5
2024-08-27T16:26:55.838244+08:00 pmg postfix/smtp[3446]: BBC95C236C: to=<test@g1-excn.ssl.cdncenter.cn>, relay=g1-excn.ssl.cdncenter.cn[59.188.218.123]:25, delay=0.06, delays=0.04/0/0.02/0, dsn=4.4.2, status=deferred (lost connection with g1-excn.ssl.cdncenter.cn[59.188.218.123] while receiving the initial server greeting)
2024-08-27T16:33:14.532013+08:00 pmg postfix/qmgr[3687]: BBC95C236C: from=<mis@xxx.com>, size=1678, nrcpt=1 (queue active)
2024-08-27T16:33:14.843613+08:00 pmg postfix/smtp[3689]: BBC95C236C: to=<test@g1-excn.ssl.cdncenter.cn>, relay=g1-excn.ssl.cdncenter.cn[59.188.218.123]:25, delay=379, delays=379/0.07/0.23/0, dsn=4.4.2, status=deferred (lost connection with g1-excn.ssl.cdncenter.cn[59.188.218.123] while receiving the initial server greeting)

Aug 27 16:33:56
mis@xxx.com
test@billionelite.cn
accepted/delivered
2024-08-27T16:33:55.977348+08:00 pmg postfix/smtpd[3738]: connect from .com[172.]
2024-08-27T16:33:56.064051+08:00 pmg postfix/smtpd[3738]: 0F99BC0528: client=.com[172.]
2024-08-27T16:33:56.105261+08:00 pmg postfix/cleanup[3742]: 0F99BC0528: message-id=<853182576.97295.1724747631910.JavaMail.zimbra@xxx.local>
2024-08-27T16:33:56.106805+08:00 pmg postfix/qmgr[3713]: 0F99BC0528: from=<mis@xxx.com>, size=2440, nrcpt=1 (queue active)
2024-08-27T16:33:56.110107+08:00 pmg postfix/smtpd[3738]: disconnect from .com[172.] ehlo=2 starttls=1 mail=1 rcpt=1 data=1 quit=1 commands=7
2024-08-27T16:33:56.156817+08:00 pmg pmg-smtp-filter[3485]: C18B466CD8F74246F5: new mail message-id=<853182576.97295.1724747631910.JavaMail.zimbra@xxx.local>#012
2024-08-27T16:33:56.185328+08:00 pmg postfix/smtpd[3747]: connect from localhost.localdomain[127.0.0.1]
2024-08-27T16:33:56.187143+08:00 pmg postfix/smtpd[3747]: 2DA9CC2369: client=localhost.localdomain[127.0.0.1], orig_client=.com[172.]
2024-08-27T16:33:56.229323+08:00 pmg postfix/cleanup[3742]: 2DA9CC2369: message-id=<853182576.97295.1724747631910.JavaMail.zimbra@xxx.local>
2024-08-27T16:33:56.246945+08:00 pmg postfix/qmgr[3713]: 2DA9CC2369: from=<mis@xxx.com>, size=1669, nrcpt=1 (queue active)
2024-08-27T16:33:56.247356+08:00 pmg pmg-smtp-filter[3485]: C18B466CD8F74246F5: accept mail to <test@billionelite.cn> (2DA9CC2369) (rule: default-accept)
2024-08-27T16:33:56.247601+08:00 pmg postfix/smtpd[3747]: disconnect from localhost.localdomain[127.0.0.1] ehlo=1 xforward=1 mail=1 rcpt=1 data=1 commands=5
2024-08-27T16:33:56.249000+08:00 pmg pmg-smtp-filter[3485]: C18B466CD8F74246F5: processing time: 0.098 seconds (0, 0.025, 0)
2024-08-27T16:33:56.249495+08:00 pmg postfix/lmtp[3743]: 0F99BC0528: to=<test@billionelite.cn>, orig_to=<test@g1-excn.ssl.cdncenter.cn>, relay=127.0.0.1[127.0.0.1]:10023, delay=0.19, delays=0.04/0/0.04/0.1, dsn=2.5.0, status=sent (250 2.5.0 OK (C18B466CD8F74246F5))
2024-08-27T16:33:56.249595+08:00 pmg postfix/qmgr[3713]: 0F99BC0528: removed
2024-08-27T16:34:08.852937+08:00 pmg postfix/smtp[3748]: 2DA9CC2369: to=<test@billionelite.cn>, relay=mx-n.global-mail.cn[58.221.79.221]:25, delay=13, delays=0.06/0/4.3/8.4, dsn=2.0.0, status=sent (250 2.0.0 Ok: queued as 4WtLRy63fkzLfMvn6)
2024-08-27T16:34:08.853428+08:00 pmg postfix/qmgr[3713]: 2DA9CC2369: removed
 
2. ok -- need to do the following for each case
Add virtual_alias_maps = hash:/etc/postfix/virtual in /etc/pmg/template/main.cf.in
do you need this line? - My guess is this is the very reason for this rewriting...
 
Before there's no such line but the result is the address rewritten (log 1)
then I need to rewrite it back so I add the line with addresses mapping (log 2)

Anyway, it can be solved but with manual handling for each case.

Thanks.