Problem with mail server

started at 18 Sep 2006 by dgrenier
  • dgrenier
    18 Sep 2006
    Ok, here's the deal. I'm running my webserver on a PowerMac G4 350 running Mac OS X 10.4.7. I've followed the instructions provided on this site and installed everything on a fresh Mac OS X installation.

    Now, here's what works

    Apache2 is running OK
    Virtual Domains are OK
    PHP 5 is OK
    Mysql is OK
    Postfix seems to run. Using PostfixAdmin I've setup an email account and sent an email to this address. If i go to /usr/local/virtual/domain.tld/accountname/new I can see the email has been received.

    ... and what doesn't

    Using Rouncubemail, there's no way I can log in the account created using PostfixAdmin. I get "Login Failed", even thought I'm sure my infos are correct (i've tried both the full email address and only the account name).

    Using mail, I can't connect to the server. I created a MX record using ZoneEdit to my server's IP and everything seems to work OK. However, in mail, the connection on port 143 time out.

    In the terminal, if I try the following:

    telnet localhost 143



    I get:

    Trying ::1...
    telnet: connect to address ::1: Connection refused
    Trying 127.0.0.1...
    telnet: connect to address 127.0.0.1: Connection refused
    telnet: Unable to connect to remote host



    If I try :

    telnet mail.domain.tld 143



    I get :

    Trying 0.0.0.0...
    telnet: connect to address 0.0.0.0: Operation timed out
    telnet: Unable to connect to remote host



    Where 0.0.0.0 is my server's IP.

    Also, I've found on Google that in order to see If Courier-IMAP server is running to type :

    ps ax | grep courier



    I get:

    1071  ??  S      0:00.01 /usr/local/sbin/courierlogger -pid=/usr/local/var/spool/authdaemo
     1072  ??  S      0:00.06 /usr/local/libexec/courier-authlib/authdaemond
     1073  ??  S      0:00.08 /usr/local/libexec/courier-authlib/authdaemond
     1074  ??  S      0:00.07 /usr/local/libexec/courier-authlib/authdaemond
     1075  ??  S      0:00.05 /usr/local/libexec/courier-authlib/authdaemond
     2512  p1  U+     0:00.01 grep courier



    Any idea if it's correct?

    That's where I am, now. I really don't know what else to look for. My conclusions are that the mail server isn't listening on port 143 nor port 110, but I'm not sure how to verify this. I'm not even sure if the mail server is running at all. I've opened ports 143, 110 and 25 on both my router and my server internal Firewall.

    Any idea on what I could check?
  • Richard
    18 Sep 2006
    Everything looks allright, what does mail.log tell you ?
  • dgrenier
    18 Sep 2006

    richard5 Escribió:

    Everything looks allright, what does mail.log tell you ?



    Sep 16 12:45:02 Serveur postfix[683]: error: to submit mail, use the Postfix sendmail command
    Sep 16 12:45:02 Serveur postfix[683]: fatal: the postfix command is reserved for the superuser
    Sep 16 12:45:16 Serveur postfix/postfix-script: fatal: the Postfix mail system is not running
    Sep 16 13:03:07 Serveur postfix/postfix-script: fatal: usage: postfix start (or stop, reload, abort, flush, check, set-permissions, upgrade-configuration)
    Sep 16 13:03:20 Serveur postfix/postfix-script: starting the Postfix mail system
    Sep 16 13:03:20 Serveur postfix/master[403]: daemon started -- version 2.3.3, configuration /etc/postfix
    Sep 16 13:03:33 Serveur postfix/postfix-script: stopping the Postfix mail system
    Sep 16 13:03:33 Serveur postfix/master[403]: terminating on signal 15
    Sep 16 13:05:46 Serveur postfix/postfix-script: starting the Postfix mail system
    Sep 16 13:05:46 Serveur postfix/master[463]: daemon started -- version 2.3.3, configuration /etc/postfix
    Sep 16 13:05:55 Serveur postfix/smtpd[466]: connect from localhost[127.0.0.1]
    Sep 16 13:07:45 Serveur postfix/smtpd[466]: disconnect from localhost[127.0.0.1]
    Sep 16 13:08:27 Serveur postfix/smtpd[466]: connect from localhost[127.0.0.1]
    Sep 16 13:08:29 Serveur postfix/smtpd[466]: 5A58D1CD671: client=localhost[127.0.0.1]
    Sep 16 13:08:29 Serveur postfix/smtpd[466]: 5A58D1CD671: reject: DATA from localhost[127.0.0.1]: 503 5.5.0 <DATA>: Data command rejected: Improper use of SMTP command pipelining; from=<dg@#####.###> to=<dg@#####.###> proto=SMTP helo=<localhost>
    Sep 16 13:08:29 Serveur postfix/smtpd[466]: warning: non-SMTP command from localhost[127.0.0.1]: To: dg@#####.###
    Sep 16 13:08:29 Serveur postfix/smtpd[466]: disconnect from localhost[127.0.0.1]
    Sep 16 13:26:50 Serveur postfix[517]: error: to submit mail, use the Postfix sendmail command
    Sep 16 13:26:50 Serveur postfix[517]: fatal: the postfix command is reserved for the superuser
    Sep 16 13:27:00 Serveur postfix/postfix-script: fatal: usage: postfix start (or stop, reload, abort, flush, check, set-permissions, upgrade-configuration)
    Sep 16 14:30:22 Serveur postfix/postfix-script: refreshing the Postfix mail system
    Sep 16 14:30:22 Serveur postfix/master[463]: reload configuration /etc/postfix
    Sep 16 14:34:43 Serveur postfix/postfix-script: stopping the Postfix mail system
    Sep 16 14:34:43 Serveur postfix/master[463]: terminating on signal 15
    Sep 16 14:34:52 Serveur postfix/postfix-script: starting the Postfix mail system
    Sep 16 14:34:52 Serveur postfix/master[638]: daemon started -- version 2.3.3, configuration /etc/postfix
    Sep 16 14:36:23 Serveur postfix/smtpd[642]: connect from localhost[127.0.0.1]
    Sep 16 14:37:03 Serveur postfix/smtpd[642]: disconnect from localhost[127.0.0.1]
    Sep 16 14:37:26 Serveur postfix/smtpd[642]: connect from localhost[127.0.0.1]
    Sep 16 14:38:57 Serveur postfix/smtpd[642]: disconnect from localhost[127.0.0.1]
    Sep 16 16:58:37 Serveur postfix/smtpd[672]: connect from localhost[127.0.0.1]
    Sep 16 16:58:50 Serveur postfix/smtpd[672]: disconnect from localhost[127.0.0.1]
    Sep 16 17:00:25 Serveur postfix/smtpd[672]: connect from *hostname*[##.##.##.##]
    Sep 16 17:00:56 Serveur postfix/smtpd[672]: disconnect from *hostname*[##.##.##.##]
    Sep 16 17:04:16 Serveur postfix/anvil[701]: statistics: max connection rate 1/60s for (smtp:##.##.##.##) at Sep 16 17:00:25
    Sep 16 17:04:16 Serveur postfix/anvil[701]: statistics: max connection count 1 for (smtp:##.##.##.##) at Sep 16 17:00:25
    Sep 16 17:04:16 Serveur postfix/anvil[701]: statistics: max cache size 1 at Sep 16 17:00:25
    Sep 16 18:39:47 Serveur postfix/smtpd[767]: connect from *hostname*[##.##.##.##]
    Sep 16 18:40:01 Serveur postfix/smtpd[767]: disconnect from *hostname*[##.##.##.##]
    Sep 16 18:41:01 Serveur postfix/smtpd[767]: connect from smtp.domain.tld[##.##.##.##]
    Sep 16 18:41:02 Serveur postfix/smtpd[767]: 7292C1CDA0F: client=smtp.domain.tld[##.##.##.##]
    Sep 16 18:41:02 Serveur postfix/cleanup[775]: 7292C1CDA0F: message-id=<332B158F-0DE4-4D3F-9F32-9EFCB8728E13@#####.###>
    Sep 16 18:41:02 Serveur postfix/smtpd[767]: disconnect from smtp.domain.tld[##.##.##.##]
    Sep 16 18:41:02 Serveur postfix/qmgr[776]: 7292C1CDA0F: from=<dg@#####.###>, size=810, nrcpt=1 (queue active)
    Sep 16 18:41:02 Serveur postfix/virtual[777]: 7292C1CDA0F: to=<infos@#####.###>, orig_to=<test@#####.###>, relay=virtual, delay=1.6, delays=1.4/0.08/0/0.06, dsn=2.0.0, status=sent (delivered to maildir)
    Sep 16 18:41:02 Serveur postfix/qmgr[776]: 7292C1CDA0F: removed
    Sep 16 18:44:22 Serveur postfix/anvil[769]: statistics: max connection rate 1/60s for (smtp:##.##.##.##) at Sep 16 18:39:47
    Sep 16 18:44:22 Serveur postfix/anvil[769]: statistics: max connection count 1 for (smtp:##.##.##.##) at Sep 16 18:39:47
    Sep 16 18:44:22 Serveur postfix/anvil[769]: statistics: max cache size 1 at Sep 16 18:39:47
    Sep 16 21:44:43 Serveur postfix/smtpd[929]: connect from unknown[10.0.1.4]
    Sep 16 21:44:57 Serveur postfix/smtpd[929]: disconnect from unknown[10.0.1.4]
    Sep 16 21:53:05 Serveur postfix/smtpd[950]: connect from smtp.domain.tld[##.##.##.##]
    Sep 16 21:53:07 Serveur postfix/smtpd[950]: BA6591CDB43: client=smtp.domain.tld[##.##.##.##]
    Sep 16 21:53:07 Serveur postfix/cleanup[954]: BA6591CDB43: message-id=<AB09F7E0-D426-4CA5-B97B-34DB13FEA995@#####.###>
    Sep 16 21:53:07 Serveur postfix/qmgr[776]: BA6591CDB43: from=<dg@#####.###>, size=811, nrcpt=1 (queue active)
    Sep 16 21:53:07 Serveur postfix/smtpd[950]: disconnect from smtp.domain.tld[##.##.##.##]
    Sep 16 21:53:07 Serveur postfix/virtual[955]: BA6591CDB43: to=<infos@#####.###>, orig_to=<test@#####.###>, relay=virtual, delay=2.5, delays=2.4/0.04/0/0.05, dsn=2.0.0, status=sent (delivered to maildir)
    Sep 16 21:53:07 Serveur postfix/qmgr[776]: BA6591CDB43: removed
    Sep 16 21:56:27 Serveur postfix/anvil[952]: statistics: max connection rate 1/60s for (smtp:##.##.##.##) at Sep 16 21:53:05
    Sep 16 21:56:27 Serveur postfix/anvil[952]: statistics: max connection count 1 for (smtp:##.##.##.##) at Sep 16 21:53:05
    Sep 16 21:56:27 Serveur postfix/anvil[952]: statistics: max cache size 1 at Sep 16 21:53:05
    Sep 16 22:09:40 Serveur postfix/smtpd[1052]: connect from *hostname*[##.##.##.##]
    Sep 16 22:09:40 Serveur postfix/smtpd[1052]: lost connection after CONNECT from *hostname*[##.##.##.##]
    Sep 16 22:09:40 Serveur postfix/smtpd[1052]: disconnect from *hostname*[##.##.##.##]
    Sep 16 22:09:42 Serveur postfix/smtpd[1052]: connect from *hostname*[##.##.##.##]
    Sep 16 22:09:42 Serveur postfix/smtpd[1052]: lost connection after CONNECT from *hostname*[##.##.##.##]
    Sep 16 22:09:42 Serveur postfix/smtpd[1052]: disconnect from *hostname*[##.##.##.##]
    Sep 16 22:09:42 Serveur postfix/smtpd[1052]: connect from *hostname*[##.##.##.##]
    Sep 16 22:09:42 Serveur postfix/smtpd[1052]: lost connection after CONNECT from *hostname*[##.##.##.##]
    Sep 16 22:09:42 Serveur postfix/smtpd[1052]: disconnect from *hostname*[##.##.##.##]
    Sep 16 22:09:43 Serveur postfix/smtpd[1052]: connect from *hostname*[##.##.##.##]
    Sep 16 22:09:43 Serveur postfix/smtpd[1052]: lost connection after CONNECT from *hostname*[##.##.##.##]
    Sep 16 22:09:43 Serveur postfix/smtpd[1052]: disconnect from *hostname*[##.##.##.##]
    Sep 16 22:09:43 Serveur postfix/smtpd[1052]: connect from *hostname*[##.##.##.##]
    Sep 16 22:09:43 Serveur postfix/smtpd[1052]: lost connection after CONNECT from *hostname*[##.##.##.##]
    Sep 16 22:09:43 Serveur postfix/smtpd[1052]: disconnect from *hostname*[##.##.##.##]
    Sep 16 22:09:56 Serveur postfix/smtpd[1052]: connect from *hostname*[##.##.##.##]
    Sep 16 22:09:56 Serveur postfix/smtpd[1052]: lost connection after CONNECT from *hostname*[##.##.##.##]
    Sep 16 22:09:56 Serveur postfix/smtpd[1052]: disconnect from *hostname*[##.##.##.##]
    Sep 16 22:09:56 Serveur postfix/smtpd[1052]: connect from *hostname*[##.##.##.##]
    Sep 16 22:09:57 Serveur postfix/smtpd[1052]: lost connection after CONNECT from *hostname*[##.##.##.##]
    Sep 16 22:09:57 Serveur postfix/smtpd[1052]: disconnect from *hostname*[##.##.##.##]
    Sep 16 22:13:17 Serveur postfix/anvil[1054]: statistics: max connection rate 7/60s for (smtp:##.##.##.##) at Sep 16 22:09:56
    Sep 16 22:13:17 Serveur postfix/anvil[1054]: statistics: max connection count 1 for (smtp:##.##.##.##) at Sep 16 22:09:40
    Sep 16 22:13:17 Serveur postfix/anvil[1054]: statistics: max cache size 1 at Sep 16 22:09:40
    Sep 16 22:26:55 Serveur authdaemond: modules="authmysql", daemons=3
    Sep 16 22:26:55 Serveur authdaemond: Installing libauthmysql
    Sep 16 22:26:55 Serveur authdaemond: Installation complete: authmysql
    Sep 16 22:28:01 Serveur authdaemond: received userid lookup request: postfix
    Sep 16 22:28:01 Serveur authdaemond: authmysql: trying this module
    Sep 16 22:28:01 Serveur authdaemond: SQL query: SELECT username, password, "", '27', '27', '/usr/local/virtual', maildir, "", name, "" FROM mailbox WHERE username = "postfix"
    Sep 16 22:28:01 Serveur authdaemond: zero rows returned
    Sep 16 22:28:01 Serveur authdaemond: authmysql: REJECT - try next module
    Sep 16 22:28:01 Serveur authdaemond: FAIL, all modules rejected
    Sep 16 22:28:19 Serveur authdaemond: authmysql: enumerate query: SELECT username, '27', '27', '/usr/local/virtual', maildir, "" FROM mailbox WHERE 1=1
    Sep 16 22:29:03 Serveur postfix/smtpd[1087]: connect from localhost[127.0.0.1]
    Sep 16 22:31:58 Serveur postfix/smtpd[1087]: disconnect from localhost[127.0.0.1]
    Sep 17 22:27:39 Serveur postfix/smtpd[1856]: connect from localhost[127.0.0.1]
    Sep 17 22:32:39 Serveur postfix/smtpd[1856]: timeout after CONNECT from localhost[127.0.0.1]
    Sep 17 22:32:39 Serveur postfix/smtpd[1856]: disconnect from localhost[127.0.0.1]
    Sep 17 22:45:52 Serveur postfix/smtpd[1873]: connect from localhost[127.0.0.1]
    Sep 17 22:45:52 Serveur postfix/smtpd[1873]: C9EDF1CDC67: client=localhost[127.0.0.1]
    Sep 17 22:45:52 Serveur postfix/smtpd[1873]: C9EDF1CDC67: reject: DATA from localhost[127.0.0.1]: 503 5.5.0 <DATA>: Data command rejected: Improper use of SMTP command pipelining; from=<dg@#####.###> to=<infos@#####.###> proto=ESMTP helo=<serveur.local>
    Sep 17 22:45:52 Serveur postfix/smtpd[1873]: warning: non-SMTP command from localhost[127.0.0.1]: To: infos@#####.###
    Sep 17 22:45:52 Serveur postfix/smtpd[1873]: disconnect from localhost[127.0.0.1]
    Sep 17 23:39:57 Serveur postfix/smtpd[1916]: connect from localhost[127.0.0.1]
    Sep 17 23:40:48 Serveur postfix/smtpd[1916]: disconnect from localhost[127.0.0.1]
    Sep 18 00:01:47 Serveur postfix/postfix-script: refreshing the Postfix mail system
    Sep 18 00:01:47 Serveur postfix/master[638]: reload configuration /etc/postfix
    Sep 18 00:01:56 Serveur postfix/postfix-script: stopping the Postfix mail system
    Sep 18 00:01:56 Serveur postfix/master[638]: terminating on signal 15
    Sep 18 00:01:57 Serveur postfix/postfix-script: fatal: usage: postfix start (or stop, reload, abort, flush, check, set-permissions, upgrade-configuration)
    Sep 18 00:02:05 Serveur postfix/postfix-script: starting the Postfix mail system
    Sep 18 00:02:05 Serveur postfix/master[2026]: daemon started -- version 2.3.3, configuration /etc/postfix
    Sep 18 14:13:50 Serveur postfix/smtpd[2622]: connect from localhost[127.0.0.1]
    Sep 18 14:13:54 Serveur postfix/smtpd[2622]: disconnect from localhost[127.0.0.1]

  • Richard
    18 Sep 2006
    Thanks for posting the logfile.

    I can tell form the logfile you aren't starting postfix as a root user, you really should try to run postfix with the command:

    sudo postfix start



    I see the auth daemon starting, but not courier-imap ?

    Do you use this command to start it:

    sudo /usr/local/libexec/imapd.rc start



    Look at this page for more info on starting the programs.

    Also you haven't corrected postfix admin to solve the bug that causes the

    Data command rejected: Improper use of SMTP command pipelining;

    error message. Please look at this page on the bgfix.

    And as a last error there is something wrong with courier-auth as it can't find your users ? "Serveur authdaemond: zero rows returned".
  • dgrenier
    18 Sep 2006
    About running postfix as a superuser, got it to work, I just didn't know at first.

    I had functions.php.inc fixed yesterday, thanks.

    Now, I've started the mail server the way you said and everything seems to be working now. And I now know what's the problem, the mail server isn't starting at boot time, even thought I followed your instruction on how to accomplished this. Must have done something wrong.

    I'll check what I can do about this... thank you very much for your help!
  • Richard
    18 Sep 2006
    On apache, you are correct I must have forgotten that piece of documentation when moving from v1 to v2. I'll addresss that later this week.

    To start apache:

    sudo /Library/Apache2/bin/apachectl start



    Sorry... :-//
  • dgrenier
    18 Sep 2006

    richard5 Escribió:

    On apache, you are correct I must have forgotten that piece of documentation when moving from v1 to v2. I'll addresss that later this week.

    To start apache:

    sudo /Library/Apache2/bin/apachectl start



    Sorry... :-//


    Well, actually that's a mistake I made in my post, I meant "the mail server isn't starting at bootime" instead of the web server. I've edited my post accordingly.

    But if you found something missing, glad I could help... :-)
  • dgrenier
    21 Sep 2006
    Ok, now, everything seems to be working, except for the server is not starting at boot time, however, for now, that's not my main problem.

    The problem I have now is with Apple Mail. It keep telling me that the server rejected my password... even thought I can log in RoundCubeMail using the exact same informations. Any idea ? The very first account I've setup is working as it should in Mail, but any other account I create won't work... ??

    Is there some special setting I should set in mail to get it to work?
  • dgrenier
    21 Sep 2006
    Stupid me... Found the problem. It was because I did not enter the full email address as the username... :-//

Reply

You must log in to post.