Emails not visible on freshly installed CentOS 6 with Virtualmin

Main symptom of a problem is that emails are visible in the Read User Mail utility in Webmin but they do not show up in either webmail (Roundcube/Squirrelmail), Usermin or any email client configured to connect to the server.

After further inspection, it appears the emails get delivered to /var/mail/usermailbox@domain.tld instead of /home/username/homes/usermailbox/Maildir. Dovecot (the POP/IMAP server) uses the Maildir format, while Postfix (the SMTP server) is by default set to use mbox.

 

To correct this, check and make sure Postfix is configured to use the Maildir format and whether it uses procmail for delivery:

 

Also check that the procmail config is correctly set to use Maildir boxes instead of the default mbox. The working config should be similar to (note the DEFAULT and ORGMAIL lines containing Maildir/):

 

After adjusting both the configuration and the procmail config, send yourself a test email and check if it gets delivered and is readable in your email clients or not.

If this test is successful and you are sure you have some useful emails that were already delivered while the server was misconfigured and you want to recover them, download mb2md (local copy in case original site becomes unavailable) and use it to convert your mailboxes from mbox to Maildir:

perl mb2md.pl -s /var/mail/[account-domain.tld] -d /home/[username]/homes/[account]/Maildir/

Leave a Reply