Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > HOWTO-Related Questions

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 22nd May 2012, 15:11
suaswe suaswe is offline
Junior Member
 
Join Date: May 2012
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts
Default [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 user@example.com' # maillog below, code snippet 1
2. I can send mail out, for example to user@gmail.com # maillog below, code snippet 2
3. I cannot send mail to my server from outside, for example from user@gmail.com to user@example.com; getting a DNS failure error # return message below
4. Squirrelmail loads under www.example.com/webmail but when attempting to log in using either user@example.com 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. Any ideas on how to help me here would be mightily appreciated!


Code:
# Snippet 1 - 'mailx user@example.com' ('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=<201205221247.q4MCl3F2005317@example.com>, 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=user@example.com
May 22 13:47:03 example postfix/cleanup[5326]: 5A0DC1E0D6B: message-id=<201205221247.q4MCl3F2005317@example.com>
May 22 13:47:03 example postfix/qmgr[5239]: 5A0DC1E0D6B: from=<user@example.com>, size=637, nrcpt=1 (queue active)
May 22 13:47:03 example sendmail[5317]: q4MCl3F2005317: to=user@example.com, 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=<201205221247.q4MCl3F2005317@example.com>
May 22 13:47:08 example postfix/qmgr[5239]: CCBB01E0D68: from=<user@example.com>, 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] <user@example.com> -> <user@example.com>, Message-ID: <201205221247.q4MCl3F2005317@example.com>, mail_id: cGmMWcQDPOWF, Hits: -1, size: 637, queued_as: CCBB01E0D68, 5428 ms
May 22 13:47:08 example postfix/smtp[5327]: 5A0DC1E0D6B: to=<user@example.com>, 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=<user@example.com>, 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 user@gmail.com'
# 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=<201205221252.q4MCqSBm005354@example.com>, 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=user@example.com
May 22 13:52:29 example postfix/cleanup[5363]: 1A7B41E0D6B: message-id=<201205221252.q4MCqSBm005354@example.com>
May 22 13:52:29 example postfix/qmgr[5239]: 1A7B41E0D6B: from=<user@example.com>, size=632, nrcpt=1 (queue active)
May 22 13:52:29 example sendmail[5354]: q4MCqSBm005354: to=user@gmail.com, 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=<201205221252.q4MCqSBm005354@example.com>
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=<user@example.com>, 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] <user@example.com> -> <user@gmail.com>, Message-ID: <201205221252.q4MCqSBm005354@example.com>, mail_id: kQqzWcfiu5Zm, Hits: -1, size: 632, queued_as: 3DA0D1E0D68, 1134 ms
May 22 13:52:30 example postfix/smtp[5364]: 1A7B41E0D6B: to=<user@gmail.com>, 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=<user@gmail.com>, 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
Quote:
<!-- Return message at Gmail address when sending from Gmail to server -->
This is an automatically generated Delivery Status Notification

THIS IS A WARNING MESSAGE ONLY.

YOU DO NOT NEED TO RESEND YOUR MESSAGE.

Delivery to the following recipient has been delayed:

user@example.com

Message will be retried for 2 more day(s)

Technical details of temporary failure:
DNS Error: Domain name not found
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=user@example.com, ip=[::ffff:86.9.1.129], port=[54569], protocol=IMAP
May 22 13:55:17 example imapd: LOGOUT, user=user@example.com, 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: user@example.com: No such file or directory

Last edited by suaswe; 23rd May 2012 at 16:29. Reason: solved
Reply With Quote
Sponsored Links
  #2  
Old 23rd May 2012, 10:37
suaswe suaswe is offline
Junior Member
 
Join Date: May 2012
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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=<201205230830.q4N8Uqlv002342@example.com>, 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=user@gmail.com, 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 by suaswe; 23rd May 2012 at 11:02.
Reply With Quote
  #3  
Old 23rd May 2012, 11:08
suaswe suaswe is offline
Junior Member
 
Join Date: May 2012
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts
 
Default

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.
Reply With Quote
Reply

Bookmarks

Tags
courier, mysql, postfix, sendmail, squirrelmail

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
SSL issues profm2 Installation/Configuration 7 2nd May 2012 11:02
DNS issues in Ispconfig 3 caseyc2 Installation/Configuration 6 6th May 2010 04:22
Perfect XEN Setup on Debian Lenny - Live Migration Issues AlexKent HOWTO-Related Questions 8 25th April 2009 11:57
Mail issues with "The Perfect Server - CentOS 5.2 x86_64" dp6ai HOWTO-Related Questions 0 9th December 2008 13:43
ISPConfig + Turck MMCache + Hardened-PHP - Any Issues? BobbyQ General 8 3rd May 2006 22:52


All times are GMT +2. The time now is 22:27.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.