No Incomming mails recieved

crankydunking

New Member
Apr 22, 2020
5
1
3
29
I use PVE6.1-7 and LXC Image proxmox-mailgateway-6.0-standard_6.0-2_amd64.tar.gz

I have installed the container and did all settings. now i have the problem, there is no email incomming.

Apr 22 13:49:35 mail postfix[188]: Postfix is running with backwards-compatible default settings
Apr 22 13:49:35 mail postfix[188]: See http://www.postfix.org/COMPATIBILITY_README.html for details
Apr 22 13:49:35 mail postfix[188]: To disable backwards compatibility use "postconf compatibility_level=2" and "postfix reload"
Apr 22 13:49:35 mail postfix/postfix-script[266]: warning: symlink leaves directory: /etc/postfix/./makedefs.out
Apr 22 13:49:35 mail postfix/postfix-script[304]: starting the Postfix mail system
Apr 22 13:49:35 mail postfix/master[306]: daemon started -- version 3.4.5, configuration /etc/postfix
Apr 22 13:50:12 mail pmg-smtp-filter[1049]: Process Backgrounded
Apr 22 13:50:12 mail pmg-smtp-filter[1049]: 2020/04/22-13:50:12 main (type Net::Server::PreFork) starting! pid(1049)
Apr 22 13:50:12 mail pmg-smtp-filter[1049]: Binding to TCP port 10023 on host 127.0.0.1 with IPv4
Apr 22 13:50:12 mail pmg-smtp-filter[1049]: Binding to TCP port 10024 on host 127.0.0.1 with IPv4
Apr 22 13:50:12 mail pmg-smtp-filter[1049]: Group Not Defined. Defaulting to EGID '0'
Apr 22 13:50:12 mail pmg-smtp-filter[1049]: User Not Defined. Defaulting to EUID '0'
Apr 22 13:50:12 mail pmg-smtp-filter[1049]: Setting up serialization via flock
Apr 22 13:50:12 mail pmg-smtp-filter[1049]: Filter daemon (re)started (max. 34 processes)
Apr 22 13:50:12 mail pmgpolicy[1050]: Process Backgrounded
Apr 22 13:50:12 mail pmgpolicy[1050]: 2020/04/22-13:50:12 main (type Net::Server::PreForkSimple) starting! pid(1050)
Apr 22 13:50:12 mail pmgpolicy[1050]: Binding to TCP port 10022 on host 127.0.0.1 with IPv4
Apr 22 13:50:12 mail pmgpolicy[1050]: Group Not Defined. Defaulting to EGID '0'
Apr 22 13:50:12 mail pmgpolicy[1050]: User Not Defined. Defaulting to EUID '0'
Apr 22 13:50:12 mail pmgpolicy[1050]: Setting up serialization via flock
Apr 22 13:50:12 mail pmgpolicy[1050]: Policy daemon (re)started
Apr 22 13:50:12 mail pmgpolicy[1050]: Beginning prefork (5 processes)
Apr 22 13:50:12 mail pmgpolicy[1050]: Starting "5" children
Apr 22 13:50:15 mail pmg-smtp-filter[1049]: Beginning prefork (2 processes)
Apr 22 13:50:15 mail pmg-smtp-filter[1049]: Starting "2" children
Apr 22 13:50:45 mail pmg-smtp-filter[1049]: starting database maintainance
Apr 22 13:50:45 mail pmg-smtp-filter[1049]: end database maintainance (22 ms)
Apr 22 13:51:21 mail postfix/postfix-script[1141]: refreshing the Postfix mail system
Apr 22 13:51:21 mail postfix/master[306]: reload -- version 3.4.5, configuration /etc/postfix
Apr 22 13:51:21 mail postfix/master[306]: warning: service 26: ignoring inet_interfaces change
Apr 22 13:51:21 mail postfix/master[306]: warning: to change inet_interfaces, stop and start Postfix
Apr 22 13:51:21 mail postfix/master[306]: warning: service 25: ignoring inet_interfaces change
Apr 22 13:51:21 mail postfix/master[306]: warning: to change inet_interfaces, stop and start Postfix
Apr 22 13:51:21 mail postfix/master[306]: warning: service 127.0.0.1:10025: ignoring inet_interfaces change
Apr 22 13:51:21 mail postfix/master[306]: warning: to change inet_interfaces, stop and start Postfix
Apr 22 13:52:23 mail pmgpolicy[1050]: starting policy database maintainance (greylist, rbl)
Apr 22 13:52:23 mail pmgpolicy[1050]: end policy database maintainance (7 ms, 1 ms)
Apr 22 13:52:45 mail pmg-smtp-filter[1049]: starting database maintainance
Apr 22 13:52:45 mail pmg-smtp-filter[1049]: end database maintainance (3 ms)
Apr 22 13:54:33 mail pmgpolicy[1050]: starting policy database maintainance (greylist, rbl)
Apr 22 13:54:33 mail pmgpolicy[1050]: end policy database maintainance (7 ms, 1 ms)
Apr 22 13:54:45 mail pmg-smtp-filter[1049]: starting database maintainance
Apr 22 13:54:45 mail pmg-smtp-filter[1049]: end database maintainance (3 ms)
Apr 22 13:56:21 mail postfix/qmgr[1146]: table hash:/etc/pmg/domains(0,lock|utf8_request) has changed -- restarting
Apr 22 13:56:43 mail pmgpolicy[1050]: starting policy database maintainance (greylist, rbl)
Apr 22 13:56:43 mail pmgpolicy[1050]: end policy database maintainance (6 ms, 1 ms)
Apr 22 13:56:45 mail pmg-smtp-filter[1049]: starting database maintainance
Apr 22 13:56:45 mail pmg-smtp-filter[1049]: end database maintainance (3 ms)
Apr 22 13:58:46 mail pmg-smtp-filter[1049]: starting database maintainance
Apr 22 13:58:46 mail pmg-smtp-filter[1049]: end database maintainance (3 ms)
Apr 22 13:58:53 mail pmgpolicy[1050]: starting policy database maintainance (greylist, rbl)
Apr 22 13:58:53 mail pmgpolicy[1050]: end policy database maintainance (6 ms, 1 ms)
Apr 22 14:00:03 mail pmgpolicy[1050]: Received a SIG HUP
Apr 22 14:00:03 mail pmgpolicy[1050]: 2020/04/22-14:00:03 Server closing!
Apr 22 14:00:03 mail pmgpolicy[1050]: 2020/04/22-14:00:03 Re-exec server during HUP
Apr 22 14:00:04 mail pmgpolicy[1050]: WARNING: Pid_file created by this same process. Doing nothing.
Apr 22 14:00:04 mail pmgpolicy[1050]: WARNING: Pid_file created by this same process. Doing nothing.
Apr 22 14:00:04 mail pmgpolicy[1050]: 2020/04/22-14:00:04 main (type Net::Server::PreForkSimple) starting! pid(1050)
Apr 22 14:00:04 mail pmgpolicy[1050]: Binding open file descriptors
Apr 22 14:00:04 mail pmgpolicy[1050]: Binding to TCP port 10022 on host 127.0.0.1 with IPv4
Apr 22 14:00:04 mail pmgpolicy[1050]: Reassociating file descriptor 7 with TCP on [127.0.0.1]:10022, using IPv4
Apr 22 14:00:04 mail pmgpolicy[1050]: Group Not Defined. Defaulting to EGID '0'
Apr 22 14:00:04 mail pmgpolicy[1050]: User Not Defined. Defaulting to EUID '0'
Apr 22 14:00:04 mail pmgpolicy[1050]: Setting up serialization via flock
Apr 22 14:00:04 mail pmgpolicy[1050]: Policy daemon (re)started
Apr 22 14:00:04 mail pmgpolicy[1050]: Beginning prefork (5 processes)
Apr 22 14:00:04 mail pmgpolicy[1050]: Starting "5" children
Apr 22 14:00:46 mail pmg-smtp-filter[1049]: starting database maintainance
Apr 22 14:00:46 mail pmg-smtp-filter[1049]: end database maintainance (4 ms)
Apr 22 14:02:14 mail pmgpolicy[1050]: starting policy database maintainance (greylist, rbl)

I want to try the intelligent filter but have problems to bring it to work.
Maybe cause it binds postfix to localhost?

King regards
Daniel
 
Did you configure all incoming mail to go to PMG first instead of your original email server?
 
Yes,

i have run PMG on KVM for a serval Days without problems. So i wanted tu try it with LXC. Its easyer to handle.
So MX Record is showing on the PMG server. But no incomming mail.

Every Email-Client says Connection Timeout.
 
Can you successful reached your PMG container via telnet from your internal and external network?
 
Maybe cause it binds postfix to localhost?
that sounds like a very likely reason!

did you configure the LXC with a static ip? (it currently won't work with dhcp provided addresses)

please try to run:
* pmgconfig sync --restart 1
* systemctl restart postfix

and check the output of `ss -tlnp`
 
When i do pmgconfig sync --restart 1:

could not change directory to "/root": Permission denied
could not change directory to "/root": Permission denied
could not change directory to "/root": Permission denied
could not change directory to "/root": Permission denied
could not change directory to "/root": Permission denied
could not change directory to "/root": Permission denied
could not change directory to "/root": Permission denied
could not change directory to "/root": Permission denied
could not change directory to "/root": Permission denied
could not change directory to "/root": Permission denied
could not change directory to "/root": Permission denied
could not change directory to "/root": Permission denied



output of ss -tlnp seems correct:

Code:
LISTEN                            0                                 128                                                                127.0.0.1:85                                                                 0.0.0.0:*                                users:(("pmgdaemon worke",pid=874,fd=6),("pmgdaemon worke",pid=872,fd=6),("pmgdaemon worke",pid=871,fd=6),("pmgdaemon",pid=870,fd=6))                                                                                                                     
LISTEN                            0                                 128                                                                  0.0.0.0:22                                                                 0.0.0.0:*                                users:(("sshd",pid=137,fd=3))                                                                                                                                                                                                                             
LISTEN                            0                                 128                                                                127.0.0.1:5432                                                               0.0.0.0:*                                users:(("postgres",pid=177,fd=5))                                                                                                                                                                                                                         
LISTEN                            0                                 100                                                                  0.0.0.0:25                                                                 0.0.0.0:*                                users:(("master",pid=1214,fd=21))                                                                                                                                                                                                                         
LISTEN                            0                                 100                                                                  0.0.0.0:26                                                                 0.0.0.0:*                                users:(("master",pid=1214,fd=17))                                                                                                                                                                                                                         
LISTEN                            0                                 128                                                                  0.0.0.0:8006                                                               0.0.0.0:*                                users:(("pmgproxy worker",pid=884,fd=6),("pmgproxy worker",pid=883,fd=6),("pmgproxy worker",pid=882,fd=6),("pmgproxy",pid=881,fd=6))                                                                                                                       
LISTEN                            0                                 128                                                                127.0.0.1:10022                                                              0.0.0.0:*                                users:(("pmgpolicy child",pid=840,fd=5),("pmgpolicy child",pid=839,fd=5),("pmgpolicy child",pid=838,fd=5),("pmgpolicy child",pid=837,fd=5),("pmgpolicy child",pid=836,fd=5),("pmgpolicy",pid=834,fd=5))                                                   
LISTEN                            0                                 128                                                                127.0.0.1:10023                                                              0.0.0.0:*                                users:(("pmg-smtp-filter",pid=925,fd=5),("pmg-smtp-filter",pid=924,fd=5),("pmg-smtp-filter",pid=912,fd=5))                                                                                                                                                 
LISTEN                            0                                 128                                                                127.0.0.1:10024                                                              0.0.0.0:*                                users:(("pmg-smtp-filter",pid=925,fd=7),("pmg-smtp-filter",pid=924,fd=7),("pmg-smtp-filter",pid=912,fd=7))                                                                                                                                                 
LISTEN                            0                                 100                                                                127.0.0.1:10025                                                              0.0.0.0:*                                users:(("master",pid=1214,fd=28))                                                                                                                                                                                                                         
LISTEN                            0                                 128                                                                     [::]:22                                                                    [::]:*                                users:(("sshd",pid=137,fd=4))                                                                                                                                                                                                                             
LISTEN                            0                                 128                                                                    [::1]:5432                                                                  [::]:*                                users:(("postgres",pid=177,fd=3))                                                                                                                                                                                                                         
LISTEN                            0                                 100                                                                     [::]:25                                                                    [::]:*                                users:(("master",pid=1214,fd=22))                                                                                                                                                                                                                         
LISTEN                            0                                 100                                                                     [::]:26                                                                    [::]:*


I don't use a DHCP Server. It is a public static ip given.
 
When i do pmgconfig sync --restart 1:

could not change directory to "/root": Permission denied
could not change directory to "/root": Permission denied
could not change directory to "/root": Permission denied
could not change directory to "/root": Permission denied
those messages are harmless - they happen because you ran the command while your working directory is '/root' - try:
`cd / && pmgconfig sync --restart 1`

ss output looks good!

Every Email-Client says Connection Timeout.

if it's still not working - I would guess that there is a problem with the networking:
* maybe a firewall is in place which drops connections to port 25/26 on your pmg , the hypervisor runs on, the switch the hypervisor is connected to, somewhere else in your network?
* try connecting from outside your network to port 25 on your PMG: `nc -v <PMG-ip-address> 25` - does this work?
 
seriously, i don't know what happened BUT now ist works?

What does pmgconfig sync --restart 1 do, that it works after it?
I installed pmg in a lxc container and have my configuration done.
 
  • Like
Reactions: Stoiko Ivanov
seriously, i don't know what happened BUT now ist works?
Glad to hear!

What does pmgconfig sync --restart 1 do, that it works after it?
Among other things it renders the configuration files for postfix (and clamav, spamassassin and postgresql) to work with your configured settings
(see https://pmg.proxmox.com/pmg-docs/pmg-admin-guide.html#pmgconfig_template_engine).

It works after rendering the files and restarting postfix, because we had a small bug (fixed today) in the service file which runs during boot, which causes postfix to start with the unmodified stock config (hence the listening on 127.0.0.1) - see https://pve.proxmox.com/pipermail/pmg-devel/2020-April/001138.html

I installed pmg in a lxc container and have my configuration done.
I think we'll publish an updated pmg container template soon - then this should work out of the box, without any commands!

Thanks for the report!
 
  • Like
Reactions: crankydunking

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 yours easily in our online shop.

Buy now!