Configuration for mail in PVE1.4

nick

Renowned Member
Mar 28, 2007
364
1
83
Hi All,

I install PVE1.4 - clean install - and I configure backup jobs; after job complete I receive a mail from "root@servername.mydomain.com".
The Postfix it's configurate to send all mails via Proxmox Mail Gateway and from there is redirected to a Zimbra Server.

Because servername.mydomain.com it's not defined in company DNS, zimbra server reject the emails received from "root@servername.mydomain.com" with error:

Code:
host mail.XXXXXX.XXXX[xxx.xxx.xxx.xxx] said: 501 5.5.4 Syntax
      error in sender address (in reply to MAIL FROM command)

The other 2 PVE servers (updated to 1.4 - installed many time ago) are send mail from address root@mydomain.com.

How I can solve this problem? I'm not sure if I make changes on previous PVE instalations...I don't remember :rolleyes:
 
the sollution for me in this moment is (in main.conf):

mydomain = ourdomain.com
masquerade_domains = $mydomain

ALL OTHER SETTINGS FROM MAIN.CONF WAS COPY FROM THE OTHER PVE.

OLDER PVE main.conf

Code:
smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
biff = no

# appending .domain is the MUA's job.
append_dot_mydomain = no

# Uncomment the next line to generate "delayed mail" warnings
#delay_warning_time = 4h

# TLS parameters
smtpd_tls_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem
smtpd_tls_key_file=/etc/ssl/private/ssl-cert-snakeoil.key
smtpd_use_tls=yes
smtpd_tls_session_cache_database = btree:${queue_directory}/smtpd_scache
smtp_tls_session_cache_database = btree:${queue_directory}/smtp_scache

# See /usr/share/doc/postfix/TLS_README.gz in the postfix-doc package for
# information on enabling SSL in the smtp client.

myhostname = localhost
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
mydestination = localhost, localhost.localdomain, , localhost
relayhost = 172.17.100.252:26
mynetworks = 127.0.0.0/8
mailbox_command = procmail -a "$EXTENSION"
mailbox_size_limit = 0
recipient_delimiter = +

myorigin = xxxxxxxxx.com

mydomain = xxxxxxxx.com
masquerade_domains = $mydomain
Clean PVE 1.4 main.conf

Code:
# See /usr/share/postfix/main.cf.dist for a commented, more complete version

#smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
#biff = no

# appending .domain is the MUA's job.
#append_dot_mydomain = no

# Uncomment the next line to generate "delayed mail" warnings
#delay_warning_time = 4h

#alias_maps = hash:/etc/aliases
#alias_database = hash:/etc/aliases
#mydestination = $myhostname, localhost.$mydomain, localhost
#relayhost = 172.17.100.252:26
#mynetworks = 127.0.0.0/8
#inet_interfaces = loopback-only
#recipient_delimiter = +

# See /usr/share/postfix/main.cf.dist for a commented, more complete version


# Debian specific:  Specifying a file name will cause the first
# line of that file to be used as the name.  The Debian default
# is /etc/mailname.
#myorigin = /etc/mailname
 
After installing WebMin
Code:
wget [URL]http://downloads.sourceforge.net/project/webadmin/webmin/1.490/webmin_1.490_all.deb?use_mirror=biznetnetworks[/URL]
apt-get install libio-pty-perl libmd5-perl
dpkg --install webmin_1.490_all.deb
and configuring mail from within webmin at
https://ip-address-of-proxmox-server:10000
I get the following in /etc/postfix/mail.rc
Code:
# See /usr/share/postfix/main.cf.dist for a commented, more complete version
myhostname = localhost
smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
biff = no
# appending .domain is the MUA's job.
append_dot_mydomain = no
# Uncomment the next line to generate "delayed mail" warnings
#delay_warning_time = 4h
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
inet_interfaces = loopback-only
recipient_delimiter = +
mynetworks = 127.0.0.1/8
 
do not work to access mail from outside the HN (Hardware node).

Pease check DNS settings! Normal, when you try to send a mail DIRECT via internet, your PVE env will check MX settings regarding your DNS configuration. If you have your own DNS, specify to postfix where is your mail server.

Otherwise, if you can not send mails outside...check firewall settings...or post some messages from postfix logs.

As you can see, I chose to send mails from my network ONLY trough PMG...al other servers al BLOCKED (that's why I redirect the servers to the PMG) - to prevent SPAM sendig from clients...never know :D
 
I only see a /etc/postfix/main.cf file - there is no main.conf file in the /etc/postfix folder.

# cat /etc/postfix/main.cf
# See /usr/share/postfix/main.cf.dist for a commented, more complete version
myhostname = localhost
smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
biff = no
# appending .domain is the MUA's job.
append_dot_mydomain = no
# Uncomment the next line to generate "delayed mail" warnings
#delay_warning_time = 4h
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
#mydestination = $myhostname, localhost.$mydomain, localhost
#relayhost = 172.17.100.252:26
inet_interfaces = loopback-only
recipient_delimiter = +
mynetworks = 127.0.0.1/8

# See /usr/share/postfix/main.cf.dist for a commented, more complete version
# Debian specific: Specifying a file name will cause the first
# line of that file to be used as the name. The Debian default
# is /etc/mailname.
 

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!