Virtual Users And Domains With Postfix, Courier And MySQL with smtp-auth

Discussion in 'HOWTO-Related Questions' started by qtx, Oct 3, 2006.

  1. qtx

    qtx New Member

    I did follow the tutorial and all the discussions about the topic, but somehow I am stuck :mad:

    Everything works just fine, the only thing that doesn't work is sending emails via Thunderbird! SMTP-Auth is selected and configured.

    When I test my setup with telnet I get the right response:

    250-mail.xxx.com
    250-PIPELINING
    250-SIZE 10240000
    250-VRFY
    250-ETRN
    250-STARTTLS
    250-AUTH LOGIN PLAIN
    250-AUTH=LOGIN PLAIN
    250 8BITMIME


    My mail.warn-Log says:
    Code:
    Oct  2 17:58:33 localhost postfix/smtpd[27775]: warning: xx-x-xxx-xx.xx.xx.xx[xx.xx.xx.xx]: SASL LOGIN authentication failed
    Testing saslauthd failes:
    Code:
    #testsaslauthd -u xx@xx.xx -p xxx -f /var/spool/postfix/var/run/saslauthd/mux
    #0: NO "authentication failed"
    when I try w/o the socket path:
    Code:
    #testsaslauthd -u xx@xx.xx -p xxx
    #connect() : No such file or directory
    I checked the config files over and over again.

    Do you have a clue, where I might find the answer?

    Thanks for your efforts and replies!
    Cheers
    QT
     
  2. grasomega

    grasomega Member

    Did you created the following folder:

    Code:
    mkdir -p /var/spool/postfix/var/run/saslauthd
    ?

    grasomega
     
  3. qtx

    qtx New Member

    Yes, I did!

    Code:
    server:/var/spool/postfix/var/run/saslauthd# ls -al
    total 3
    drwxr-xr-x 2 root root 1024 Oct  3 10:57 .
    drwxr-xr-x 3 root root 1024 Aug 25 13:33 ..
    srwxrwxrwx 1 root root    0 Oct  2 17:41 mux
    -rw------- 1 root root    0 Oct  2 17:41 mux.accept
    -rw------- 1 root root    6 Oct  2 17:41 saslauthd.pid
     
  4. grasomega

    grasomega Member

    Maybe you need to check your password for typos.
    If everything is okay and it still fails, I'm kinda out of ideas...

    grasomega
     
  5. qtx

    qtx New Member

    I don't know how many times I checked the login information (on email client && mysql).
    I also created another user, the same occurs, I can pop mail but I cannot send.

    It's really weird.
    But somehow, there must be a problem with my saslauth, because the testsaslauthd does not work.

    Now I checked the auth.log (/var/log/auth.log), and this is what came out:
    Code:
    Oct  3 13:16:39 localhost saslauthd[11294]: (pam_unix) check pass; user unknown
    Oct  3 13:16:39 localhost saslauthd[11294]: (pam_unix) authentication failure; logname= uid=0 euid=0 tty= ruser= rhost=
    Oct  3 13:16:41 localhost saslauthd[11294]: DEBUG: auth_pam: pam_authenticate failed: User not known to the underlying authentication module
    Oct  3 13:16:41 localhost saslauthd[11294]: do_auth         : auth failure: [user=xx@xx.com] [service=imap] [realm=] [mech=pam] [reason=PAM auth error]
    Does this ring a bell?
    QT
     
  6. grasomega

    grasomega Member

    What about /etc/pam.d/smtp?

    Is it as per how-to?
    It should be:
    Code:
    auth    required   pam_mysql.so user=mail_admin passwd=[I]mail_admin_password[/I] host=127.0.0.1 db=mail table=users usercolumn=email passwdcolumn=password crypt=1
    account sufficient pam_mysql.so user=mail_admin passwd=[I]mail_admin_password [/I]host=127.0.0.1 db=mail table=users usercolumn=email passwdcolumn=password crypt=1
    
    grasomega
     
  7. qtx

    qtx New Member

    Yes, it's fine.

    But I found another problem:
    the libpam-mysql has not been found, so I installed this one again (it could not be found on my system :(.

    And now the 'auth.log' looks like this:
    Code:
    Oct  3 13:48:26 localhost saslauthd[26244]: pam_mysql - [B]SELECT returned no result[/B].
    Oct  3 13:48:26 localhost saslauthd[26244]: DEBUG: auth_pam: pam_authenticate failed: User not known to the underlying authentication module
    Oct  3 13:48:26 localhost saslauthd[26244]: do_auth         : auth failure: [user=xx] [service=smtp] [realm=xx.com] [mech=pam] [reason=PAM auth error]
    :confused:

    Any clues?
    QT
     
  8. qtx

    qtx New Member

    Ok. I solved the problem! :D

    I did apt-get for the corresponding files/libs and restarted everything.
    Now it works.
    No errors.

    grasomega, thanks for the hints!
    Sometimes one have to be pushed in the right direction :)

    Thanks.
    QT
     
  9. grasomega

    grasomega Member

    No problemo, but you did it all by yourself :)

    See ya,

    grasomega
     
  10. herbie

    herbie New Member

    I'm wondering if this is related to my problem:
     
  11. grasomega

    grasomega Member

    It could be related, the error log looks the same to me...
    If you are sure that you put the right password in every file in the tutorial, then make sure that you installed all the necessary packages.
    Please check the /etc/pam.d/smtp file.

    grasomega
     

Share This Page