• Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Search
  • Register
  • Login
Netgate Discussion Forum
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Search
  • Register
  • Login

pfSense - mailreport - authentication failure

Scheduled Pinned Locked Moved pfSense Packages
5 Posts 2 Posters 930 Views
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • L
    lc63
    last edited by lc63 Nov 14, 2023, 3:43 PM Nov 14, 2023, 3:39 PM

    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.

    L 1 Reply Last reply Nov 15, 2023, 8:56 AM Reply Quote 0
    • L
      lc63 @lc63
      last edited by Nov 15, 2023, 8:56 AM

      @lc63

      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.

      L 1 Reply Last reply Nov 16, 2023, 10:33 AM Reply Quote 0
      • L
        lc63 @lc63
        last edited by lc63 Nov 16, 2023, 10:55 AM Nov 16, 2023, 10:33 AM

        @lc63
        Edit 2023-11-16 11:31

        Error 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.

        G 1 Reply Last reply Nov 16, 2023, 1:16 PM Reply Quote 0
        • G
          Gertjan @lc63
          last edited by Nov 16, 2023, 1:16 PM

          @lc63

          @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.

          396f5328-7a3f-4e9d-aed2-e6eca9866ef5-image.png

          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/PHPMailer

          It does 'borrow' the smtp host, user, password etc from the

          994d75db-9a73-48d2-8039-ab63da2b5922-image.png

          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
          

          so it can only be "PLAIN LOGIN"

          No "help me" PM's please. Use the forum, the community will thank you.
          Edit : and where are the logs ??

          L 1 Reply Last reply Nov 16, 2023, 2:54 PM Reply Quote 1
          • L
            lc63 @Gertjan
            last edited by Nov 16, 2023, 2:54 PM

            @Gertjan
            Thank you for this clarification!

            1 Reply Last reply Reply Quote 0
            5 out of 5
            • First post
              5/5
              Last post
            Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.
              This community forum collects and processes your personal information.
              consent.not_received