[SOLVED] The sent mail goes to the PMG but is not forwarded to ZIMBRA

drynkowski

New Member
Feb 25, 2022
4
1
3
48
Polish
Hello. At first, I apologize for my English. I am supporting the google translator.
I have a problem.
After setting up the DNS server on the external hosting, I installed PMG. Behind him is the Zimbra server.
The current situation is that e-mails reach the PMG but are not forwarded to Zimbra.
Shipped from Zimbra go to the PMG and are delivered to the addressee.

A bit about my configuration.
I have configured routing on the router so that incoming traffic to fixed IP (port 25 only) is natively to DMZ on PMG IP (192.168.27.10) .
There is a Zimbra mail server (192.168.27.11) on the same network in the DMZ.
The PMG host name is
mail.mojadomena.pl
The host name of the Zimbra server is
mojadomena.pl

In PMG in the Configuration -> Mail Proxy -> Relaying tab in Default Relay I entered the IP of the Zimbra Server (192.168.27.11),
the rest unchanged Relay Port 25
Relay Protocol smtp
Disable MX lookup (SMTP) No
Smarthost none
At Relay Domains, I created mojadomena.pl
In Ports unchanged
External SMTP Port 25
Internal SMTP POrt 26

On the Zimbra Relay MTA for external delivery server, I set 192.168.27.10 port 26

Ports 25 and 26 open (via telnet I connect to PMG on ZIMBRA and from ZIMBRA to PMG)

In summary, the sent mail goes to the PMG but is not forwarded to ZIMBRA. Mail sent from ZIMBRA is transferred to the PMG and goes to the recipient.
The mail works one way. Please help
 

drynkowski

New Member
Feb 25, 2022
4
1
3
48
Polish
PMG log after sending the message
As you can see in the screenshot attached, the message has reached PMG



Feb 28 13:43:23 poczta postfix/postscreen[1149]: CONNECT from [193.30.160.48]:30254 to [192.168.27.10]:25
Feb 28 13:43:23 poczta postfix/postscreen[1149]: PASS OLD [193.30.160.48]:30254
Feb 28 13:43:23 poczta postfix/smtpd[1150]: connect from poczta.it-bps.com.pl[193.30.160.48]
Feb 28 13:43:23 poczta pmgpolicy[819]: SPF says pass
Feb 28 13:43:23 poczta postfix/smtpd[1150]: 58DB52402F5: client=poczta.it-bps.com.pl[193.30.160.48]
Feb 28 13:43:23 poczta postfix/cleanup[1154]: 58DB52402F5: message-id=<661969139.3296374.1646052202572.JavaMail.zimbra@bankbsilawa.pl>
Feb 28 13:43:23 poczta postfix/qmgr[805]: 58DB52402F5: from=<dariusz.rynkowski@bankbsilawa.pl>, size=5204, nrcpt=1 (queue active)
Feb 28 13:43:23 poczta postfix/smtpd[1150]: disconnect from poczta.it-bps.com.pl[193.30.160.48] ehlo=2 starttls=1 mail=1 rcpt=1 data=1 quit=1 commands=7
Feb 28 13:43:23 poczta pmg-smtp-filter[850]: 2022/02/28-13:43:23 CONNECT TCP Peer: "[127.0.0.1]:56988" Local: "[127.0.0.1]:10024"
Feb 28 13:43:23 poczta pmg-smtp-filter[850]: 2410CC621CC36B65535: new mail message-id=<661969139.3296374.1646052202572.JavaMail.zimbra@bankbsilawa.pl>#012
Feb 28 13:43:24 poczta pmgpolicy[812]: starting policy database maintenance (greylist, rbl)
Feb 28 13:43:24 poczta pmgpolicy[812]: end policy database maintenance (11 ms, 2 ms)
Feb 28 13:43:24 poczta pmg-smtp-filter[850]: 2410CC621CC36B65535: SA score=0/5 time=1.362 bayes=undefined autolearn=ham autolearn_force=no hits=AWL(-0.312),HTML_MESSAGE(0.001),KAM_DMARC_STATUS(0.01),SPF_HELO_NONE(0.001),SPF_PASS(-0.001),T_SCC_BODY_TEXT_LINE(-0.01)
Feb 28 13:43:24 poczta postfix/smtpd[1161]: connect from localhost.localdomain[127.0.0.1]
Feb 28 13:43:24 poczta postfix/smtpd[1161]: CCC1E2410CD: client=localhost.localdomain[127.0.0.1], orig_client=poczta.it-bps.com.pl[193.30.160.48]
Feb 28 13:43:24 poczta postfix/cleanup[1154]: CCC1E2410CD: message-id=<661969139.3296374.1646052202572.JavaMail.zimbra@bankbsilawa.pl>
Feb 28 13:43:24 poczta postfix/qmgr[805]: CCC1E2410CD: from=<dariusz.rynkowski@bankbsilawa.pl>, size=5867, nrcpt=1 (queue active)
Feb 28 13:43:24 poczta pmg-smtp-filter[850]: 2410CC621CC36B65535: accept mail to <dariusz.rynkowski@ebankbsilawa.pl> (CCC1E2410CD) (rule: default-accept)
Feb 28 13:43:24 poczta postfix/smtpd[1161]: disconnect from localhost.localdomain[127.0.0.1] ehlo=1 xforward=1 mail=1 rcpt=1 data=1 commands=5
Feb 28 13:43:24 poczta pmg-smtp-filter[850]: 2410CC621CC36B65535: processing time: 1.435 seconds (1.362, 0.03, 0)
Feb 28 13:43:24 poczta postfix/lmtp[1155]: 58DB52402F5: to=<dariusz.rynkowski@ebankbsilawa.pl>, relay=127.0.0.1[127.0.0.1]:10024, delay=1.5, delays=0.04/0.02/0/1.4, dsn=2.5.0, status=sent (250 2.5.0 OK (2410CC621CC36B65535))
Feb 28 13:43:24 poczta postfix/qmgr[805]: 58DB52402F5: removed
Feb 28 13:43:24 poczta postfix/smtp[1162]: CCC1E2410CD: to=<dariusz.rynkowski@ebankbsilawa.pl>, relay=192.168.27.11[192.168.27.11]:25, delay=0.12, delays=0.01/0.02/0.05/0.04, dsn=2.0.0, status=sent (250 2.0.0 Ok: queued as E5BB31E697D)
Feb 28 13:43:24 poczta postfix/qmgr[805]: CCC1E2410CD: removed
 

Attachments

  • pmg.jpg
    pmg.jpg
    90.1 KB · Views: 15

Stoiko Ivanov

Proxmox Staff Member
Staff member
May 2, 2018
6,855
1,039
164
Feb 28 13:43:24 poczta postfix/smtp[1162]: CCC1E2410CD: to=<dariusz.rynkowski@ebankbsilawa.pl>, relay=192.168.27.11[192.168.27.11]:25, delay=0.12, delays=0.01/0.02/0.05/0.04, dsn=2.0.0, status=sent (250 2.0.0 Ok: queued as E5BB31E697D)
looks like the mail got successfully accepted by 192.168.27.11 ?
 

drynkowski

New Member
Feb 25, 2022
4
1
3
48
Polish
Thank you for your commitment.
I solved the problem. It is not PMG's fault, but Zimbra
It turned out that Zimbra rejected these messages.
For people who will encounter a similar problem:
thanks to the post:
https://forums.zimbra.org/viewtopic.php?f=15&t=63627
I found out that

This is nearly always caused by a host that is configured on private IP Space (or using NAT) and that does not have an interface for the public IP address the server resides on. This can be easily fixed by simply using native IP address lookups for lmtp rather than DNS. Alternatively, you could have your internal network's domain name configured to lookup differently internally than it does externally. Using that method is beyond the scope of this document.

Zimbra Collaboration 8.5 or above
ZCS 8.5 or above onwards this attribute is now in ldap - zimbraMtaLmtpHostLookup
zmprov ms yourmailserver.com zimbraMtaLmtpHostLookup native
In case that you are using Single Server, be aware always of the Global Config as well:
zmprov mcf zimbraMtaLmtpHostLookup native
Once this is done, you'll need to restart the mta:
zmmtactl restart

Everything works now.
thank you
I am testing the PMG
 
  • Like
Reactions: hata_ph

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get your own in 60 seconds.

Buy now!