pfSense - mailreport - authentication failure
-
Hello,
I use pfSense 23.05.1-RELEASE and mailreport 3.6.4_1 package.
I first configured SMTP (System | Advanced | Notifications). The use of this SMTP requires authentication. The test included in the pfSense configuration works, the mail is sent and received.
However, using Email Report the mail is not received. The SMTP error is: "SASL CRAM-MD5 authentication failed: authentication failure".It's possible that there's an error in the configuration of my SMTP (postfix), but why then does the test mail work? What's different with the Email Report?
Thanks for your ideas.
-
Edit 2023-11-15 09:53
It works by forcing the mail->Username variable in the mail_report.inc code with the username value, without quote. With quote, I get an authentication failure, which seems to be the problem. -
@lc63
Edit 2023-11-16 11:31Error fixed. In my postfix, the authentication mechanisms was : CRAM-MD5 DIGEST-MD5 LOGIN PLAIN. Normally, authentication is supposed to use these methods. But it seems we have to reduce them to LOGIN and PLAIN with mailreport.
Since authentication works with the test mail in the pfSence SMTP configuration, I'm not sure whether mailreport uses the mechanism indicated in this configuration.
-
@lc63 said in pfSense - mailreport - authentication failure:
I'm not sure whether mailreport uses the mechanism indicated in this configuration.
I had a look : it doesn't.
it uses the good old PHPMailer PHP class.
The build-in pfSense mail facilities are completely bypassed.edit : the test mail report also says :
X-Mailer: PHPMailer 6.6.4 (https://github.com/PHPMailer/PHPMailerIt does 'borrow' the smtp host, user, password etc from the
Btw : by default, the Authtype paramter is empty, so it will match these in this order :
'CRAM-MD5', 'LOGIN', 'PLAIN', 'XOAUTH2'
which means that CRAM-MD5 is tried first .....
I'm using postfix with 'sasl' myself
root@ns311465:~# cat /etc/postfix/sasl/smtpd.conf
pwcheck_method: saslauthd mech_list: PLAIN LOGIN log_level: 1 saslauthd_path: /var/run/saslauthd/mux saslauthd_version: 2
-
@Gertjan
Thank you for this clarification!