Postfix user/password validation

Discussion in 'HOWTO-Related Questions' started by counterpoint, Jul 31, 2011.

  1. counterpoint

    counterpoint New Member

    Following various "how to" articles here and elsewhere, I've been building a mail server. The information about domains and users is held in MySQL. Courier uses the user and password information to handle logins.

    However, I cannot figure out how to deal with Postfix user/password validation. When a mail client is configured to use an SMTP server to relay, it is nowadays normal to enter a username and password. But my server is rejecting passwords.

    This isn't altogether surprising since none of the Postfix related .cf files I've seen has any mention of passwords.

    Am I on the wrong track? What needs to be done to configure the server to accept user names and passwords and to permit relaying to users who provide valid credentials?
     
  2. falko

    falko Super Moderator Howtoforge Staff

    What tutorial (URL) did you use to set up the server?

    Are there any errors in your mail log?
     
  3. counterpoint

    counterpoint New Member

    Creation of the basic system used my own standard procedures for working with a XEN VPS that has Debian Squeeze installed from an image provided by the host. Then the procedures in http://www.howtoforge.com/perfect-server-debian-squeeze-ispconfig-2 were largely followed. DNS was not installed because not required, likewise proftpd and webalizer. Quota was not installed because not currently required. NTP sync not installed because it does not work correctly in a XEN VPS. MySQL was installed using my own standard procedures. Postfix and Courier were installed precisely following the "how to". Apache etc installed exactly in accordance with the "how to".

    Then ViMbAdmin was installed from subversion (https://code.google.com/p/vimbadmin/wiki/InstallUsingSubversion) to provide a user friendly admin interface for mail (ISPconfig would be overkill for the application). This has limited documentation and refers to Postfix Admin for the integration of the database tables with the mail software. So I used http://sourceforge.net/apps/mediawiki/postfixadmin/index.php?title=Courier_configuration for guidance and then turned to http://www.howtoforge.com/virtual-u...courier-mysql-and-squirrelmail-debian-squeeze but adapted the instructions for the table and field names used in ViMbAdmin.

    After an attempt to send mail using the server as the relay, and giving a user name and password that are in the database, the mail log shows:

    Aug 1 15:59:01 mail postfix/smtpd[24139]: warning: SASL authentication failure: Password verification failed
    Aug 1 15:59:01 mail postfix/smtpd[24139]: warning: host217-?-?-?.in-addr.btopenworld.com[217.?.?.?]: SASL PLAIN authentication failed: authentication failure
    Aug 1 15:59:03 mail postfix/smtpd[24139]: warning: host217-?-?-?.in-addr.btopenworld.com[217.?.?.?]: SASL LOGIN authentication failed: authentication failure

    (IP address details removed for security)
     
  4. counterpoint

    counterpoint New Member

    Well, I got this part of my mail server working in the end.

    What wasn't at all clear to me when the question was raised was that it is possible to have Postfix use Courier to carry out authorisation via SASL. This takes some fairly tricky configuration. This seems the neatest way to build a SQL based system where both Postfix and Courier are in use.

    I'd probably still be stuck without the helpful post at http://www.brandonchecketts.com/arc...-sasl-to-authenticate-against-courier-authlib
     

Share This Page