GMAIL - Send mail through your SMTP server (unsecure)?

Discussion in 'General' started by onastvar, May 18, 2020.

  1. onastvar

    onastvar Member

    One of my clients wants to be able to be able to use [email protected] to send emails from (personal/free gmail account) [email protected] I'm trying to setup GMAIL to accept SMTP settings from ISPCONFIG 3 mail server (followed perfect server tutorials, I use Postfix, Dovecot, Rspamd and Let's Encrypt)

    In GMAIL > SETTINGS > Accounts & Imports > Send mail as (section):

    I tried all of the secure options

    Secured Connection using: TLS, Port: 25
    Authentication failed. Please check your username/password.
    Server returned error: "TLS Negotiation failed, the certificate doesn't match the host., code: 0"

    Secured Connection using: TLS, Port: 587
    Authentication failed. Please check your username/password.
    Server returned error: "TLS Negotiation failed, the certificate doesn't match the host., code: 0"

    Secured Connection using SSL, Port: 465
    Authentication failed. Please check your username/password.
    Server returned error: "TLS Negotiation failed, the certificate doesn't match the host., code: 0"

    Secured Connection using SSL, Port: 587
    Couldn't reach server. Please double-check the server and port number.

    Unsecure Connection, Port: 25
    Gmail allows me to add only this option.


    I tried to google's errors above, and I'm finding out that GMAIL now has strict policy, etc. Is it possible to configure email server to allow GMAILl to connect over secure connection to ISPCONFIG 3 MAIL SERVER?
     

    Attached Files:

  2. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    onastvar likes this.
  3. onastvar

    onastvar Member

    Thanks @Taleman!

    I used ssl-tools.net to check mail server and I'm getting Certificate chain Hostname Mismatch & DANE missing. My website SSL from LE works fine. I secured my server with tutorial: Securing ISPConfig with a free Let's Encrypt SSL Certificate

    Setting: System > Main Config > Mail (tab) > Use SSL/TLS encrypted connection for SMTP > was set to NO

    I changed it to SSL and re-ran the check still same issue.

    Any other ideas?
     
  4. onastvar

    onastvar Member

    I was able to connect SMTP Server via GMAIL using the
    mydomain.com instead or mail.mydomain.com
    Secured Connection using SSL, Port: 465
     
  5. onastvar

    onastvar Member

    Above was true for main domain of the server mydomain.com, if I use any other domain on same server such as mydomain2.com it does not work. I created Let's Encrypt SSL for each site on same server. DNS has MX record set at mail.mydomain.com. 2nd domain has DNS MX record mail.mydomain2.com

    When i ran mailserver test on via ssl-tools . net for mydomain.com and mydomain2.com i get errors

    Certificates problems found is showing for mydomain.com > Certificate chain > Hostname Mismatch
    DANE ? missing

    Is this fixable, I'd appreciate any advice from the community.
     
  6. Jesse Norell

    Jesse Norell ISPConfig Developer Staff Member ISPConfig Developer

    This sets up a certificate for each website, it does not configure the same for the mail server (postfix/dovecot). There's an rfe to do so, but it's likely a good ways off.

    I believe DANE would be a solution if you have DNSSEC setup on all your domains and are fairly technically minded or hire a coder (see https://community.letsencrypt.org/t/making-a-dane-tlsa-to-work-with-le/2129 as a start, and search for how to write ISPConfig server plugins).

    I've not looked at gmail settings recently, but can you simply specify the smtp server to use? If so, use a server name which is included in the ssl certificate.
     
    onastvar likes this.
  7. onastvar

    onastvar Member

    Thanks @Jesse Norell! I simply used mydomain.com (domain name used for main SSL) and that worked with GMAIL (Secured Connection using SSL, Port: 465).
     

Share This Page