Unable to receive IMAP emails, Imapsync works though

Yeah I can copy emails using Imapsync, but I can’t receive emails sent to the address. Using OVH VPS with OpenVZ. Centos 6.4 32-bit. How might I start debugging this?

SMTP works okay, even though I had to change in roundcube/config/main.inc.php
this

$rcmail_config['smtp_user'] = '%u';
$rcmail_config['smtp_pass'] = '%p';

to this:

$rcmail_config['smtp_user'] = '';
$rcmail_config['smtp_pass'] = '';

Otherwise it gave an authentication error.

Here are some basic facts:

[code]
netstat -an | grep :143
tcp 0 0 0.0.0.0:143 0.0.0.0:* LISTEN

dovecot -n

2.0.9: /etc/dovecot/dovecot.conf

OS: Linux 2.6.32-042stab081.8 i686 CentOS release 6.4 (Final)

auth_mechanisms = plain login
disable_plaintext_auth = no
mail_location = maildir:~/Maildir
mbox_write_locks = fcntl
passdb {
driver = pam
}
protocols = imap pop3
ssl_cert = </etc/pki/dovecot/certs/dovecot.pem
ssl_key = </etc/pki/dovecot/private/dovecot.pem
userdb {
driver = passwd
}
protocol pop3 {
pop3_uidl_format = %08Xu%08Xv
}[/code]

Please explain “can’t receive emails”. What exactly are you trying, and what exactly happens on server and client side when you try? Please tell us all error messages and post relevant log excerpts from /var/log (enclose all shell listings in [code][/code] tags to preserve linebreaks and monospace font).

You know what, let me do this from scratch… I’ve hit a wall on another front: I can’t run PHP-FPM with GD enabled (I need it) on a system with 1GB ram… apparently PHP-FPM spikes memory at startup and fails to run.
So I will reinstall my whole VPS (with the click of a button fortunately) and install Virtualmin again. I’ll get back to this after that.

If I send an email to a user they don’t receive it. Even if I send it from the user’s account itself. Absolutely nothing happens and there is nothing in maillog after the sending.

For the send events, maillog has stuff like this:

Dec 3 13:30:27 mysite dovecot: imap-login: Login: user=<my.user>, method=PLAIN, rip=::1, lip=::1, mpid=13982, secured Dec 3 13:30:27 mysite dovecot: imap(my.user): Disconnected: Logged out bytes=44/530 Dec 3 13:30:51 mysite postfix/smtpd[13990]: connect from localhost.localdomain[127.0.0.1] Dec 3 13:30:51 mysite postfix/trivial-rewrite[13992]: warning: do not list domain mysite.com in BOTH mydestination and virtual_alias_domains Dec 3 13:30:51 mysite postfix/smtpd[13990]: 7BC762300716: client=localhost.localdomain[127.0.0.1] Dec 3 13:30:51 mysite postfix/cleanup[13993]: 7BC762300716: message-id=<abad75f56551a7121e32903acc00ce33@mysite.com> Dec 3 13:30:51 mysite postfix/qmgr[12000]: 7BC762300716: from=<my@mysite.com>, size=582, nrcpt=1 (queue active) Dec 3 13:30:51 mysite postfix/trivial-rewrite[13992]: warning: do not list domain mysite.com in BOTH mydestination and virtual_alias_domains Dec 3 13:30:51 mysite procmail[13996]: Enforcing stricter permissions on "/var/spool/mail/my.user" Dec 3 13:30:51 mysite procmail[13996]: Error while writing to "/var/log/procmail.log" Dec 3 13:30:51 mysite postfix/local[13994]: 7BC762300716: to=<my.user@mysite.com>, orig_to=<my@mysite.com>, relay=local, delay=0.15, delays=0.07/0.04/0/0.04, dsn=2.0.0, status=sent (delivered to command: /usr/bin/procmail-wrapper -o -a $DOMAIN -d $LOGNAME) Dec 3 13:30:51 mysite postfix/qmgr[12000]: 7BC762300716: removed

I searched Virtualmin forums for that error while writing to procmail.log and found this topic: http://www.virtualmin.com/node/18285

I swear I haven’t changed any configs, but somehow procmailrc has /var/mail as the location of mailboxes.
I do have email boxes under/home/myuser/homes/username/Maildir

EDIT: now that I went through my notes I have to admit I did mess up! I removed MySQL prior to installing MariaDB because of some silly tutorials and it messed with Postfix and procmail.

Should I somehow modify procmailrc to point to them? How should I do it exactly?

Thanks for the help.

[code]
cat /etc/procmailrc
LOGFILE=/var/log/procmail.log
TRAP=/etc/webmin/virtual-server/procmail-logger.pl :0wi
:0wi
VIRTUALMIN=|/etc/webmin/virtual-server/lookup-domain.pl $LOGNAME
EXITCODE=$?
:0

  • ?/usr/bin/test “$EXITCODE” = “73”
    /dev/null
    EXITCODE=0
    :0
  • ?/usr/bin/test “$VIRTUALMIN” != “”
    {
    INCLUDERC=/etc/webmin/virtual-server/procmail/$VIRTUALMIN
    }
    VIRTUALMIN=|/etc/webmin/virtual-server/lookup-domain.pl
    $LOGNAME :0 * ?/usr/bin/test “$VIRTUALMIN” != “”
    { INCLUDERC=/etc/webmin/virtual-server/procmail/$VIRTUALMIN }
    ORGMAIL=/var/mail/$LOGNAME
    DEFAULT=/var/mail/$LOGNAME
    DROPPRIVS=yes
    :0
    $DEFAULT[/code]

These two lines in your /etc/procmailrc would be a problem:

ORGMAIL=/var/mail/$LOGNAME DEFAULT=/var/mail/$LOGNAME

Those should actually be set to:

ORGMAIL=$HOME/Maildir/ DEFAULT=$HOME/Maildir/

If you’re still having problems after that, can you paste in the output of the command “postconf -n”? Thanks!

-Eric

Unfortunately because the PHP GD module memory problem persists even with Apache, I have to seek a different hosting company! My current host OVH uses older CentOS/RHEL 5 based OpenVZ tech, which doesn’t allow changing swap, which would solve this.
Thank you for your advice and sorry for bothering you with my problem, which turned out to be because of a user (or bad tutorial) error (uninstalling MySQL prior to installing MariaDB).