Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

A couple of weeks ago, I configured my webserver to be able to send emails (e.g. registration emails for my website etc.) I used exim4 in Debian, which worked flawlessly. Now, the need has arisen to be able to receive emails, too (e.g.

So, I removed exim, and followed this guide ( to install Postfix, Dovcot and RoundCube to be able to view my mails properly. I think everything went fine, but I have absolutely no idea how to test my new configuration.

When I try to log in using Roundcube, it keeps saying that the login failed (it can connect to the IMAP server, though). Where do I create IMAP accounts? Is there a default one? Also, I used the mail command:

echo 'body' | mail -s 'subject'

In exim4 to send an email using PHP, which does not work anymore either. Any suggestions? Or something to get my on track again?

Greatly appreciated

share|improve this question
Sounds like a problem that could use a look at /var/log/mail/ – LtWorf Feb 9 '13 at 20:46
up vote 0 down vote accepted

I've looked at that tutorial and they're describing a virtual mailbox setup utilizing MySQL. So, your "accounts" are stored in a MySQL database. If you want to adjust those accounts or create new ones, you'll have to manipulate that database.

To make this easier, there's PostfixAdmin. PostfixAdmin will manage your MySQL database so that you can manage your accounts through a simple web interface. I highly recommend using it.

If RoundCube login keeps failing, enable authentication debugging in Dovecot by setting the configuration parameter auth_debug=yes. Please also review the Dovecot documentation regarding this topic:

That being said, you don't need Postfix and/or Dovecot to send email. PHP can just utilize sendmail or some other simple email tool. You only need to be able to connect to the target SMTP server to send someone an email.

share|improve this answer
If you directly connect to someone's SMTP server, chances are all your emails go to spam. – LtWorf Feb 9 '13 at 20:45

So, it took a while to figure it all out, but at last I succeeded.

First of all, copying the configuration and pasting it in the configuration files messed up some quotes in the Postfix MySQL configuration files, preventing Postfix to properly connect to the database.

Secondly, Dovecot 2.x is not (yet) available for Debian, the operating system I use. I installed dovecot with the commands: apt-get install dovecot-imapd dovecot-mysql, and the second one caused the problems which prevented me from connection through RoundCube. Only dovecot-imapd is needed, so just don't install the mysql one (not sure what it's for anyway). Dovecot should use MD5-CRYPT and not MD5, too (Dovecot MySQL config file).

Lastly, the command tail -f /var/log/syslog proved to be really useful to be able to see what's going on, and, more importantly what's wrong.

I hope I can spare someone else the hassle with these notes

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .