Issues receiving mail through Squirrelmail

Diango

Verified User
Joined
Apr 25, 2015
Messages
7
Dear people,

I've been searching so hard I think I have all but exhausted every relevant google entry I could find, so I cannot but ask you guys for help.

The (VPS) server I'm working on is running Directadmin, and has been doing so for many years.
Because the Ubuntu 10.04 (64bit) version it was running is no longer being supported, we switched to 14.04, only to realize afterwards that this is of course based on Debian 8 and not 7, as is officially supported. Nevertheless, another server exactly like this one has received all upgrades/updates and is working ok.

I have to say the process getting there was far from flawless - the higher Debian core version meant a lot of scripts were halting on stupid stuff like libraries which I had to manually correct, but in the end I managed to run all the custombuild (./build) scripts to update all the software required.

This one, however, is refusing to receive mail. That is saying, we send mail to any email account associated with this server and its domains and proceed to check via Squirrelmail to read it, but the mailbox remains empty. Sending is working perfectly, I can send email anywhere (through Squirrelmail) and it gets there in one piece.

So, what is the config?

Apache: 2.4.12
mod_ruid2: 0.9.8
ModSecurity: no
Dovecot: 2.2.16
Dovecot configuration: yes
AWstats: no
Exim: 4.85
exim.conf update: yes, release 2.1
BlockCracking: no
Easy Spam Fighter no
SpamAssassin: no
ClamAV: no
MySQL: no
MySQL backup: yes
MySQL backup directory: /usr/local/directadmin/custombuild/mysql_backups
PHP (default): 5.5 as mod_php
phpMyAdmin: 4.4.3-all-languages
ProFTPD: no
Pure-FTPd: 1.0.37
RoundCube webmail: 1.1.1
Replace "php.ini" with './build all' and './build php_ini': no
Auto updates/notifications: no
Run "clean" every time: yes
Run "clean_old_webapps" every time: yes
Run "clean_old_tarballs" every time: yes
Show texts in bold: yes
SquirrelMail: 1.4.22-20140402_0200
Zend Guard Loader: no
ionCube loader: 4.7.5
Suhosin: no

I checked of course - the other server, which is having no issues receiving email, has the same versions and build options, though there is a slight difference in the 'phpmyadmin' version which I think is of no influence here.

So on to Exim's mainlog. If I grep the messages that I sent to the testmailbox I created I can see that they are being delivered ok (it seems):

2015-04-25 19:00:11 1Ym3R5-0000QH-GT <= [email protected] H=dub004-SCRAMBLED.hotmail.com [157.55.2.24] P=esmtps X=TLSv1.2:AES256-SHA256:256 S=2191 id=DUB121-W36756DA
[email protected] T="FW: testje email" from <[email protected]> for [email protected]
2015-04-25 19:00:11 1Ym3R5-0000QH-GT => smtptest <[email protected]> F=<[email protected]> R=virtual_user T=virtual_localdelivery S=2360
2015-04-25 19:00:11 1Ym3R5-0000QH-GT Completed

So if the emails are being received, why aren't they showing up in Squirrelmail? What steps can I understake to troubleshoot this? What could have broken the config?
 
One addition I forgot to mention:

When we put a forwarding rule on the empty mailboxes and auto-forward the incoming mail to an external mailbox, it WILL arrive overthere.

I think it's a question of mail not showing up, rather than not being received, but I don't know how to solve this!
 
Have you tryed to use roundcube instead of squirrelmail?

Since th elog say that email is arrived, you should see that in your mail.. so.. maybe is a squirrelmail side issue, try roundcube or even a remote client as thundebird.

Regards
 
Have you tryed to use roundcube instead of squirrelmail?

Since th elog say that email is arrived, you should see that in your mail.. so.. maybe is a squirrelmail side issue, try roundcube or even a remote client as thundebird.

Regards

Yes, we tried fetching the mail with an external client through POP, but that mailbox also stays empty.

Is roundcube something that integrates with DA - that means, if I install roundcube, will I get another tab/option within the DA environment to use that to read mail?
 
First thing I would look at is to make sure both your Exim and your Dovecot match for email repository, they both should be set for Maildir. If Exim is configured for Maildir and Dovecot is configured for mbox it would give the illusion that you have no email when in fact you may have a lot. The other to check is that there isn't some other IMAP/POP3 server running besides Dovecot, that too could be a cause.
 
First thing I would look at is to make sure both your Exim and your Dovecot match for email repository, they both should be set for Maildir. If Exim is configured for Maildir and Dovecot is configured for mbox it would give the illusion that you have no email when in fact you may have a lot. The other to check is that there isn't some other IMAP/POP3 server running besides Dovecot, that too could be a cause.

Thank you, how do I check those? I read about box and maildir but don't know how to recognize either.
Does a standard DirectAdmin install come with an IMAP/POP3 server? Because I did not (consciously) install one.
 
There are the file locations for my CentOS box, Debian may be slightly different.

In the /etc/dovecot.conf, look for:
mail_location = maildir:~/Maildir

in the /etc/exim.conf look for:
directory = /home/$local_part/Maildir/
in the local_delivery section.

To make sure you have the correct IMAP/POP3 running, try executing the following as root:
netstat -ap|grep pop3|grep LISTEN
And if you see something like this:
Code:
tcp        0      0 *:pop3s                     *:*                         LISTEN      1035/dovecot/pop3-l 
tcp        0      0 *:pop3                      *:*                         LISTEN      1035/dovecot/pop3-l

Then you have Dovecot as your POP3 server, you could do the same for imap too:
Code:
netstat -ap|grep imap|grep LISTEN
tcp        0      0 *:imaps                     *:*                         LISTEN      629/dovecot/imap-lo 
tcp        0      0 *:imap                      *:*                         LISTEN      629/dovecot/imap-lo
 
Roundcube is another webmail client and yes, it will have a link in DA interface.

Using POP may not be the correct way cause the email should be stored in Spam folder, and with a POP3 account you would not be able to check them, IMAP would be better.

Regards
 
Hi guys,

sorry for taking so long to respond to your kind help, I was out of the country for a short trip.

I tried the netstat commands you gave me, and it seems I have both running:

USER@server:/home/USER# netstat -ap|grep pop3|grep LISTEN
tcp 0 0 *:pop3s *:* LISTEN 565/pop3-login
tcp 0 0 *:pop3 *:* LISTEN 565/pop3-login
unix 2 [ ACC ] STREAM LISTENING 1683 1093/dovecot /var/run/dovecot/login/pop3
USER@server:/home/USER# netstat -ap|grep imap|grep LISTEN
tcp 0 0 *:imaps *:* LISTEN 1093/dovecot
tcp 0 0 *:imap2 *:* LISTEN 1093/dovecot
unix 2 [ ACC ] STREAM LISTENING 1701 1093/dovecot /var/run/dovecot/login/imap
unix 2 [ ACC ] STREAM LISTENING 1703 1093/dovecot /var/run/dovecot/imap-urlauth-worker
unix 2 [ ACC ] STREAM LISTENING 1705 1093/dovecot /var/run/dovecot/token-login/imap-urlauth
unix 2 [ ACC ] STREAM LISTENING 1707 1093/dovecot /var/run/dovecot/imap-urlauth
 
Hey guys,

I've given you a detailed response many days ago, and was given the notice that this post had to be approved by an admin.
Sadly, this has not happened yet. What can I do about that?
 
There are the file locations for my CentOS box, Debian may be slightly different.

In the /etc/dovecot.conf, look for:
mail_location = maildir:~/Maildir

in the /etc/exim.conf look for:
directory = /home/$local_part/Maildir/
in the local_delivery section.

To make sure you have the correct IMAP/POP3 running, try executing the following as root:
netstat -ap|grep pop3|grep LISTEN
And if you see something like this:
Code:
tcp        0      0 *:pop3s                     *:*                         LISTEN      1035/dovecot/pop3-l 
tcp        0      0 *:pop3                      *:*                         LISTEN      1035/dovecot/pop3-l

Then you have Dovecot as your POP3 server, you could do the same for imap too:
Code:
netstat -ap|grep imap|grep LISTEN
tcp        0      0 *:imaps                     *:*                         LISTEN      629/dovecot/imap-lo 
tcp        0      0 *:imap                      *:*                         LISTEN      629/dovecot/imap-lo

I'll try posting this info again, because my previous answer was never approved by the admins:

on the netstat commands you gave me, pop3:

Code:
tcp        0      0 *:pop3s                 *:*                     LISTEN      1093/dovecot    
tcp        0      0 *:pop3                  *:*                     LISTEN      1093/dovecot    
unix  2      [ ACC ]     STREAM     LISTENING     1683     1093/dovecot        /var/run/dovecot/login/pop3

on the netstat imap command:

Code:
tcp        0      0 *:imaps                 *:*                     LISTEN      1093/dovecot    
tcp        0      0 *:imap2                 *:*                     LISTEN      1093/dovecot    
unix  2      [ ACC ]     STREAM     LISTENING     1701     1093/dovecot        /var/run/dovecot/login/imap
unix  2      [ ACC ]     STREAM     LISTENING     1703     1093/dovecot        /var/run/dovecot/imap-urlauth-worker
unix  2      [ ACC ]     STREAM     LISTENING     1705     1093/dovecot        /var/run/dovecot/token-login/imap-urlauth
unix  2      [ ACC ]     STREAM     LISTENING     1707     1093/dovecot        /var/run/dovecot/imap-urlauth
root@server:/home/user# tcp        0      0 *:imaps                     *:*                         LISTEN      629/dovecot/imap-lo 
/usr/bin/python3: /usr/local/lib/libz.so.1: no version information available (required by /usr/bin/python3)
No command 'tcp' found, but there are 27 similar ones
tcp: command not found
root@server:/home/user# tcp        0      0 *:imap                      *:*                         LISTEN      629/dovecot/imap-lo
/usr/bin/python3: /usr/local/lib/libz.so.1: no version information available (required by /usr/bin/python3)
No command 'tcp' found, but there are 27 similar ones
tcp: command not found

The maildir locations you mentioned I checked, they are both fine in the config settings (that saying, exactly as you posted).
 
Last edited:
Based on what information you have given so far, I would do the following:
Find the unix owner of scrambled.com:
grep -i scrambled.com /etc/virtual/domainowners
It should return something similar to:
scrambled.com: ${unixowner}
where ${unixowner} is a real unix user.
Then look for the email files:
cd /home/${unixowner}/imap/scrambled.com/smtptest/Maildir
ls -laR

That should list every filed from the Maildir down including any hidden files/directories. The email files will most likely be in the new directory have the hostname plus a timestamp as part of the name. If you have the email you originally sent from post 1 then you know it is being delivered properly. Then you need to figure out why squirrelmail wasn't finding the emails.

Check the config for squirellmail, you should at least see these lines in the config file:
$imapServerAddress = 'localhost';
$imapPort = 143;
$imap_server_type = 'other';
$use_imap_tls = false;
$smtp_auth_mech = 'login';

If you have different values in your config, then that could explain why you aren't seeing the emails. Also since I see from post 1 that it said "T=virtual_localdelivery" that tells me this is a virtual email box, so when logging in, you must use the full email address as the username.

If you are still stuck, I think you might just have to pay someone to log into your system and figure out how to fix it for you.
 
Back
Top