Hello,
I am using Proxmox VE 7.1-12 on my main workstation which I start and shutdown daily.
I have configured postfix to forward local email to a smarthost as explained in this tutorial and confirmed that it does work, but I noticed that I never get the email after boot.
This is the syslog during all recent boots:
This is the syslog after running
The internet connection is always available and the SMTP smarthost is indeed up, but for some reason I always get
But that's not the main problem: I inspected the source for pvemailforward and it's clear that the script only ever returns success, therefore postfix always considers the message as successfully sent and removes it from the queue, without the message ever actually getting sent.
Why not just return an error value and let the postfix queue handle any successive retry?
Running
Thanks
I am using Proxmox VE 7.1-12 on my main workstation which I start and shutdown daily.
I have configured postfix to forward local email to a smarthost as explained in this tutorial and confirmed that it does work, but I noticed that I never get the email after boot.
This is the syslog during all recent boots:
Code:
May 02 18:55:18 pc-pve postfix/pickup[1442]: 9A8D14C0FC3: uid=0 from=<root>
May 02 18:55:18 pc-pve postfix/cleanup[1445]: 9A8D14C0FC3: message-id=<20220502165518.9A8D14C0FC3@pc-pve.lan>
May 02 18:55:18 pc-pve postfix/qmgr[1443]: 9A8D14C0FC3: from=<root@pc-pve.lan>, size=1001, nrcpt=1 (queue active)
[...]
May 02 18:55:18 pc-pve pvemailforward[1448]: mail forward failed: Connection refused
May 02 18:55:18 pc-pve postfix/local[1447]: 9A8D14C0FC3: to=<root@pc-pve.lan>, orig_to=<root>, relay=local, delay=0.62, delays=0.44/0.01/0/0.17, dsn=2.0.0, status=sent (delivered to command: /usr/bin/pvemailforward)
May 02 18:55:18 pc-pve postfix/qmgr[1443]: 9A8D14C0FC3: removed
This is the syslog after running
echo "test" | pvemailforward
via shell:
Code:
May 02 20:36:25 pc-pve pvemailforward[19296]: forward mail to <redacted@mail.com>
May 02 20:36:25 pc-pve postfix/pickup[19117]: B96F84C1002: uid=0 from=<root>
May 02 20:36:25 pc-pve postfix/cleanup[19299]: B96F84C1002: message-id=<20220502183625.B96F84C1002@pc-pve.lan>
May 02 20:36:25 pc-pve postfix/qmgr[1443]: B96F84C1002: from=<root@pc-pve.lan>, size=244, nrcpt=1 (queue active)
May 02 20:36:26 pc-pve postfix/smtp[19301]: B96F84C1002: to=<redacted@mail.com>, relay=smtp-relay.sendinblue.com[185.107.232.248]:587, delay=0.46, delays=0.01/0.01/0.31/0.14, dsn=2.0.0, status=sent (250 Message queued as <20220502183625.B96F84C1002@pc-pve.lan>)
May 02 20:36:26 pc-pve postfix/qmgr[1443]: B96F84C1002: removed
The internet connection is always available and the SMTP smarthost is indeed up, but for some reason I always get
Connection refused
.But that's not the main problem: I inspected the source for pvemailforward and it's clear that the script only ever returns success, therefore postfix always considers the message as successfully sent and removes it from the queue, without the message ever actually getting sent.
Why not just return an error value and let the postfix queue handle any successive retry?
Running
mail
as root in a shell yields No mail for root
, so those messages are effectively lost.Thanks