Problems sending mail in PROXMOX 6.4-9

gsanz

Member
Apr 5, 2020
11
0
6
42
Hello , I am working with PROXMOX 6.4-9 and cannot send mails by proxmox.
I have configured the following parameters:

/etc/postfix/main.cf

relayhost = smtp-host.domain.com:587
smtp_use_tls = yes
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
smtp_tls_CApath = /etc/ssl/certs
smtp_sasl_security_options = noanonymous, noplaintext
smtp_sasl_tls_security_options = noanonymous


/etc/postfix/sasl_passwd
smtp.gmail.com:587 cau@pavapark.com:****************

postmap /etc/postfix/sasl_passwd
chown root:root /etc/postfix/sasl_passwd /etc/postfix/sasl_passwd.db
chmod 0600 /etc/postfix/sasl_passwd /etc/postfix/sasl_passwd.db


I execute the following comand for sending a mail and it is not executed:
echo "test mail from proxmox" | mail -s test gsanz@pavapark.com

I have the following values in /var/log/mail.info and have the following output:

Jul 22 11:00:25 pvpavapark postfix/error[47302]: 3779BBC61CA: to=<gsanz@pavapark.com>, relay=none, delay=4640, delays=4620/20/0/0, dsn=4.4.3, status=deferred (delivery temporarily suspended: Host or domain name not found. Name service error for name=smtp.gmail.com type=MX: Host not found, try again)



ANy idea???
 
on a hunch - the message:
Name service error for name=smtp.gmail.com type=MX: Host not found,
indicates that smtp.gmail.com does not have an MX record (which it really does not) - you want to connect directly to smtp.gmail.com - for this you need to use '[smtp.gmail.com]' (with square brackets)

see some of the tutorials online - e.g.:
https://www.linode.com/docs/guides/...ail-and-google-workspace-on-debian-or-ubuntu/

I hope this helps!

EDIT: please also consider upgrading to PVE 7 soon - as PVE 6 will soon be EOL
 
I have a problem : when I execute ping smtp.gmail.com the server does not respond. I have seen the firewall files and no rules block the port 587.
Any idea ??
Regards
Gorka
 
I have a problem : when I execute ping smtp.gmail.com the server does not respond.
maybe it's a DNS issue - check the contents of your /etc/resolv.conf - it needs to have a working DNS server listed

I hope this helps!
 

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!