Postfix and SMTP authentication failure

Discussion in 'Server Operation' started by xGattoMattox, May 24, 2009.

  1. xGattoMattox

    xGattoMattox New Member

    Hello everyone.
    I've decided to write this post after a week of headbanging agains my room's wall trying to make my postfix work. I've followed basically each guide i've found around... but i have a big problem.

    My server is an Ubuntu 8.04, and i've istalled succesfully Postfix, Postfix-mysql, Courier, amavis-new and greylist. I've configurated succesfully posftix to use tables stored in my mysql server, succesfully created my 3 virtual domains and one user for each virtual domain.

    Then i've configured Courier to authenticate to mysql too and it's working (i'm able to connect my thunderbird client to my mail server via imap and download my mail).

    So it seems that the "receive" part of my server is working fine. The problem comes when i try to SEND mail using my server as smtp server. It won't authenticate me. No way. I've tried to configure SASL to use courier-authdaemond (i've though that if it's authenticating for receiving... it could function to send too...) but... here comes the problem. It won't authenticate me.

    If i try to "testsaslauthd" i get the following error in auth.log:

    May 24 19:19:22 r23513 saslauthd[28263]: DEBUG: auth_pam: pam_authenticate failed: User not known to the underlying authentication module
    May 24 19:19:22 r23513 saslauthd[28263]: do_auth : auth failure: [service=imap] [realm=] [mech=pam] [reason=PAM auth error]

    Obviously the "[email protected]" is not the real value that i have in the log :p Otherwhise when i try to send mail "normally" from my client.. on auth.log i see those:

    May 24 20:14:09 r23513 postfix/smtpd[30997]: sql_select option missing
    May 24 20:14:09 r23513 postfix/smtpd[30997]: auxpropfunc error no mechanism available
    May 24 20:14:10 r23513 postfix/smtpd[30997]: _sasl_plugin_load failed on sasl_auxprop_plug_init for plugin: sql
    May 24 20:14:13 r23513 postfix/smtpd[30997]: NTLM server step 1
    May 24 20:14:13 r23513 postfix/smtpd[30997]: client flags: ffff8207
    May 24 20:14:13 r23513 postfix/smtpd[30997]: NTLM server step 2


    That sounds to me really strange because i didn't configure the smtpd.conf to use auxprop-mysql plugin. My smtpd.conf file (copied in both /etc/postfix/sasl and /usr/lib/sasl2) contains the following:

    saslauthd_path: /var/run/saslauthd
    pwcheck_method: authdaemond
    authdaemon_path: /var/run/courier/authdaemon/socket
    mech_list: plain login
    log_level: 5

    It's a week that i'm googling trying to find out it's not working and i still don't have an answer :( I repeat: all the "receive" part is working, amavis-new and greylist are working too.... only the smtp authentication is giving me this problem.

    Hope that someone can help me.
    Thanx in advance

    Ps: sorry for my english :(
     
    Last edited: May 24, 2009
  2. falko

    falko Super Moderator Howtoforge Staff

    Which guide (URL) did you use to set up the system?
     
  3. xGattoMattox

    xGattoMattox New Member

    Hi Falko,
    to configure the smtpd.conf i've used the directive contained in sasl's home page (i'll post the link later.. i'm at work up to now). For Postfix and Courier (with mysql) i've looked also (and compared settings with others) at the Virtual Users And Domains With Postfix, Courier, MySQL And SquirrelMail (Ubuntu 8.04 LTS) guide on this site.

    The problem is that i don't know how to debug saslauthd to see where it's giving problem... so if i'm missing something or doing something wrong... :(
     
  4. xGattoMattox

    xGattoMattox New Member

  5. falko

    falko Super Moderator Howtoforge Staff

    The "Virtual Users And Domains With Postfix, Courier, MySQL And SquirrelMail (Ubuntu 8.04 LTS)" guide should be all you need - please don't mix it with other guides.
     
  6. xGattoMattox

    xGattoMattox New Member

    Hi Falko.
    I've checked again and again the part regarding the sasl configuration but it keep giving me the same error message that i've copied in the first post.

    Do you know if there is a way to debug saslauthd to understand where thos error is generated ?
     
  7. xGattoMattox

    xGattoMattox New Member

    Hi All.
    It's still NOT authenticathing but i've found a "curious" stuff.

    I've already told about the issue with testsaslauthd.. after a little testing i've seen that if i pass to the testsaslauthd the -f parameter (giving him the correct mux path the testsaslauthd SUCCESS !

    Could that depend on some issues on chroot ?|?
     

Share This Page