Can't Get Postfix/Courier Working

Discussion in 'HOWTO-Related Questions' started by lampaddict, Feb 23, 2007.

  1. lampaddict

    lampaddict New Member

    I have really come to HATE Postfix and Courier. This has been the most frustrating ordeal I've ever gone through.

    I have followed the tutorial http://www.howtoforge.com/virtual_postfix_mysql_quota_courier to the letter, several times over, and have yet to get this working. No matter what I do, I am unable to send/receive mail through my client (tried both Evolution Mail and Kontact - and tried every possible setting in both). All I get is an error stating that my login failed.

    Can someone PLEASE help me figure this out so that I can get my email working. I'd appreciate any help I can get on this issue.

    Thanks
    Sean
     
  2. martinfst

    martinfst ISPConfig Developer ISPConfig Developer

    If you want help, please help us by providing more info. :)
    I understand your frustration, but we can't help without specific error codes (log files !) and what your trying to do that fails.

    Could you please help us?
     
  3. lampaddict

    lampaddict New Member

    Well, I'm not sure what more I can offer. When I try to use a client program, such as Evolution or Kontact, to send or receive email, all I get is the login window telling me that my login was incorrect (though it isn't). I've tried nearly everything I can think of, but it just doesn't work.

    If you tell me what log file will be helpful, I'll post it. The only entries that I can see which may be related are as follows:

    auth.log
    Code:
    Feb 22 22:26:26 dns1 saslauthd[31824]: pam_mysql - SELECT returned no result.
    Feb 22 22:26:26 dns1 saslauthd[31824]: DEBUG: auth_pam: pam_authenticate failed: User not known to the underlying authentication module
    Feb 22 22:26:26 dns1 saslauthd[31824]: do_auth         : auth failure: [user=sean] [service=smtp] [realm=] [mech=pam] [reason=PAM auth error]
    Feb 22 22:27:59 dns1 saslauthd[31825]: pam_mysql - SELECT returned no result.
    Feb 22 22:27:59 dns1 saslauthd[31825]: DEBUG: auth_pam: pam_authenticate failed: User not known to the underlying authentication module
    Feb 22 22:27:59 dns1 saslauthd[31825]: do_auth         : auth failure: [user=sean] [service=smtp] [realm=] [mech=pam] [reason=PAM auth error]
    Feb 22 22:28:53 dns1 saslauthd[31824]: pam_mysql - SELECT returned no result.
    Feb 22 22:28:53 dns1 saslauthd[31824]: DEBUG: auth_pam: pam_authenticate failed: User not known to the underlying authentication module
    Feb 22 22:28:53 dns1 saslauthd[31824]: do_auth         : auth failure: [user=sean] [service=smtp] [realm=] [mech=pam] [reason=PAM auth error]
    
    mail.log
    Code:
    Feb 22 23:56:04 dns1 postfix/virtual[11622]: 884E12202455: to=<sean [at ] lamp******.com>, relay=virtual, delay=0.13, delays=0.09/0.02/0/0.02, dsn=2.0.0, status=s$
    Feb 22 23:56:04 dns1 postfix/qmgr[3480]: 884E12202455: removed
    Feb 22 23:59:04 dns1 imapd: Connection, ip=[::ffff:24.17.104.248]
    Feb 22 23:59:04 dns1 imapd: LOGIN FAILED, user=sean, ip=[::ffff:24.17.104.248]
    
    But again, the username and password I am using are fine, so I can't understand what is going on. Also, I followed the instructions in the tutorial to the letter, so things should be setup correctly.

    I've yet to be able to get Postfix/Courier working using ANY tutorial. I'm extremely frustrated (been at this for three days) and am considering trying Sendmail and/or Dovecot.

    Hopefully someone can help me get this figured out, I hate it when things don't work and it's even more upsetting because I'm too stubborn to just walk away, lol.

    Sean
     
    Last edited: Feb 23, 2007
  4. martinfst

    martinfst ISPConfig Developer ISPConfig Developer

    Your auth.log indicates the problem. For some reason the user sean does not exit in the database. I'm not familiar with this tutorial, but how are users storedin the database table? As 'sean' or as 'sean at userdomain.com'. Maybe you need to change the select statement in the authentication module or need to add the user to the table. HTH
     
    Last edited: Feb 23, 2007
  5. lampaddict

    lampaddict New Member

    The user is stored as "sean [at ] lamp******.com" in the database which is how I perceived things needed to be in reading the tutorial. I could be wrong, but I can try changing this to see if it works. Though, I should note that I did try entering in sean [at ] lamp******.com in both clients and that failed as well.

    Sean
     
    Last edited: Feb 23, 2007
  6. martinfst

    martinfst ISPConfig Developer ISPConfig Developer

    In the table "sean at userdomain.com" is stored.
    The the select statement seem to look for "sean".

    That's why you cannot authenticate as the users does not match. I'd recheck the select statement auth_pam_mysql : /etc/courier/authmysqlrc
     
    Last edited: Feb 23, 2007
  7. lampaddict

    lampaddict New Member

    Well, you were right. The server was looking for the full email address. The weird thing here is that I DID in fact try using the full email in both clients, but it still didn't work; why it's all working now is a mystery.

    I did go back and re-do a few things, but nothing major. I'll need to investigate this further and see what I did. I'll be sure to post back here when I get it figured out, it seems others are having the same issues I had, so hopefully the suggestions you've made (and the hacks/edits that I did, when I figure out which ones did the trick) will help others.

    Would you be so kind as to edit two of your posts and just mask the email address for me (I didn't think of this last night) so spammers don't grab it.

    Thanks again for your help, I really appreciate it. Your response was both rapid and informative, and you were very patient. Now, if you could possible bottle your knowledge up into a nice energy drink, that would be nice as well, lol.

    Sean
     

Share This Page