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 931 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

      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 Reply Quote 0
      • L
        lc63 @lc63
        last edited by

        @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 Reply Quote 0
        • L
          lc63 @lc63
          last edited by lc63

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

          GertjanG 1 Reply Last reply Reply Quote 0
          • GertjanG
            Gertjan @lc63
            last edited by

            @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 Reply Quote 1
            • L
              lc63 @Gertjan
              last edited by

              @Gertjan
              Thank you for this clarification!

              1 Reply Last reply Reply Quote 0
              • First post
                Last post
              Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.