1

I've used this installation configure-email-server-using-postfix-dovecot

When I try to use gmail as the email client (connecting to my server through port 993) I get this error

Unable to establish secure SSL connection to email.example.com

My dovecot -n output

auth_mechanisms = plain login
mail_location = maildir:/var/mail/vhosts/%d/%n
mail_privileged_group = mail

passdb {
  args = /etc/dovecot/dovecot-sql.conf.ext
  driver = sql
}
protocols = imap lmtp
service auth-worker {
  user = vmail
}
service auth {
  unix_listener /var/spool/postfix/private/auth {
    group = postfix
    mode = 0666
    user = postfix
  }
  unix_listener auth-userdb {
    mode = 0600
    user = vmail
  }
  user = dovecot
}
service imap-login {
  inet_listener imap {
    port = 0
  }
}
service lmtp {
  unix_listener /var/spool/postfix/private/dovecot-lmtp {
    group = postfix
    mode = 0600
    user = postfix
  }
}
ssl = required
ssl_cert = </etc/ssl/certs/dovecot.pem
ssl_key = </etc/ssl/private/dovecot.pem
userdb {
  args = uid=vmail gid=vmail home=/var/mail/vhosts/%d/%n
  driver = static
}

When I check the logs I see this

 dovecot: imap-login: Disconnected (no auth attempts in 25 secs) ....

PS: the cert is a self signed.

6
  • Thanks for actually using your domain, makes life a lot easier. That said, when you say you "use gmail" do you mean you sent a message through gmail to your server? If so, can you post the relevant lines from your mail log?
    – NickW
    Dec 12 '14 at 14:14
  • no. I mean using gmail as an email client. Trying to connect to my server through 993
    – Symba
    Dec 12 '14 at 14:16
  • 3
    You do realise that GMAIL only supports POP3 for checking/importing mail from other email accounts? enable POP3 over SSL on port 995...
    – HBruijn
    Dec 12 '14 at 14:22
  • 1
    gmail does support sending through other mail servers via TLS/SSL (authenticated), but not checking mail over IMAP.
    – NickW
    Dec 12 '14 at 14:23
  • 1
    What authentication methods have you tried in TB?
    – sebix
    Dec 13 '14 at 10:35
2

As per @HBruijn's comment, Gmail only supports retrieving email through POP3, not IMAP. This has been confirmed on their product forums

Both Gmail and Dovecot support POP3 over SSL, which you should be able to use by opening port 995 on your firewalls, and directing Gmail at it.

1

for use pop3 with ssl on gmail to fetch mail

FOR CLIENT SIDE:

  1. enter fqdn
  2. enter your full email address
  3. select port 995
  4. select use ssl

FOR SERVER SIDE:

SSL certificate must:

  • match domain name of server (FQDN)
  • in your case email.example.com not example.com
  • be valid
  • not self signed

put this in dovecot config and see logs i'll bet it's certificate issue

# Log unsuccessful authentication attempts and the reasons why they failed.
auth_verbose = yes

# In case of password mismatches, log the attempted password. Valid values  are
# no, plain and sha1. sha1 can be useful for detecting brute force password
# attempts vs. user simply trying the same password over and over again.
auth_verbose_passwords = yes

# Even more verbose logging for debugging purposes. Shows for example SQL
# queries.
auth_debug = yes

# In case of password mismatches, log the passwords and used scheme so the
# problem can be debugged. Enabling this also enables auth_debug.
auth_debug_passwords = yes

# Enable mail process debugging. This can help you figure out why Dovecot
# isn't finding your mails.
mail_debug = yes

# Show protocol level SSL errors.
verbose_ssl = yes

@downvoter: Care to explain your vote?

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.