[SOLVED] Email Send from address wrong

websmith

Member
May 18, 2022
17
2
8
Hi,

I have a proxmox server with the hostname: pve3.root.dom

But every time it sends mails it sends as: root@pve2.root.dom

So it seems like its confused - and an example is:
Code:
Feb 23 17:28:53 pve3 postfix/cleanup[2728343]: 851C84223E: message-id=<20230223162853.851C84223E@pve2.root.dom>
Feb 23 17:28:53 pve3 postfix/qmgr[211984]: 851C84223E: from=<root@pve2.root.dom>, size=396, nrcpt=1 (queue active)
Feb 23 17:28:54 pve3 postfix/smtp[2728345]: 851C84223E: to=<bjornsmith@gmail.com>, relay=gmail-smtp-in.l.google.com[142.250.27.26]:25, delay=0.49, delays=0.04/0.02/0.26/0.17, dsn=2.0.0, status=sent (250 2.0.0 OK  1677169734 cm20-20020a170907939400b008cd525eac74si14765619ejc.836 - gsmtp)
Feb 23 17:28:54 pve3 postfix/qmgr[211984]: 851C84223E: removed

/etc/hostname is pve3
Code:
root@pve3:~# cat /etc/hostname
pve3

 cat /etc/hosts
127.0.0.1 localhost.localdomain localhost
192.168.2.176 pve3.root.dom pve3

The ip address the host has resolves to pve3.root.dom - the ip address for pve2.root.dom resolves to something entirely different.

The cluster setting seems to be correct:
1677170341306.png

So what setting am I missing?

I have checked
/etc/aliases
/etc/crontab

Executing pvereport shows the hostname as pve3

Somewhere I must have done a mistake - and pve thinks its called pve2.root.dom.

Thanks in advance for any hints.

EDIT: Found it in /etc/postfix/main.cf

myhostname=pve2.root.dom

Not sure how that got in there - and fixing it, resolved my issue.

It would be awesome if somehow this config was kept up to date with the pve config.
 
Last edited:
Hi,
Not sure how that got in there - and fixing it, resolved my issue.
Did you rename that node's hostname once manually? Our wiki for that mentions the postfix config too:
https://pve.proxmox.com/wiki/Renaming_a_PVE_node
It would be awesome if somehow this config was kept up to date with the pve config.

Hmm, while I get where you come from, just automatically setting that to the hostname on boot or so might anger those depending on it to be different quite a bit, so we'd like to avoid that.

FYI: you can mark this thread a solved by using the Edit Thread Button at the top right to set the "solved" prefix.