• Feedback
  • USEnglish
  • How to properly add a mailbox to Gmail

Hello
I just installed Mailcow (great job, everything is very smooth and stable, thank you very much), I added several domains with their respective mailboxes and everything works perfect (10/10 on mail-tester.com) including SOgo, everything smooth.

My problem is when I try to add mailbox to Gmail. Reject all validation attempts.
I have tried from different ports without success.

Is Mailcow “compatible” with Gmail?

It would be VERY convenient for me to be able to manage my emails from Gmail, if it were possible.

I would appreciate help on this.

Thanks

what “Reject all validation attempts” actually translates to? Any specific error?
Mailcow offers a fairly standard IMAP (Dovecot) and SMTP (Postfix), alongside the Exchange compatibility. Both options are definitely compatible with GMail (and pretty much with any other email client.

Have something to say?

Join the community by quickly registering to participate in this discussion. We'd like to see you joining our great moo-community!

I installed Mailcow on my.host.com (it works fine)
I added a second domain: second.domain
First using: mail.second.domain on DNS (MX, CNAME, SRV)
Now I’m using my.host.com on DNS (MX, CNAME, SRV)

ERROR trying port: 110
[AUTH] Plaintext authentication disallowed on non-secure (SSL/TLS) connections.

ERROR trying port: 143
Missing +OK response upon connecting to the server: * OK [CAPABILITY IMAP4rev1 SASL-IR LOGIN-REFERRALS ID ENABLE IDLE LITERAL+ STARTTLS LOGINDISABLED] Dovecot ready.

ERROR trying port: 993
Connection timed out: There may be a problem with the settings you added. Please contact your other email provider to verify the correct server name and port.

NGINX my.host.com.conf (I don’t have nginx conf for mail.second.domain)
`
server {
listen 80 default_server;
listen [::]:80 default_server;
server_name my.host.com autodiscover.* autoconfig.;
return 301 https://$host$request_uri;
}
server {
listen 443 ssl http2;
listen [::]:443 ssl http2;
server_name my.host.com autodiscover.
autoconfig.*;

ssl_certificate /etc/mailcow-dockerized/data/assets/ssl/cert.pem;
ssl_certificate_key /etc/mailcow-dockerized/data/assets/ssl/key.pem;
ssl_session_timeout 1d;
ssl_session_cache shared:SSL:50m;
ssl_session_tickets off;

See https://ssl-config.mozilla.org/#server=nginx for the latest ssl settings recommendations

An example config is given below

ssl_protocols TLSv1.2;
ssl_ciphers HIGH:!aNULL:!MD5:!SHA1:!kRSA;
ssl_prefer_server_ciphers off;

location /Microsoft-Server-ActiveSync {
proxy_pass http://127.0.0.1:7780/Microsoft-Server-ActiveSync;
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_connect_timeout 75;
proxy_send_timeout 3650;
proxy_read_timeout 3650;
proxy_buffers 64 512k; # Needed since the 2022-04 Update for SOGo
client_body_buffer_size 512k;
client_max_body_size 0;
}

location / {
proxy_pass http://127.0.0.1:7780/;
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
client_max_body_size 0;

The following Proxy Buffers has to be set if you want to use SOGo after the 2022-04 (April 2022) Update

Otherwise a Login will fail like this: mailcow/mailcow-dockerized4537

proxy_buffer_size 128k;
proxy_buffers 64 512k;
proxy_busy_buffers_size 512k;
}
}
`

mailcow.conf
`
HTTP_PORT=7780
HTTP_BIND=127.0.0.1

HTTPS_PORT=7743
HTTPS_BIND=127.0.0.1

ADDITIONAL_SAN=mail.second.domain

ADDITIONAL_SERVER_NAMES=mail.second.domain

ENABLE_SSL_SNI=y
`

OPEN PORTS on UFW
80,443,22,25,110,143,465,587,993,995,4190,7780,7743

Could you please reformat your posting next time with the “code” markdown </> when you paste configs or logs.

And also you should know that IMAP connections have nothing to do with nginx which is only for http/https…

It seems you let gmail do autoconfig. Please try with manual parameters.

No one is typing