Virtual Users And Domains With Postfix, Courier, MySQL And SquirrelMail

Discussion in 'HOWTO-Related Questions' started by garther, Jul 24, 2008.

  1. falko

    falko Super Moderator Howtoforge Staff

    Can you post your main.cf? http://www.howtoforge.com/virtual-users-domains-postfix-courier-mysql-squirrelmail-ubuntu8.04-p2 doesn't use the file mysql-aliases.cf.
     
  2. yelles

    yelles New Member

    Okey, did edit my main.cf correct now... i think. The error message now is only:

    Aug 7 21:16:18 Inleed-S1 imapd: Connection, ip=[::ffff:127.0.0.1]
    Aug 7 21:16:18 Inleed-S1 imapd: authdaemon: s_connect() failed: Connection refused
    Aug 7 21:16:18 Inleed-S1 imapd: [Hint: perhaps authdaemond is not running?]
    Aug 7 21:16:18 Inleed-S1 imapd: LOGIN FAILED, [email protected], ip=[::ffff:127.0.0.1]
    Aug 7 21:16:18 Inleed-S1 imapd: authentication error: Connection refused

    Any idea?

    Regards :D
     
  3. falko

    falko Super Moderator Howtoforge Staff

    Please try this:
    Code:
    /etc/init.d/courier-authdaemon restart
    /etc/init.d/courier-imap restart
    /etc/init.d/courier-imap-ssl restart
    /etc/init.d/courier-pop restart
    /etc/init.d/courier-pop-ssl restart
     
  4. yelles

    yelles New Member

    Hi,

    All restarts went well. But i still got the error in syslog:

    Aug 8 23:31:05 Inleed-S1 imapd: Connection, ip=[::ffff:127.0.0.1]
    Aug 8 23:31:05 Inleed-S1 imapd: authdaemon: s_connect() failed: Connection refused
    Aug 8 23:31:05 Inleed-S1 imapd: [Hint: perhaps authdaemond is not running?]
    Aug 8 23:31:05 Inleed-S1 imapd: LOGIN FAILED, [email protected], ip=[::ffff:127.0.0.1]
    Aug 8 23:31:05 Inleed-S1 imapd: authentication error: Connection refused

    :(
     
  5. falko

    falko Super Moderator Howtoforge Staff

    Do you get any errors when you run
    Code:
    /etc/init.d/courier-authdaemon restart
    ?
    What's the output of
    Code:
    ps aux
    ?
     
  6. yelles

    yelles New Member

    Yeah :S alots...

    Code:
    /etc/courier/authdaemonrc: line 1: MYSQL_SERVER: command not found
    /etc/courier/authdaemonrc: line 2: MYSQL_USERNAME: command not found
    /etc/courier/authdaemonrc: line 3: MYSQL_PASSWORD: command not found
    /etc/courier/authdaemonrc: line 4: MYSQL_PORT: command not found
    /etc/courier/authdaemonrc: line 5: MYSQL_DATABASE: command not found
    /etc/courier/authdaemonrc: line 6: MYSQL_USER_TABLE: command not found
    /etc/courier/authdaemonrc: line 7: MYSQL_CRYPT_PWFIELD: command not found
    /etc/courier/authdaemonrc: line 9: MYSQL_UID_FIELD: command not found
    /etc/courier/authdaemonrc: line 10: MYSQL_GID_FIELD: command not found
    /etc/courier/authdaemonrc: line 11: MYSQL_LOGIN_FIELD: command not found
    /etc/courier/authdaemonrc: line 12: MYSQL_HOME_FIELD: command not found
    /etc/courier/authdaemonrc: line 13: syntax error near unexpected token `('
    /etc/courier/authdaemonrc: line 13: `MYSQL_MAILDIR_FIELD CONCAT(SUBSTRING_INDEX(email,'@',-1),'/',SUBSTRING_INDEX(email,'@',1),'/')'
     
  7. falko

    falko Super Moderator Howtoforge Staff

    What's in /etc/courier/authdaemonrc?
     
  8. yelles

    yelles New Member

    I found this in that file:

    Code:
    MYSQL_SERVER localhost
    MYSQL_USERNAME mail_admin
    MYSQL_PASSWORD ********
    MYSQL_PORT 0
    MYSQL_DATABASE mail
    MYSQL_USER_TABLE users
    MYSQL_CRYPT_PWFIELD password
    #MYSQL_CLEAR_PWFIELD password
    MYSQL_UID_FIELD 5000
    MYSQL_GID_FIELD 5000
    MYSQL_LOGIN_FIELD email
    MYSQL_HOME_FIELD "/home/vmail"
    MYSQL_MAILDIR_FIELD CONCAT(SUBSTRING_INDEX(email,'@',-1),'/',SUBSTRING_INDEX(email,'@',1),'/')
    #MYSQL_NAME_FIELD
    MYSQL_QUOTA_FIELD quota
     
  9. falko

    falko Super Moderator Howtoforge Staff

  10. yelles

    yelles New Member

    Opps :D

    How should /etc/courier/authdaemonrc be completed with? Now i have only:

    authmodulelist="authmysql"

    But the guide says

    ...
    authmodulelist="authmysql"
    ...

    So what should be before and after

    authmodulelist="authmysql"


    Regards!
     
  11. falko

    falko Super Moderator Howtoforge Staff

    I don't have a sample /etc/courier/authdaemonrc file right now so I can't tell. But you could uninstall the Courier packages like this:
    Code:
    apt-get remove --purge courier-authdaemon courier-authlib-mysql courier-pop courier-pop-ssl courier-imap courier-imap-ssl
    and then install them again and do the Courier configuration again.
     
  12. yelles

    yelles New Member

    Okey, did what u said.

    Now when i check the log its only:

    Aug 12 21:50:47 Inleed-S1 imapd: Connection, ip=[::ffff:127.0.0.1]

    And still error message:

    ERROR: Connection dropped by IMAP server.
     
    Last edited: Aug 12, 2008
  13. falko

    falko Super Moderator Howtoforge Staff

    I think the best solution would be to set up the system from scratch again.
     
  14. yelles

    yelles New Member

    It must bee some i can do about this error. The feeling of doing it all again sucks :p
     
  15. falko

    falko Super Moderator Howtoforge Staff

    I think it will take far more time to find the error than to set up the system again...
     
  16. sharkbun

    sharkbun New Member

    Blank Page

    Hi, I am newbie to Linux. I have followed every step in the article but when I login as [email protected]. A blank page is returned in the browser.

    No idea what is going on? Can someone please help?

    Thanks.
     
  17. falko

    falko Super Moderator Howtoforge Staff

    You mean in Squirrelmail? Are there any errors in your logs?
     
  18. sharkbun

    sharkbun New Member

    Thanks for the reply.

    yes, I mean Squirrelmail. I have checked the mail.log and it only said user has logged in and then next line user has logged out. No errors at all.

    Hope this helps.

    Thanks.
     
  19. falko

    falko Super Moderator Howtoforge Staff

    Does this happen in different browsers?
     
  20. sharkbun

    sharkbun New Member

    Thanks for the reply.

    Firefox --> Blank Page
    Internet Explorer 6 --> HTTP 500 Internal server error.

    Mail log:

    Aug 23 18:56:22 userver001 imapd: LOGIN, [email protected], ip=[::ffff:127.0.0.1], port=[50455], protocol=IMAP
    Aug 23 18:56:22 userver001 imapd: LOGOUT, [email protected], ip=[::ffff:127.0.0.1], headers=0, body=0, rcvd=30, sent=2 38, time=0

    Thanks.
     

Share This Page