1

I am using postfix to send email. I have mysql set up to manage domains, accounts, and aliases. I have 3 domains set up. One domain is the primary domain and when sending emails to gmail accounts everything works fine. The ssl certificate is only for the primary domain.

When I use any of the virtual domains to send email to a gmail account they are marked as spam. The reason gmail gives is the email is unencrypted. It recognizes that the mail server that sent the mail is the primary server. Postfix is configured to only use tls.

Why does the mail from the virtual domains not get sent as encrypted?

I can provide any additional information if it will help.

Here is a header from an email, DMARC and SPF are configured.

Delivered-To: XXXXX@gmail.com
Received: by 10.79.120.143 with SMTP id d15csp334618ivg;
        Wed, 13 Apr 2016 18:56:09 -0700 (PDT)
X-Received: by 10.55.80.131 with SMTP id e125mr15507566qkb.62.1460598969001;
        Wed, 13 Apr 2016 18:56:09 -0700 (PDT)
Return-Path: <XXXXX@virtual.me>
Received: from primary.com (primary.com. [45.##.##.##])
        by mx.google.com with ESMTP id 123si7618120qkk.31.2016.04.13.18.56.08
        for <XXXXX@gmail.com>;
        Wed, 13 Apr 2016 18:56:08 -0700 (PDT)
Received-SPF: neutral (google.com: 45.##.##.## is neither permitted nor denied by best guess record for domain of XXXXX@virtual.me) client-ip=45.##.##.##;
Authentication-Results: mx.google.com;
       spf=neutral (google.com: 45.##.##.## is neither permitted nor denied by best guess record for domain of XXXXX@virtual.me) smtp.mailfrom=XXXXX@virtual.me
Received: from primary.com (localhost [127.0.0.1])
    by primary.com (Postfix) with ESMTPSA id 72B42140776
    for <XXXXX@gmail.com>; Wed, 13 Apr 2016 21:56:07 -0400 (EDT)
Mime-Version: 1.0
Date: Thu, 14 Apr 2016 01:56:07 +0000
Content-Type: multipart/alternative;
 boundary="----=_Part_822_880614403.1460598967"
Message-ID: <0c75661eac0bc2d3195aace76f9e8845@primary.com>
X-Mailer: AfterLogic webmail client
From: "XXXXXX" <XXXXXx@virtual.me>
Subject: test
To: XXXXX@gmail.com
X-Priority: 3 (Normal)

mxtoolbox warnings

smtp    primary.com     Reverse DNS is not a valid Hostname      More Info
dns     virtual.me  SOA Serial Number Format is Invalid      More Info
dns     virtual.me  SOA Expire Value out of recommended range    More Info
0

You need a valid SSL certificate and private key setup for your Postfix server, with lines in your main.cfg file like

smtpd_tls_cert_file=/etc/pki/tls/certname.crt smtpd_tls_key_file=/etc/pki/tls/certname.key smtpd_tls_CAfile=/etc/pki/tls/ca.bundle smtpd_tls_protocols=SSLv3, TLSv1, !SSLv2 smtp_tls_protocols=SSLv3, TLSv1, !SSLv2 smtpd_tls_cipherlist = ALL:!ADH:RC4+RSA:+HIGH:+MEDIUM:-LOW:-SSLv2:-EXP:-eNULL smtp_tls_cipherlist = ALL:!ADH:RC4+RSA:+HIGH:+MEDIUM:-LOW:-SSLv2:-EXP:-eNULL

smtp_tls_CAfile=/etc/ssl/certs/ca.bundle

  • At first glance it looked like it worked, but it did not. Gmail did not mark the message as spam because it was a reply to an email I sent the account. It still blocks new emails from any of my virtual domains. – cgsys Apr 14 '16 at 2:46
  • Is your domain name really "virtual.me" ? If so, SPF is not configured (and indeed, even your header above tends to indicate that - and that would contribute to the problem). There are a LOT of reasons your email may not be getting through - including blocklists (are you trying to send from behind a consumer DSL account ?), mail server with forward not using reverse etc. – davidgo Apr 14 '16 at 2:57
  • no I removed them from the header. the mail server is hosted on a digitalocean vps. I added the warning given by mxtoolbox about my virtual domain to the original question. – cgsys Apr 14 '16 at 3:06
  • From the MX Toolbox output - a (probably large) part of your problem is that forward and reverse DNS do not match for the IP address of the mail server you are sending from - See en.wikipedia.org/wiki/Forward-confirmed_reverse_DNS – davidgo Apr 14 '16 at 3:26
  • I just used debouncer.com/reverse-dns-check to test all 3 of my domains and they passed. – cgsys Apr 14 '16 at 3:45

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.