By mm580486
I have server where I want to set up a mail server to let me receive and send email from my domain. I’m currently having a problem where while I am authorized to send email from the server, but according to the logs, am not authorized to receive email from any provider other than my own network.
i can send email but i cant receive any email
My main.cf:
# See /usr/share/postfix/main.cf.dist for a commented, more complete version
# Debian specific: Specifying a file name will cause the first
# line of that file to be used as the name. The Debian default
# is /etc/mailname.
#myorigin = /etc/mailname
smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
biff = no
local_recipient_maps = proxy:unix:passwd.byname $alias_maps
# appending .domain is the MUA's job.
append_dot_mydomain = no
# Uncomment the next line to generate "delayed mail" warnings
#delay_warning_time = 4h
virtual_transport = lmtp:unix:private/dovecot-lmtp
virtual_mailbox_domains = $mydomain
virtual_alias_maps = hash:/etc/postfix/virtual_aliases
readme_directory = no
# TLS parameters
smtpd_tls_cert_file=/etc/ssl/certs/mailcert.pem
smtpd_tls_key_file=/etc/ssl/private/mail.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_tls_security_level = may
smtp_tls_security_level = may
#smtpd_sasl_auth_only = yes
smtpd_sasl_auth_enable = yes
smtpd_sasl_type = dovecot
smtpd_sasl_path = private/auth
smtpd_recipient_restrictions =
permit_sasl_authenticated,
permit_mynetworks,
reject_unauth_destination
# See /usr/share/doc/postfix/TLS_README.gz in the postfix-doc package for
# information on enabling SSL in the smtp client.
smtpd_relay_restrictions = permit_mynetworks permit_sasl_authenticated defer_unauth_destination
myhostname = mail.pinsood.com
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
mydestination = mail.pinsood.com, pinsood.com, 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
#mydomain = pinsood.com
#myhostname = mx.$mydomain
#myorigin = $mydomain
#mydestination = localhost
and logs
tail -f /var/log/mail.err /var/log/mail.log /var/log/dovecot.log
==> /var/log/mail.err <==
Aug 31 08:38:02 pinsood postfix/smtpd[24160]: fatal: no SASL authentication mechanisms
Aug 31 08:47:35 pinsood postfix/smtpd[24476]: fatal: no SASL authentication mechanisms
Aug 31 12:30:51 pinsood postfix/smtpd[31348]: fatal: no SASL authentication mechanisms
Aug 31 12:45:11 pinsood postfix/postfix-script[31792]: fatal: the Postfix mail system is already running
Aug 31 12:45:49 pinsood postfix/postfix-script[31816]: fatal: the Postfix mail system is already running
Aug 31 13:15:54 pinsood postfix[32682]: fatal: usage: postfix [-c config_dir] [-Dv] command
Aug 31 13:20:26 pinsood dovecot: imap-login: Fatal: Can't load private ssl_key: Key is for a different cert than ssl_cert
Aug 31 13:20:26 pinsood dovecot: master: Error: service(imap-login): command startup failed, throttling for 2 secs
Aug 31 13:20:37 pinsood dovecot: imap-login: Fatal: Can't load private ssl_key: Key is for a different cert than ssl_cert
Aug 31 13:20:37 pinsood dovecot: master: Error: service(imap-login): command startup failed, throttling for 4 secs
==> /var/log/mail.log <==
Aug 31 13:20:26 pinsood dovecot: master: Error: service(imap-login): command startup failed, throttling for 2 secs
Aug 31 13:20:37 pinsood dovecot: imap-login: Fatal: Can't load private ssl_key: Key is for a different cert than ssl_cert
Aug 31 13:20:37 pinsood dovecot: master: Error: service(imap-login): command startup failed, throttling for 4 secs
Aug 31 13:27:33 pinsood postfix/cleanup[742]: warning: database /etc/postfix/virtual_aliases.db is older than source file /etc/postfix/virtual_aliases
Aug 31 13:27:33 pinsood postfix/pickup[431]: 0E5553F78D: uid=0 from=<root@pinsood.com>
Aug 31 13:27:33 pinsood postfix/trivial-rewrite[743]: warning: database /etc/postfix/virtual_aliases.db is older than source file /etc/postfix/virtual_aliases
Aug 31 13:27:33 pinsood postfix/cleanup[742]: 0E5553F78D: message-id=<20170831102733.0E5553F78D@mail.pinsood.com>
Aug 31 13:27:33 pinsood postfix/qmgr[432]: 0E5553F78D: from=<root@pinsood.com>, size=341, nrcpt=1 (queue active)
Aug 31 13:27:36 pinsood postfix/smtp[744]: 0E5553F78D: to=<mm580486@icloud.com>, relay=mx2.mail.icloud.com[17.142.163.14]:25, delay=3.3, delays=0.02/0.01/1.6/1.7, dsn=2.5.0, status=sent (250 2.5.0 Ok)
Aug 31 13:27:36 pinsood postfix/qmgr[432]: 0E5553F78D: removed
tail: cannot open ‘/var/log/dovecot.log’ for reading: No such file or directory
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Aug 31 13:20:26 pinsood dovecot: imap-login: Fatal: Can’t load private ssl_key: Key is for a different cert than ssl_cert Please read logs next time, they will always have the solution.
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.