Various Postfix/IMAP/Squirrelmail issues

Discussion in 'HOWTO-Related Questions' started by suaswe, May 22, 2012.

  1. suaswe

    suaswe New Member

    [SOLVED] Various Postfix/IMAP/Squirrelmail issues

    **Edit - Failure to receive external e-mails and Squirrelmail loading blank page: SOLVED!**

    Hi all!

    Having followed Falko's lovely guide on setting up virtual users and domains with Postfix/Courier/mySQL/Squirrelmail on my CentOS server, I'm having a few issues that I'm thinking I'm best off raising in one go on this page, where hopefully people have followed the guide and understand it better than I do!

    Basically, I have got as far as setting up all requisite applications; at present, after much playing around, I have the following issues:

    1. I can send and receive mail using 'mailx user' and 'mailx [email protected]' # maillog below, code snippet 1
    2. I can send mail out, for example to [email protected] # maillog below, code snippet 2
    3. I cannot send mail to my server from outside, for example from [email protected] to [email protected]; getting a DNS failure error # return message below
    4. Squirrelmail loads under www.example.com/webmail but when attempting to log in using either [email protected] or just user, along with the password I set up in mySQL and encrypted, I get variably "Unknown user or password incorrect", "ERROR: Connection dropped by IMAP server" or simply a blank page # maillog entries below, code snippet 3
    5. In /var/log/maillog, I am still seeing a lot of entries for sendmail even though the process isn't running, as confirmed by 'ps -ef', 'lsof' and 'netstat'; is this normal? # see first entries of snippets 1 and 2

    So these are the issues I'm dealing with currently: no incoming mail from external locations due to a DNS issue (any thoughts on how to resolve this? Does it need to be done with GoDaddy, with whom my address is registered, or on my server generally, or more specifically in some Postfix/IMAP/mySQL config file?), and Squirrelmail refusing to let me log in - at present I'm directed to http://www.example.com/webmail/src/webmail.php, which is turning up blank. I can telnet to my server on ports 25, 80, 110 and 143, so at its most basic level connectivity appears to be OK.

    I have gone through the guide several times and tweaked and Googled for all I'm worth and have solved some issues, but others keep appearing in their stead. :D Any ideas on how to help me here would be mightily appreciated!


    Code:
    # Snippet 1 - 'mailx [email protected]' ('mailx user' looks much the same)
    # These e-mails arrive successfully and are viewable when executing 'mail'
    
    May 22 13:47:03 example sendmail[5317]: q4MCl3F2005317: from=user, size=221, class=0, nrcpts=1, msgid=<[email protected]>, relay=user@localhost
    May 22 13:47:03 example postfix/smtpd[5319]: connect from localhost[127.0.0.1]
    May 22 13:47:03 example sendmail[5317]: STARTTLS=client, relay=[127.0.0.1], version=TLSv1/SSLv3, verify=FAIL, cipher=DHE-RSA-AES256-SHA, bits=256/256
    May 22 13:47:03 example postfix/trivial-rewrite[5321]: warning: do not list domain example.com in BOTH mydestination and virtual_mailbox_domains
    May 22 13:47:03 example postfix/smtpd[5319]: 5A0DC1E0D6B: client=localhost[127.0.0.1], sasl_sender=[email protected]
    May 22 13:47:03 example postfix/cleanup[5326]: 5A0DC1E0D6B: message-id=<[email protected]>
    May 22 13:47:03 example postfix/qmgr[5239]: 5A0DC1E0D6B: from=<[email protected]>, size=637, nrcpt=1 (queue active)
    May 22 13:47:03 example sendmail[5317]: q4MCl3F2005317: to=[email protected], ctladdr=user (500/5001), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30221, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (Ok: queued as 5A0DC1E0D6B)
    May 22 13:47:03 example postfix/smtpd[5319]: warning: network_biopair_interop: error reading 5 bytes from the network: Connection reset by peer
    May 22 13:47:03 example postfix/smtpd[5319]: disconnect from localhost[127.0.0.1]
    May 22 13:47:08 example postfix/smtpd[5332]: connect from unknown[127.0.0.1]
    May 22 13:47:08 example postfix/trivial-rewrite[5321]: warning: do not list domain example.com in BOTH mydestination and virtual_mailbox_domains
    May 22 13:47:08 example postfix/smtpd[5332]: CCBB01E0D68: client=unknown[127.0.0.1]
    May 22 13:47:08 example postfix/cleanup[5326]: CCBB01E0D68: message-id=<[email protected]>
    May 22 13:47:08 example postfix/qmgr[5239]: CCBB01E0D68: from=<[email protected]>, size=1054, nrcpt=1 (queue active)
    May 22 13:47:08 example postfix/smtpd[5332]: disconnect from unknown[127.0.0.1]
    May 22 13:47:08 example postfix/trivial-rewrite[5321]: warning: do not list domain example.com in BOTH mydestination and virtual_mailbox_domains
    May 22 13:47:08 example amavis[2580]: (02580-08) Passed CLEAN, MYNETS LOCAL [127.0.0.1] [127.0.0.1] <[email protected]> -> <[email protected]>, Message-ID: <[email protected]>, mail_id: cGmMWcQDPOWF, Hits: -1, size: 637, queued_as: CCBB01E0D68, 5428 ms
    May 22 13:47:08 example postfix/smtp[5327]: 5A0DC1E0D6B: to=<[email protected]>, relay=127.0.0.1[127.0.0.1]:10024, delay=5.6, delays=0.12/0.01/0.01/5.4, dsn=2.0.0, status=sent (250 2.0.0 from MTA([127.0.0.1]:10025): 250 2.0.0 Ok: queued as CCBB01E0D68)
    May 22 13:47:08 example postfix/qmgr[5239]: 5A0DC1E0D6B: removed
    May 22 13:47:08 example postfix/local[5334]: CCBB01E0D68: to=<[email protected]>, relay=local, delay=0.11, delays=0.04/0.02/0/0.05, dsn=2.0.0, status=sent (delivered to mailbox)
    May 22 13:47:08 example postfix/qmgr[5239]: CCBB01E0D68: removed
    
    Code:
    # Snippet 2 - 'mailx [email protected]'
    # These e-mails arrive successfully and are viewable in Gmail account inbox
    
    May 22 13:52:28 example sendmail[5354]: q4MCqSBm005354: from=user, size=220, class=0, nrcpts=1, msgid=<[email protected]>, relay=user@localhost
    May 22 13:52:28 example postfix/smtpd[5356]: connect from localhost[127.0.0.1]
    May 22 13:52:29 example sendmail[5354]: STARTTLS=client, relay=[127.0.0.1], version=TLSv1/SSLv3, verify=FAIL, cipher=DHE-RSA-AES256-SHA, bits=256/256
    May 22 13:52:29 example postfix/trivial-rewrite[5358]: warning: do not list domain example.com in BOTH mydestination and virtual_mailbox_domains
    May 22 13:52:29 example postfix/smtpd[5356]: 1A7B41E0D6B: client=localhost[127.0.0.1], sasl_sender=[email protected]
    May 22 13:52:29 example postfix/cleanup[5363]: 1A7B41E0D6B: message-id=<[email protected]>
    May 22 13:52:29 example postfix/qmgr[5239]: 1A7B41E0D6B: from=<[email protected]>, size=632, nrcpt=1 (queue active)
    May 22 13:52:29 example sendmail[5354]: q4MCqSBm005354: to=[email protected], ctladdr=user (500/5001), delay=00:00:01, xdelay=00:00:01, mailer=relay, pri=30220, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (Ok: queued as 1A7B41E0D6B)
    May 22 13:52:29 example postfix/smtpd[5356]: warning: network_biopair_interop: error reading 5 bytes from the network: Connection reset by peer
    May 22 13:52:29 example postfix/smtpd[5356]: disconnect from localhost[127.0.0.1]
    May 22 13:52:30 example postfix/smtpd[5369]: connect from unknown[127.0.0.1]
    May 22 13:52:30 example postfix/trivial-rewrite[5358]: warning: do not list domain example.com in BOTH mydestination and virtual_mailbox_domains
    May 22 13:52:30 example postfix/smtpd[5369]: 3DA0D1E0D68: client=unknown[127.0.0.1]
    May 22 13:52:30 example postfix/cleanup[5363]: 3DA0D1E0D68: message-id=<[email protected]>
    May 22 13:52:30 example postfix/smtpd[5369]: disconnect from unknown[127.0.0.1]
    May 22 13:52:30 example postfix/qmgr[5239]: 3DA0D1E0D68: from=<[email protected]>, size=1045, nrcpt=1 (queue active)
    May 22 13:52:30 example amavis[2580]: (02580-09) Passed CLEAN, MYNETS LOCAL [127.0.0.1] [127.0.0.1] <[email protected]> -> <[email protected]>, Message-ID: <[email protected]>, mail_id: kQqzWcfiu5Zm, Hits: -1, size: 632, queued_as: 3DA0D1E0D68, 1134 ms
    May 22 13:52:30 example postfix/smtp[5364]: 1A7B41E0D6B: to=<[email protected]>, relay=127.0.0.1[127.0.0.1]:10024, delay=1.3, delays=0.13/0.01/0.01/1.1, dsn=2.0.0, status=sent (250 2.0.0 from MTA([127.0.0.1]:10025): 250 2.0.0 Ok: queued as 3DA0D1E0D68)
    May 22 13:52:30 example postfix/qmgr[5239]: 1A7B41E0D6B: removed
    May 22 13:52:31 example postfix/smtp[5371]: 3DA0D1E0D68: to=<[email protected]>, relay=gmail-smtp-in.l.google.com[173.194.78.26]:25, delay=1.3, delays=0.09/0.02/0.59/0.63, dsn=2.0.0, status=sent (250 2.0.0 OK 1337691231 o55si3405804wek.88)
    May 22 13:52:31 example postfix/qmgr[5239]: 3DA0D1E0D68: removed
    
    Code:
    # Snippet 3 - results of trying to log onto www.example.com/webmail
    
    # login failed; perhaps full e-mail address is required?
    May 22 13:55:42 example imapd: Connection, ip=[::ffff:86.9.1.129]
    May 22 13:55:42 example imapd: LOGIN FAILED, user=user, ip=[::ffff:86.9.1.129]
    May 22 13:55:47 example imapd: LOGOUT, ip=[::ffff:86.9.1.129], rcvd=50, sent=332
    
    # getting redirected to http://www.example.com/webmail/src/webmail.php but page is blank
    May 22 13:55:17 example imapd: Connection, ip=[::ffff:86.9.1.129]
    May 22 13:55:17 example imapd: LOGIN, user=[email protected], ip=[::ffff:86.9.1.129], port=[54569], protocol=IMAP
    May 22 13:55:17 example imapd: LOGOUT, user=[email protected], ip=[::ffff:86.9.1.129], headers=0, body=0, rcvd=30, sent=238, time=0
    
    # this is what I was getting up until an hour ago - no changes made that I can think of to resolve but at present it's no longer occurring
    May 22 09:44:42 example imapd: Connection, ip=[::1]
    May 22 09:44:42 example imapd: chdir example.com/user/: No such file or directory
    May 22 09:44:42 example imapd: [email protected]: No such file or directory
    
     
    Last edited: May 23, 2012
  2. suaswe

    suaswe New Member

    OK, I checked my domain registration account and noticed that I had my mx record configured as "mx.example.com" even though it's really only one server. I updated this to just "example.com" and got a "Connection refused" return message in GMail instead.

    Tried telnetting to my domain on port 25 - connection refused. :( To localhost it worked fine; initially suspected iptables but it is definitely open for smtp. Had a look on the server and, since restarting the server last night, once again sendmail had switched itself on with postfix being off. Thought I had already sorted this in chkconfig but obviously not! Set 'chkconfig sendmail off' and 'chkconfig postfix on', turned sendmail off, turned postfix on, tried telnetting from outside again, and it now opens:

    [user@exthost ~]$ telnet example.com 25
    Trying x.x.x.x...
    Connected to example.com.
    Escape character is '^]'.
    220 example.com ESMTP Postfix
    quit
    221 2.0.0 Bye
    Connection closed by foreign host.

    Google messages now coming through finally - hurraaaaaaaaaah! I have tried to remove sendmail totally before but without success, it always results in dependencies not being met and everything falling apart. Does anyone know a good way to ensure that it never runs unbidden? On a related note, I'm still seeing sendmail logs in maillog, e.g.:

    Code:
    [user@example ~]$ grep sendmail /var/log/maillog | tail -5
    May 23 09:19:49 example sendmail[2197]: alias database /etc/aliases rebuilt by user
    May 23 09:19:49 example sendmail[2197]: /etc/aliases: 78 aliases, longest 10 bytes, 788 bytes total
    May 23 09:30:52 example sendmail[2342]: q4N8Uqlv002342: from=user, size=225, class=0, nrcpts=1, msgid=<[email protected]>, relay=user@localhost
    May 23 09:30:52 example sendmail[2342]: STARTTLS=client, relay=[127.0.0.1], version=TLSv1/SSLv3, verify=FAIL, cipher=DHE-RSA-AES256-SHA, bits=256/256
    May 23 09:30:52 example sendmail[2342]: q4N8Uqlv002342: to=[email protected], ctladdr=user (500/5001), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30225, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (Ok: queued as DA21F1E0D8A)
    
    Is this normal? E.g. is it in fact some sendmail process within postfix that's doing this?

    I sadly also still have issues with Squirrelmail, in that I'm just getting a blank page loading with URL http://example.com/webmail/src/webmail.php when trying to log on. Anyone know how I might go about fixing this?
     
    Last edited: May 23, 2012
  3. suaswe

    suaswe New Member

    OK, got Squirrelmail's blank page sorted as well:

    Code:
    [user@example ~]$ sudo /usr/share/squirrelmail/config/conf.pl
    
    Within, I simply went to 8 (plugins) then selected at random one of the ones I'd installed, in my case 5 (change_sqlpass) to disable, saved and quit, and hey presto, Squirrelmail is now loading! Yay! I'm not that troubled about this plugin for now so am gonna leave it disabled; however, I am still having some SQMail issues in that it doesn't seem to be downloading new messages. I can successfully send from it but the last e-mail I received was from Tue 22nd (yesterday); today is Wed 23rd and indeed Last Checked is confirmed as "Wed, 10:04 am". Still, this is really a different issue from what I originally wrote about so am gonna mark this as solved and carry out separate investigations for Squirrelmail not currently receiving mail. :)
     

Share This Page