LXC + Postfix (Ubuntu 20.04) - Localdomain

Apr 15, 2022
1
0
1
Hi everyone,

After a long time of research....i have a problem with configuration of postfix in LXC (Ubuntu 20.04 Proxmox Template). My server send email with "myhostname.localdomain" instead of "myhostname.mydomain.com".

Configuration :
Code:
/etc/hosts

127.0.0.1       localhost
127.0.1.1       id1546.mydomain.com id1546
::1             localhost ip6-localhost ip6-loopback
ff02::1         ip6-allnodes
ff02::2         ip6-allrouters
# --- BEGIN PVE ---
172.18.100.233 id1546.mydomain.com id1546
# --- END PVE ---

Code:
/etc/hostname

id1546

Code:
/etc/postfix/main.cf

# 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 =
mynetworks = 127.0.0.0/8
inet_interfaces = all
recipient_delimiter = +

compatibility_level = 2

myhostname = id1546.mydomain.com
mydomain = id1546.mydomain.com

When i execute "postconf -d" the result part of myhostname and mydomain are :

Code:
mydomain = localdomain
myhostname = id1546.localdomain

I have create two files : .pve-ignore.hosts and .pve-ignore.hostname, but the problem is not solved.

So, when my server send an email, the helo is : helo=id1546.localdomain, instead of id1546.mydomain.com.

Any ideas ?

Thanks !
 

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!