[SOLVED] Sending smart host mail via cluster node server?

H.c.K

Member
Oct 16, 2019
32
1
8
28
Hi, I have cluster making including 1 master and 1 node. I am sending mail from my mail servers. I can send mail as smarthost from my pmg1.abc.com master server. When I type the address of my pmg2.abc.com node server, I can't log out. How can I help you solve it?
 

Stoiko Ivanov

Proxmox Staff Member
Staff member
May 2, 2018
2,510
269
83
I don't understand the question - please explain (and include logs, configs, screenshots) what is not working the way you expect it

thanks!
 

H.c.K

Member
Oct 16, 2019
32
1
8
28
I don't understand the question - please explain (and include logs, configs, screenshots) what is not working the way you expect it

thanks!
I tried to send mail from cluster node server with smart host. But I understand that because the node server is a backup server, mail is not sent.

mailserver3.abc.com -> smarthost -> pmg1.abc.com(master) -> mail send ok
mailserver3.abc.com -> smarthost -> pmg2.abc.com(node) -> mail send failed. (Do not drop any log.)

my project:

Cluster
pmg1.abc.com -> master
pmg2.abc.com -> node
pmg3.abc.com -> node
pmg4.abc.com -> node
pmg5.abc.com -> node

mail outgoing traffic (I understand that this structure will not.):
mailserver1.abc.com smarthost -> pmg2.abc.com -> send mail
mailserver2.abc.com smarthost -> pmg3.abc.com -> send mail
mailserver3.abc.com smarthost -> pmg4.abc.com -> send mail
mailserver4.abc.com smarthost -> pmg5.abc.com -> send mail
Is it possible for a structure like the one above?
 

Stoiko Ivanov

Proxmox Staff Member
Staff member
May 2, 2018
2,510
269
83
(Do not drop any log.)
There needs to be some logs:
* does mailserver3.abc.com try to send an email to pmg2.abc.com?
* if yes /var/log/mail.log of pmg2.abc.com has some log-lines of the connection attempt
* if no the configuration problem is on mailserver3.abc.com

I hope this helps!
 

H.c.K

Member
Oct 16, 2019
32
1
8
28
There needs to be some logs:
* does mailserver3.abc.com try to send an email to pmg2.abc.com?
* if yes /var/log/mail.log of pmg2.abc.com has some log-lines of the connection attempt
* if no the configuration problem is on mailserver3.abc.com

I hope this helps!
Hi Stoiko,
After logging smarthost, no log has been dropped. The same records always exist. mail server is waiting in the queue. When I change smarthost from mail server to pmg1.abc.com it starts to send directly.
After installing this server, I made a direct join to pmg1.abc.com. All settings were made from the master cluster server pmg1.abc.com.
Cluster status:


Code:
Jan  8 08:00:12 pmg2 pmgpolicy[3399]: starting policy database maintainance (greylist, rbl)
Jan  8 08:00:12 pmg2 pmgpolicy[3399]: end policy database maintainance (11 ms, 3 ms)
Jan  8 08:00:12 pmg2 pmgpolicy[3399]: Received a SIG HUP
Jan  8 08:00:12 pmg2 pmgpolicy[3399]: 2020/01/08-08:00:12 Server closing!
Jan  8 08:00:12 pmg2 pmgpolicy[3399]: 2020/01/08-08:00:12 Re-exec server during HUP
Jan  8 08:00:13 pmg2 pmgpolicy[3399]: WARNING: Pid_file created by this same process. Doing nothing.
Jan  8 08:00:13 pmg2 pmgpolicy[3399]: WARNING: Pid_file created by this same process. Doing nothing.
Jan  8 08:00:13 pmg2 pmgpolicy[3399]: 2020/01/08-08:00:13 main (type Net::Server::PreForkSimple) starting! pid(3399)
Jan  8 08:00:13 pmg2 pmgpolicy[3399]: Binding open file descriptors
Jan  8 08:00:13 pmg2 pmgpolicy[3399]: Binding to TCP port 10022 on host 127.0.0.1 with IPv4
Jan  8 08:00:13 pmg2 pmgpolicy[3399]: Reassociating file descriptor 5 with TCP on [127.0.0.1]:10022, using IPv4
Jan  8 08:00:13 pmg2 pmgpolicy[3399]: Group Not Defined.  Defaulting to EGID '0'
Jan  8 08:00:13 pmg2 pmgpolicy[3399]: User Not Defined.  Defaulting to EUID '0'
Jan  8 08:00:13 pmg2 pmgpolicy[3399]: Setting up serialization via flock
Jan  8 08:00:13 pmg2 pmgpolicy[3399]: Policy daemon (re)started
Jan  8 08:00:13 pmg2 pmgpolicy[3399]: Beginning prefork (5 processes)
Jan  8 08:00:13 pmg2 pmgpolicy[3399]: Starting "5" children
Jan  8 08:01:20 pmg2 pmg-smtp-filter[64401]: starting database maintainance
Jan  8 08:01:20 pmg2 pmg-smtp-filter[64401]: end database maintainance (4 ms)
Jan  8 08:02:23 pmg2 pmgpolicy[3399]: starting policy database maintainance (greylist, rbl)
Jan  8 08:02:23 pmg2 pmgpolicy[3399]: end policy database maintainance (10 ms, 2 ms)
Jan  8 08:03:20 pmg2 pmg-smtp-filter[64401]: starting database maintainance
Jan  8 08:03:20 pmg2 pmg-smtp-filter[64401]: end database maintainance (4 ms)
Jan  8 08:04:33 pmg2 pmgpolicy[3399]: starting policy database maintainance (greylist, rbl)
Jan  8 08:04:33 pmg2 pmgpolicy[3399]: end policy database maintainance (10 ms, 2 ms)
Jan  8 12:45:16 pmg2 pmgpolicy[3399]: starting policy database maintainance (greylist, rbl)
Jan  8 12:57:47 pmg2 pmg-smtp-filter[64401]: starting database maintainance
Jan  8 12:57:47 pmg2 pmg-smtp-filter[64401]: end database maintainance (4 ms)
Jan  8 12:58:07 pmg2 pmgpolicy[3399]: starting policy database maintainance (greylist, rbl)
Jan  8 12:58:07 pmg2 pmgpolicy[3399]: end policy database maintainance (10 ms, 2 ms)
Jan  8 12:59:47 pmg2 pmg-smtp-filter[64401]: starting database maintainance
Jan  8 12:59:47 pmg2 pmg-smtp-filter[64401]: end database maintainance (4 ms)
Jan  8 13:00:13 pmg2 pmgpolicy[3399]: Received a SIG HUP
Jan  8 13:00:13 pmg2 pmgpolicy[3399]: 2020/01/08-13:00:13 Server closing!
Jan  8 13:00:13 pmg2 pmgpolicy[3399]: 2020/01/08-13:00:13 Re-exec server during HUP
Jan  8 13:00:14 pmg2 pmgpolicy[3399]: WARNING: Pid_file created by this same process. Doing nothing.
Jan  8 13:00:14 pmg2 pmgpolicy[3399]: WARNING: Pid_file created by this same process. Doing nothing.
Jan  8 13:00:14 pmg2 pmgpolicy[3399]: 2020/01/08-13:00:14 main (type Net::Server::PreForkSimple) starting! pid(3399)
Jan  8 13:00:14 pmg2 pmgpolicy[3399]: Binding open file descriptors
Jan  8 13:00:14 pmg2 pmgpolicy[3399]: Binding to TCP port 10022 on host 127.0.0.1 with IPv4
Jan  8 13:00:14 pmg2 pmgpolicy[3399]: Reassociating file descriptor 6 with TCP on [127.0.0.1]:10022, using IPv4
Jan  8 13:00:14 pmg2 pmgpolicy[3399]: Group Not Defined.  Defaulting to EGID '0'
Jan  8 13:00:14 pmg2 pmgpolicy[3399]: User Not Defined.  Defaulting to EUID '0'
Jan  8 13:00:14 pmg2 pmgpolicy[3399]: Setting up serialization via flock
Jan  8 13:00:14 pmg2 pmgpolicy[3399]: Policy daemon (re)started
Jan  8 13:00:14 pmg2 pmgpolicy[3399]: Beginning prefork (5 processes)
Jan  8 13:00:14 pmg2 pmgpolicy[3399]: Starting "5" children
Jan  8 13:01:47 pmg2 pmg-smtp-filter[64401]: starting database maintainance
Jan  8 13:01:47 pmg2 pmg-smtp-filter[64401]: end database maintainance (4 ms)
Jan  8 13:02:24 pmg2 pmgpolicy[3399]: starting policy database maintainance (greylist, rbl)
Jan  8 13:02:24 pmg2 pmgpolicy[3399]: end policy database maintainance (10 ms, 2 ms)
Jan  8 13:03:48 pmg2 pmg-smtp-filter[64401]: starting database maintainance
Jan  8 13:03:48 pmg2 pmg-smtp-filter[64401]: end database maintainance (4 ms)
Jan  8 13:04:34 pmg2 pmgpolicy[3399]: starting policy database maintainance (greylist, rbl)
Jan  8 13:04:34 pmg2 pmgpolicy[3399]: end policy database maintainance (10 ms, 2 ms)
Jan  8 13:05:57 pmg2 pmg-smtp-filter[64401]: starting database maintainance
Jan  8 13:05:57 pmg2 pmg-smtp-filter[64401]: end database maintainance (4 ms)
Jan  8 13:06:41 pmg2 pmg-smtp-filter[64406]: Ran out of accept retries!
Jan  8 13:30:26 pmg2 pmgpolicy[3399]: starting policy database maintainance (greylist, rbl)
Jan  8 13:30:26 pmg2 pmgpolicy[3399]: end policy database maintainance (10 ms, 2 ms)
Jan  8 13:32:02 pmg2 pmg-smtp-filter[64401]: starting database maintainance
Jan  8 13:32:02 pmg2 pmg-smtp-filter[64401]: end database maintainance (5 ms)
Jan  8 13:32:36 pmg2 pmgpolicy[3399]: starting policy database maintainance (greylist, rbl)
Jan  8 13:32:36 pmg2 pmgpolicy[3399]: end policy database maintainance (10 ms, 2 ms)
Jan  8 13:34:02 pmg2 pmg-smtp-filter[64401]: starting database maintainance
Jan  8 13:34:02 pmg2 pmg-smtp-filter[64401]: end database maintainance (4 ms)
Jan  8 13:34:46 pmg2 pmgpolicy[3399]: starting policy database maintainance (greylist, rbl)
Jan  8 13:34:46 pmg2 pmgpolicy[3399]: end policy database maintainance (10 ms, 2 ms)
Jan  8 13:36:03 pmg2 pmg-smtp-filter[64401]: starting database maintainance
Jan  8 13:36:03 pmg2 pmg-smtp-filter[64401]: end database maintainance (4 ms)
Jan  8 13:36:56 pmg2 pmgpolicy[3399]: starting policy database maintainance (greylist, rbl)
Jan  8 13:36:56 pmg2 pmgpolicy[3399]: end policy database maintainance (10 ms, 2 ms)
Jan  8 13:38:03 pmg2 pmg-smtp-filter[64401]: starting database maintainance
Jan  8 13:38:03 pmg2 pmg-smtp-filter[64401]: end database maintainance (4 ms)
Jan  8 13:39:06 pmg2 pmgpolicy[3399]: starting policy database maintainance (greylist, rbl)
Jan  8 13:39:06 pmg2 pmgpolicy[3399]: end policy database maintainance (10 ms, 2 ms)
Jan  8 13:40:03 pmg2 pmg-smtp-filter[64401]: starting database maintainance
Jan  8 13:40:03 pmg2 pmg-smtp-filter[64401]: end database maintainance (4 ms)
Jan  8 13:41:16 pmg2 pmgpolicy[3399]: starting policy database maintainance (greylist, rbl)
Jan  8 13:41:16 pmg2 pmgpolicy[3399]: end policy database maintainance (10 ms, 2 ms)
Jan  8 13:42:03 pmg2 pmg-smtp-filter[64401]: starting database maintainance
Jan  8 13:42:03 pmg2 pmg-smtp-filter[64401]: end database maintainance (4 ms)
Jan  8 13:43:26 pmg2 pmgpolicy[3399]: starting policy database maintainance (greylist, rbl)
Jan  8 13:43:26 pmg2 pmgpolicy[3399]: end policy database maintainance (10 ms, 3 ms)
Jan  8 13:44:03 pmg2 pmg-smtp-filter[64401]: starting database maintainance
Jan  8 13:44:03 pmg2 pmg-smtp-filter[64401]: end database maintainance (4 ms)
Jan  8 13:45:36 pmg2 pmgpolicy[3399]: starting policy database maintainance (greylist, rbl)
Jan  8 13:45:36 pmg2 pmgpolicy[3399]: end policy database maintainance (10 ms, 2 ms)
Jan  8 14:00:04 pmg2 pmg-smtp-filter[64401]: end database maintainance (4 ms)
Jan  8 14:00:05 pmg2 pmgpolicy[3399]: Received a SIG HUP
Jan  8 14:00:05 pmg2 pmgpolicy[3399]: 2020/01/08-14:00:05 Server closing!
Jan  8 14:00:05 pmg2 pmgpolicy[3399]: 2020/01/08-14:00:05 Re-exec server during HUP
Jan  8 14:00:06 pmg2 pmgpolicy[3399]: WARNING: Pid_file created by this same process. Doing nothing.
Jan  8 14:00:06 pmg2 pmgpolicy[3399]: WARNING: Pid_file created by this same process. Doing nothing.
Jan  8 14:00:06 pmg2 pmgpolicy[3399]: 2020/01/08-14:00:06 main (type Net::Server::PreForkSimple) starting! pid(3399)
Jan  8 14:00:06 pmg2 pmgpolicy[3399]: Binding open file descriptors
Jan  8 14:00:06 pmg2 pmgpolicy[3399]: Binding to TCP port 10022 on host 127.0.0.1 with IPv4
Jan  8 14:00:06 pmg2 pmgpolicy[3399]: Reassociating file descriptor 5 with TCP on [127.0.0.1]:10022, using IPv4
Jan  8 14:00:06 pmg2 pmgpolicy[3399]: Group Not Defined.  Defaulting to EGID '0'
Jan  8 14:00:06 pmg2 pmgpolicy[3399]: User Not Defined.  Defaulting to EUID '0'
Jan  8 14:00:06 pmg2 pmgpolicy[3399]: Setting up serialization via flock
Jan  8 14:00:06 pmg2 pmgpolicy[3399]: Policy daemon (re)started
Jan  8 14:00:06 pmg2 pmgpolicy[3399]: Beginning prefork (5 processes)
Jan  8 14:00:06 pmg2 pmgpolicy[3399]: Starting "5" children
Jan  8 14:02:04 pmg2 pmg-smtp-filter[64401]: starting database maintainance
Jan  8 14:02:04 pmg2 pmg-smtp-filter[64401]: end database maintainance (4 ms)
Jan  8 14:06:04 pmg2 pmg-smtp-filter[64401]: starting database maintainance
Jan  8 14:06:04 pmg2 pmg-smtp-filter[64401]: end database maintainance (4 ms)
Jan  8 14:06:36 pmg2 pmgpolicy[3399]: starting policy database maintainance (greylist, rbl)
Jan  8 14:06:36 pmg2 pmgpolicy[3399]: end policy database maintainance (10 ms, 2 ms)
Jan  8 14:08:04 pmg2 pmg-smtp-filter[64401]: starting database maintainance
Jan  8 14:08:04 pmg2 pmg-smtp-filter[64401]: end database maintainance (4 ms)
 

Attachments

Stoiko Ivanov

Proxmox Staff Member
Staff member
May 2, 2018
2,510
269
83
In this log nothing connects to the pmg -> check the configuration of the 'mailserver3.abc.com' and its logs!
 

H.c.K

Member
Oct 16, 2019
32
1
8
28
In this log nothing connects to the pmg -> check the configuration of the 'mailserver3.abc.com' and its logs!
Hi Stoiko, (Thank you so much for your help. I know I asked you a lot of questions. I'm new to the mail gateway field. You will always be on my mind in the future and I will always thank you.)
The pmg2.abc.com node server receives all settings from the master server. On mailserver3.abc.com server -> 'pmg1.abc.com master' sends it directly when I set it to smarthost. What kind of adjustment should I make because it's a cluster. SMTP Port in Turkey is 587.

mailserver3.abc.com smtp log -> smarthost -> pmg2.abc.com node of cluster:
Line 428013: 01/08/20 11:24:44 ME-I0122: [4703EE75D2ED24.MAI] SMTP Server is forwarding all mail (directly) to SMTP Hosts [pmg2.abc.com:587].
Line 428026: 01/08/20 11:24:45 ME-E0038: [4703EE75D2ED24.MAI] Communications Error: Socket connection to pmg2.abc.com failed (error 10061). The host was either not contactable or it rejected your connection. Socket Family = 2; Host=1.1.1.2; Port=587

mailserver3.abc.com smtp log-> smarthost -> pmg1.abc.com master of cluster
7FE299CCACB31D4.MAI] SMTP Server is forwarding all mail (directly) to SMTP Hosts [pmg1.abc:587].
 

Attachments

Last edited:

Stoiko Ivanov

Proxmox Staff Member
Staff member
May 2, 2018
2,510
269
83
SMTP Port in Turkey is 587.
port 587 is usually used for authenticated smtp (with required starttls - also called mail submission service MSA) - something where clients (users) send their mail to - not where 2 mailservers (e.g. your downstream server and PMG) communicate.
Since PMG does not use authentication and is meant as a proxy in front of a server port 587 is not listening by default - as the error-message from your downstream server states:

Line 428026: 01/08/20 11:24:45 ME-E0038: [4703EE75D2ED24.MAI] Communications Error: Socket connection to pmg2.abc.com failed (error 10061). The host was either not contactable or it rejected your connection. Socket Family = 2; Host=1.1.1.2; Port=587
The simplest would be to point your downstream server to send mail to the internal port of PMG (26 in a default setup)
 
  • Like
Reactions: H.c.K

H.c.K

Member
Oct 16, 2019
32
1
8
28
port 587 is usually used for authenticated smtp (with required starttls - also called mail submission service MSA) - something where clients (users) send their mail to - not where 2 mailservers (e.g. your downstream server and PMG) communicate.
Since PMG does not use authentication and is meant as a proxy in front of a server port 587 is not listening by default - as the error-message from your downstream server states:



The simplest would be to point your downstream server to send mail to the internal port of PMG (26 in a default setup)
Hi Stoiko,
i solved node restart. Now sending mail. Thank you.
 
  • Like
Reactions: Stoiko Ivanov

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE 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!