8

My server is running on Ubuntu 14.04 and I have Postfix installed. When I send something to my gmail account, it goes to spam. I set up SPF, DKIM and DMARC, here is a confirmation:

Authentication-Results: mx.google.com;
   dkim=pass header.i=@mydomain.com;
   spf=pass (google.com: domain of office@mydomain.com designates xxx.xxx.xx.xxx as permitted sender) smtp.mailfrom=office@mydomain.com;
   dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=mydomain.com

But there's a red padlock saying: encryption: mydomain.com did not encrypt this message.

Emails from others have such a note: encryption: Standard (TLS)

Could you help me a little with this, what should I do? Might it be a reason that emails from my server go to spam? Thanks in advance.

My /etc/postfix/main.cf:

biff = no
append_dot_mydomain = no
readme_directory = no

# TLS parameters
smtpd_tls_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem
smtpd_tls_key_file=/etc/ssl/private/ssl-cert-snakeoil.key
smtpd_use_tls=yes
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache

smtpd_relay_restrictions = permit_mynetworks permit_sasl_authenticated defer_unauth_destination
myhostname = mail.mydomain.com
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
mydestination = mydomain.com, bociuch, localhost.localdomain, localhost
relayhost = 
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
mailbox_command = procmail -a "$EXTENSION"
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
inet_protocols = all

milter_protocol = 2
milter_default_action = accept
smtpd_milters = inet:localhost:12301
non_smtpd_milters = inet:localhost:12301
2
  • Your postfix config would be helpful. Jun 1 '17 at 8:21
  • My initial post updated.
    – BociucH
    Jun 1 '17 at 8:28
17

You are missing the smtp_tls_security_level directive.

smtp_tls_security_level = may

This will set it to opportunistic TLS, using encrypted connections if the server supports it, but allowing unencrypted connections if the server doesn't.

The default value for smtp_tls_security_level is none.

4
  • After adding it, everything works fine. Many thanks!
    – BociucH
    Jun 1 '17 at 8:34
  • 1
    after 14 hours of knocking my head with gmail....its a shame i cant vote up u only one time... or not? Oct 18 '19 at 1:59
  • Surely you can figure out some way MacGyver ;) Oct 13 '20 at 23:09
  • Wow, what simple..., I wonder why the default isn't "may" for this option. Jan 6 at 2:49

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.