(SOLVED) Lost connection with xxx while receiving the initial server greeting

raspati

New Member
Mar 23, 2020
12
1
1
31
Hello,

I am have proxmox 5.0-61, and running very normal. starting two week ago, some of email unable to send to some of domain.

Error: "Lost connection with xxx while receiving the initial server greeting"

The following is capture of my configuration:

root@mx9:~# postconf -n
alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
append_dot_mydomain = yes
best_mx_transport = local
biff = no
command_directory = /usr/sbin
compatibility_level = 2
content_filter = scan:127.0.0.1:10024
daemon_directory = /usr/lib/postfix/sbin
data_directory = /var/lib/postfix
default_destination_concurrency_limit = 40
delay_warning_time = 4h
lmtp_destination_concurrency_limit = 20
mail_name = Proxmox
mailbox_size_limit = 51200000
message_size_limit = 25485760
mydestination = localhost, $myhostname
mydomain = domain.co.id
myhostname = mx9.domain.co.id
mynetworks = 127.0.0.0/8 [::1]/128 192.168.x.0/24 192.168.x.0/24 192.168.x.85/32 192.168.x.85/32 192.168.x.85/32 192.168.x.85/32
parent_domain_matches_subdomains = debug_peer_list,fast_flush_domains,mynetworks,permit_mx_backup_networks,qmqpd_authorized_clients,smtpd_access_maps
postscreen_access_list = permit_mynetworks, cidr:/etc/postfix/postscreen_access
postscreen_dnsbl_action = enforce
postscreen_dnsbl_sites = b.barracudacentral.org,zen.spamhaus.org
postscreen_greet_action = enforce
recipient_delimiter = +
relay_destination_concurrency_limit = 20
relay_domains = hash:/etc/pmg/domains
relay_transport = smtp:192.168.x.85:25
smtp_destination_concurrency_limit = 20
smtp_tls_session_cache_database = btree:/var/lib/postfix/smtp_tls_session_cache
smtpd_banner = $myhostname XXXX SMTP
smtpd_client_connection_count_limit = 50
smtpd_client_connection_rate_limit = 0
smtpd_client_message_rate_limit = 0
smtpd_helo_restrictions =
smtpd_recipient_restrictions = permit_mynetworks reject_unauth_destination reject_non_fqdn_recipient check_recipient_access regexp:/etc/postfix/rcptaccess check_sender_access regexp:/etc/postfix/senderaccess check_client_access cidr:/etc/postfix/clientaccess check_policy_service inet:127.0.0.1:10022
smtpd_sender_restrictions = permit_mynetworks reject_non_fqdn_sender check_client_access cidr:/etc/postfix/clientaccess check_sender_access regexp:/etc/postfix/senderaccess check_recipient_access regexp:/etc/postfix/rcptaccess
smtpd_tls_session_cache_database = btree:/var/lib/postfix/smtpd_tls_session_cache
transport_maps = hash:/etc/pmg/transport
virtual_destination_concurrency_limit = 20

Kindly please help on this issue, I have tried to solve this issue for two weeks.
 

Stoiko Ivanov

Proxmox Staff Member
Staff member
May 2, 2018
3,328
380
88
The error message might indicate a network problem...
Please check the journal of the PMG (`journalctl -b`, `journalctl -r` and `dmesg`) for hints where the problem might be

I hope this helps!
 

raspati

New Member
Mar 23, 2020
12
1
1
31
Hi, thank you for your helps, I will share the detail as your suggestion.

I believe about 70% of emails are delivered.

All the emails that queuing on the tracking email will be duplicated when the the email attempting for sending the emails. Than the queuing more a lot. It is possible to disable the policy ?
 

Stoiko Ivanov

Proxmox Staff Member
Staff member
May 2, 2018
3,328
380
88
All the emails that queuing on the tracking email will be duplicated when the the email attempting for sending the emails. Than the queuing more a lot. It is possible to disable the policy ?
Which mails are queued? - I don't understand the question.

Did you find anything relevant in the logs?
 

raspati

New Member
Mar 23, 2020
12
1
1
31
hmmm, sorry please forget it.

Error from dmesg:
[ 1.074647] piix4_smbus 0000:00:07.3: SMBus Host Controller not enabled!
[ 1.086001] sd 2:0:0:0: [sda] Assuming drive cache: write through
[ 10.098710] Error: Driver 'pcspkr' is already registered, aborting...

Please see the attached file.
 

Attachments

Stoiko Ivanov

Proxmox Staff Member
Staff member
May 2, 2018
3,328
380
88
The errors in the log:
Code:
Mar 24 17:36:39 mx9 postfix/smtp[4532]: EE3A33C2BA5: conversation with mail.mandirisek.co.id[103.120.244.167] timed out while receiving
Mar 24 17:36:39 mx9 postfix/smtp[4533]: 9F9FF3C2E8E: to=<Mandiri.Prioritas@bankmandiri.co.id>, relay=mail11.bankmandiri.co.id[202.58.242
Mar 24 17:36:39 mx9 postfix/smtp[4453]: 139403C2B6C: conversation with mx2.trimegah.com[202.9.72.35] timed out while receiving the initi
would indicate a network problem in your environment.

Maybe you have a duplicate IP or MAC on the network?
 

raspati

New Member
Mar 23, 2020
12
1
1
31
I will do assessment for duplicate IP. I will let you know later.


Another question:
I have PTR record in our ISP like mx2.domain.com
How to set SMTP banner on Proxmox ?

I change hostname to mx2.domain.com and SMTPD Banner on Mail Proxy, but nothing happen.

"I was NOT able to detect your hostname in the greeting message or the hostname has not a valid PTR record " << https://www.dnsqueries.com/en/smtp_test_check.php
 

Stoiko Ivanov

Proxmox Staff Member
Staff member
May 2, 2018
3,328
380
88
* check your '/etc/postfix/main.cf' - what's the value of 'myhostname', 'mydomain' and 'smtpd_banner'?
* what's the output of `pmgconfig dump |grep ^dns` ?
* what does `drill -x $your.ip.address` yield (you need to replace $your.ip.address with the IP you have the PTR set on, and you might need to install 'ldnsutils' for drill) ?
 

raspati

New Member
Mar 23, 2020
12
1
1
31
* check your '/etc/postfix/main.cf' - what's the value of 'myhostname', 'mydomain' and 'smtpd_banner'?
myhostname = mx2.domain.com
mydomain = domain.com
smtpd_banner = mx2.domain.com

* what's the output of `pmgconfig dump |grep ^dns` ?
dns.domain = domain.com
dns.hostname = mx2

* what does `drill -x $your.ip.address` yield (you need to replace $your.ip.address with the IP you have the PTR set on, and you might need to install 'ldnsutils' for drill) ?
xxx.xxx.40.103.in-addr.arpa. 3599 IN PTR mx2.domain.com
 

Stoiko Ivanov

Proxmox Staff Member
Staff member
May 2, 2018
3,328
380
88
That looks quite allright - please try to connect (from the outside) to the public ip of your PMG on port 25 e.g. with netcat:
Code:
nc -v 103.40.xxx.xxx
and paste the output
 

raspati

New Member
Mar 23, 2020
12
1
1
31
How to connect to the ip public of my PMG? though browser or ssh or telnet ? I only open port 25 from public internet.

port.jpg
 

Stoiko Ivanov

Proxmox Staff Member
Staff member
May 2, 2018
3,328
380
88
connect from a laptop? or your phone? (and use netcat or telnet)

however since I see 'Cisco PIX sanitized smtpd' -> could the PIX firewall change the responses of the PMG behind it?
 

raspati

New Member
Mar 23, 2020
12
1
1
31
"could the PIX firewall change the responses of the PMG behind it? " << sorry, I do not understand, can be explained again in more detail ?

#telnet 103.40.xxx.xxx 25
220 ************************

Connection to host lost
 
Last edited:

Stoiko Ivanov

Proxmox Staff Member
Staff member
May 2, 2018
3,328
380
88
220 ************************
does this line contain the hostname? (not sure if you try to anonymize the answer or if its the actual answer you're receiving)
if this is the actual answer - I would check the config of the Firewall you have in front of PMG (cisco PIX)?- I suspect it changes the responses
 

raspati

New Member
Mar 23, 2020
12
1
1
31
No, just like that.

Yes, that the actual answer.

I would check the config of the Firewall you have in front of PMG (cisco PIX)?- I suspect it changes the responses << How I / We do that ?

Btw, I don't really understand this question, I am using Cisco ASA actually.
 
Last edited:

raspati

New Member
Mar 23, 2020
12
1
1
31
I just checked the firewall, and I have enable the smtp masking configuration in ASA, then the result looks normal as follows:

mx2#nc -v localhost 25
localhost.localdomain [127.0.0.1] 25 (smtp)open
220 mx2.domain.con mx2.domain.com
 

raspati

New Member
Mar 23, 2020
12
1
1
31

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!