[2021-07-30]

Testing IMAP

You have already completed the configuration of Dovecot. So fetching emails via IMAP should already work. Let’s give it a try using a simple-looking but powerful IMAP client: mutt.

mutt -f imaps://john@example.org@webmail.example.org

The connection URL may look a little confusing because of the two “@” characters. Usually mutt expects the format imaps://user@server. And as we use the email address as the “user” part you get this look.

You should get prompted for the password which we set to “summersun”. If you get any certificate warnings then check if you used the correct server name to connect to and if you completed the certificate/LetsEncrypt part earlier in this guide.

After logging in you will see an empty inbox:

Very good – IMAP connections and authentication works. That’s all we wanted to test. Exit mutt by pressing “q”.

4 thoughts on “Testing IMAP

  • 2022-01-08 at 20:27
    Permalink

    Hello,
    In this step I get an error. I attach it:

    dovecot: auth-worker(36067): Error: mysql(127.0.0.1): Connect failed to database (mailserver): Access denied for user ‘mailserver’@’localhost’ (using password: YES) – waiting for 125 seconds before retry

    Reply
    • 2022-01-28 at 22:04
      Permalink

      I had the same error in a different place (Testing email delivery), but you may have made the same error I did – there are several files where the mailserver user name and password must be entered – in one of them (/etc/dovecot/dovecot-sql.conf.ext), I entered the password for mailadmin instead of mailserver. Check that and all of the files you had to create and incorporate into postfix’s main.cf file.

      Reply
  • 2022-01-15 at 19:50
    Permalink

    Again… You can’t send mail as john if John doesn’t exist since he was deleted. Right?

    Reply
    • 2022-04-16 at 16:53
      Permalink

      If you have in Postfix smtpd_recipient_restrictions=reject_sender_login_mismatch, you cannot send as another user. If you do not have this directive (and you are logged in), you can have anything in MAIL FROM.

      Reply

Leave a Reply

Your email address will not be published.