Postfix not working = where are the logs?

hendr1x

Member
Dec 14, 2019
28
0
21
41
Hello everyone,
I am trying to setup postfix to send me system emails via gmail exchange. I've had this setup without issue on proxmox 7. I am now running proxmox 8 fully updated. I set everything up. Unfortunateyl the following two commands (using proper email addresses) do not work.

```
sendmail test@test.com
From: test@test2.com
Subject: Test mail
This is a test email
.
```
```
echo "This is a test email2." | mail -s "Test email2" test@test.com
```


```
journalctl -u postfix

-- Boot 12a285c51049476fbc0a8f4da707a765 --
Aug 28 21:20:43 aeolus systemd[1]: Starting postfix.service - Postfix Mail Transport Agent...
Aug 28 21:20:43 aeolus systemd[1]: Finished postfix.service - Postfix Mail Transport Agent.
Aug 28 21:30:12 aeolus systemd[1]: postfix.service: Deactivated successfully.
Aug 28 21:30:12 aeolus systemd[1]: Stopped postfix.service - Postfix Mail Transport Agent.
Aug 28 21:30:12 aeolus systemd[1]: Stopping postfix.service - Postfix Mail Transport Agent...
Aug 28 21:30:12 aeolus systemd[1]: Starting postfix.service - Postfix Mail Transport Agent...
Aug 28 21:30:12 aeolus systemd[1]: Finished postfix.service - Postfix Mail Transport Agent.
```


My system does not have /var/log/mail* and does not have /var/log/syslog

I have no idea how to get more information to help with this issue. Can someone please help me find the proper logged information so I can debug?

Thank you.
 
My system does not have /var/log/mail* and does not have /var/log/syslog

With PVE 8/Debian 12 bookworm `rsyslog` is not installed by default anymore (you can optionally still install it and would get the logs in /var/log/mail.log and /var/log/syslog afaict.

journalctl -u postfix
I think the issue here is that you're looking only at the postfix unit - from a small container:
Code:
systemctl -a |grep postfix
  postfix-resolvconf.path                                           loaded    active   waiting   Watch for resolv.conf updates and restart postfix
  postfix-resolvconf.service                                        loaded    inactive dead      Copies updated resolv.conf to postfix chroot and restarts postfix.
* postfix.service                                                   masked    inactive dead      postfix.service
  postfix@-.service                                                 loaded    inactive dead      Postfix Mail Transport Agent (instance -)
  system-postfix.slice                                              loaded    inactive dead      Slice /system/postfix
I do get most postfix logs with `journalctl -u postfix@-.service` (but would suggest in general to look through the complete journal, because the issue might be somewhere else entirely `journalctl --since today` for example)

I hope this helps!
 
I am trying to setup this as well.

Looks like postfix is utterly broken on proxmox 8 (debian 12)

see:
Code:
Oct 23 19:09:06 proxmox-bl postfix/qmgr[45140]: warning: private/smtp socket: malformed response
Oct 23 19:09:06 proxmox-bl postfix/qmgr[45140]: warning: transport smtp failure -- see a previous warning/fatal/panic logfile record for the problem description
Oct 23 19:09:06 proxmox-bl postfix/master[45138]: warning: process /usr/lib/postfix/sbin/smtp pid 45194 killed by signal 11
Oct 23 19:09:06 proxmox-bl postfix/master[45138]: warning: /usr/lib/postfix/sbin/smtp: bad command startup -- throttling

the smtp daemon crashes on SASL transport !

did you get this working ?
 
did you get this working ?

You likely don't have rsyslog installed.

apt install rsyslog

I was able to find what I needed via ‘journalctl -u postfix’.

That let me learn that I was having an issue with how credentials were handled
 
Last edited:
Looks like postfix is utterly broken on proxmox 8 (debian 12)
works here in the default config - did you modify the configuration - and if yes how?
could your provide some more context from the journal?
 
You likely don't have rsyslog installed.

apt install rsyslog

I was able to find what I needed via ‘journalctl -u postfix’.

That let me learn that I was having an issue with how credentials were handled
I have full logging enabled through:

maillog_file = /var/log/postfix.log

Are you running a TLS session ?
 
works here in the default config - did you modify the configuration - and if yes how?
could your provide some more context from the journal?
It's needed to run a TLS session to relay smtp to smtp.gmail.com:587

using an app password on Google.
 
Last edited:
Code:
Oct 24 13:12:33 proxmox-bl postfix/smtp[3070]: starting new SASL client
Oct 24 13:12:33 proxmox-bl postfix/smtp[3070]: name_mask: noanonymous
Oct 24 13:12:33 proxmox-bl postfix/smtp[3070]: smtp_sasl_authenticate: smtp.gmail.com[142.250.102.109]:587: SASL mechanisms LOGIN PLAIN XOAUTH2 PLAIN-CLIENTTOKEN OAUTHBEARER XOAUTH
Oct 24 13:12:33 proxmox-bl postfix/smtp[3070]: xsasl_cyrus_client_get_user: myemail@gmail.com
Oct 24 13:12:34 proxmox-bl postfix/qmgr[1268]: warning: private/smtp socket: malformed response
Oct 24 13:12:34 proxmox-bl postfix/qmgr[1268]: warning: transport smtp failure -- see a previous warning/fatal/panic logfile record for the problem description
Oct 24 13:12:34 proxmox-bl postfix/master[1266]: warning: process /usr/lib/postfix/sbin/smtp pid 3070 killed by signal 11
Oct 24 13:12:34 proxmox-bl postfix/master[1266]: warning: /usr/lib/postfix/sbin/smtp: bad command startup -- throttling

Looks like the TLS authentication is failing.
Any ideas?

Answering my own question:

adding following to /etc/postfix/main.cf solved the problem:
Code:
smtp_sasl_mechanism_filter = login

Is a bug: https://github.com/cyrusimap/cyrus-sasl/issues/511

it forces the sasl client to use login io xauth to authenticate

hope this helps someone...
 
Last edited:
  • Like
Reactions: BruceX and MG-X