I have configured a mail server with Postfix and Dovecot on Ubuntu Server 9.10. I followed the guidelines here (using Maildir):

The tests seemed alright so I connected it to GMail which is able to connect and fetch e-mails. But since there's no e-mail in the Maildir/ directory I can't decide if the problem is Postfix or Dovecot. And I am totally new to mailservers so I don't know where to start troubleshooting.

So, I want to start by testing Dovecot. How can I create a fake "Hello World"-email directly on the server (using a text editor) so that I can try to fetch it with GMail?

If Dovecot is alright, where do I start looking for errors in Postfix?

Thank you for your time.

  • You haven't explained what the problem is. – Insyte Mar 11 '10 at 20:09
  • Sorry, the problem is that when I send a mail to the account I have set up, the server isn't fetching anything. I don't know if the server is able to allow other apps to collect mail either, that's why I want to create an e-mail directly in the Maildir/ directory. – Christoffer Mar 12 '10 at 7:11
  • Please include the output of postconf -n and dovecot -n with your question, as well as enough postfix logs to show the entire path of one email message through the system. – adaptr Oct 27 '11 at 11:22

Use "tail -f /var/log/mail.log" in a second terminal.

Install mailx and hit "mail" in a shell, type in subject and message. End the message with ..


have a look at /var/log/mail.log, all the clues should be in there


While you haven't explained what the problem is, a good place to start is by manually injecting a message into Postfix via telnet. A decent article on the subject can be found here:


Tail the mail log, like Aleksander mentioned, while doing this.


Maybe you want to try http://www.postfix.org/DEBUG_README.html

This enable more verbose options for postfix.

For dovecot, see: http://wiki2.dovecot.org/Logging or http://wiki.dovecot.org/Debugging

Also, as suggested by other user, opening up a second terminal and fire up:

tail -f /var/log/mail.log

While you are sending/recieving a mail could be useful to troubleshoot the problem.


You can telnet to localhost on port 25 and try sending the message from there to your local user account and then check the mails if the local delivery is happening. Then you can check of remote mail delivery to gmail is happening. It is always advisable to have a static I.P Address with proper reverse DNS entry set when trying to relay mails directly to the internet, the other option is to use a relay server, either the relay server of your ISP or a third party relay server.

For incoming mails, the mails come in via the MX records, so if the MX records for your domain point to your server/machine then your mails will reach your machine.

If the MX records for your domain does not point to your server then you can configure an application like fetchmail to fetch mails from your Mail Hosting Provider at regular intervals.

There is yet another option where mails can be relayed to your server (say if you also have a hosted incoming email/spam filtering service) from a third party server and your server should accept/allow the mails from those I.P Addresses/ I.P Address range without any authentication.

The actual ways of implementing the above is actually left to you.

ps: I use postfix and Cyrus.

Hope this information helps.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.