• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

Issue Plesk with internal IP as SMTP relay (domain-based)

tanjix_

New Pleskian
Hi Guys,

I am currently struggling with the following on a Plesk Plesk server on Debian 9 (where I guess it is OS independent).

I set up a Mail-Gateway (Proxmox Mail-Gateway, called PMG from now on). The plan is, that all incoming mails are first being handled by the PMG to be checked for spam, virus eetc. and, if all checks are okay, are then forwarded to the Plesk server and dealt with further.
Additionally, I want to handle the PMG the outgoing mails instead of using Plesks' postfix instance.

The PMG is not accessible from the public internet, hence it has a private IP, which is 192.168.1.104
However, for testing reasons, I did make it available to the public internet with a public ip, which is A.B.C.D

As on my Plesk server there are multiple domains running, where not for all domains a relaying should be done, I modified my main.cf of Postfix by adding:

Code:
# Sender-based relaying
sender_dependent_relayhost_maps = hash:/etc/postfix/sdr_custom_transport
smtp_connect_timeout = 5

The file /etc/postfix/sdr_custom_transport contains

Code:
@domain.org [192.168.1.104]:26

Port 26 in this case is correct, as that's the relaying port from PMG for trusted internal connections.

By doing a

Code:
postmap /etc/postfix/sdr_custom_transport

I let the mapping to create.

Now comes the weird thing.

The mapping itself works, however, Postfix is unable to reach 192.168.1.104 and results in a "connection timed out":

Code:
May  9 22:21:21 myserver postfix/qmgr[14724]: B5771300958: from=<sender@domain.org>, size=6815, nrcpt=1 (queue active)
May  9 22:21:26 myserver postfix/smtp[17290]: B5771300958: to=<anyrecipient@icloud.com>, relay=none, delay=3360, delays=3355/0.01/5/0, dsn=4.4.1, status=deferred (connect to 192.168.1.104[192.168.1.104]:26: Connection timed out)

However, when I try to connect to this internal IP on port 26 with telnet, it works:

Code:
root@myserver:~# telnet 192.168.1.104 26
Trying 192.168.1.104...
Connected to 192.168.1.104.
Escape character is '^]'.
220 securemail1.domain.org

The connection itself works fine according to this. So, I am out of ideas, why postfix ends in a timeout, whereas on the linux shell itself I can connect to there.

For curiosity, when I modify the file /etc/postfix/sdr_custom_transport and change [192.168.1.104]:26 to [A.B.C.D]:26, recreate the map-file, restart postfix and send another email, it is being relayed to PMG, as it should be.

Does anyone here have an idea, why the internal IP does not work where the external one does?

Any help here is highly appreciated! Thanks a lot!
 
Last edited:
Back
Top