0

I have a Wordpress server (on Ubuntu 16.04.02) on which I'm trying to set up a personal e-mail server using Postfix and Dovecot. I have followed this tutorial, and now I'm at the point where I'll try to send an e-mail to my server, yet the e-mail doesn't appear on the server. There is no mention of it in /var/log/mail.log nor /var/log/mail.err. On the server, I can use the mail command to send a message to the e-mail, but I can't send an external e-mail (e.g. sending something from Gmail).

Here's some information on my problem. For this post, my site will be called "example.place", and my IP address will be "123.123.123.123". I have also set up an MX record with my domain name provider that looks like this:

Type: MX

Host: @

Value: 10 example.place

Output of postconf -n:

alias_database = hash:/etc/postfix/aliases
alias_maps = hash:/etc/postfix/aliases
append_dot_mydomain = no
biff = no
bounce_queue_lifetime = 1d
broken_sasl_auth_clients = no
compatibility_level = 2
delay_warning_time = 0h
disable_vrfy_command = yes
dovecot_destination_recipient_limit = 1
inet_interfaces = all
inet_protocols = all
local_recipient_maps =
mailbox_size_limit = 0
maximal_backoff_time = 8000s
maximal_queue_lifetime = 1d
minimal_backoff_time = 1000s
mydestination =
mydomain = example.place
myhostname = example.place
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
mynetworks_style = host
myorigin = /etc/mailname
readme_directory = no
recipient_delimiter = +
relayhost =
smtp_helo_timeout = 60s
smtp_tls_ciphers = high
smtp_tls_mandatory_ciphers = high
smtp_tls_mandatory_protocols = TLSv1.2, TLSv1.1, !TLSv1, !SSLv2, !SSLv3
smtp_tls_note_starttls_offer = yes
smtp_tls_protocols = TLSv1.2, TLSv1.1, !TLSv1, !SSLv2, !SSLv3
smtp_tls_security_level = may
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
smtpd_banner = $myhostname ESMTP $mail_name
smtpd_client_restrictions = permit_mynetworks permit_sasl_authenticated reject_unknown_client_hostname reject_rbl_client bl.spamcop.net reject_rbl_client zen.spamhaus.org reject_rbl_client blackholes.easynet.nl
smtpd_data_restrictions = reject_unauth_pipelining
smtpd_delay_reject = yes
smtpd_hard_error_limit = 12
smtpd_helo_required = yes
smtpd_helo_restrictions = permit_mynetworks permit_sasl_authenticated reject_invalid_helo_hostname reject_non_fqdn_helo_hostname
smtpd_recipient_limit = 20
smtpd_recipient_restrictions = reject_non_fqdn_recipient reject_unknown_recipient_domain reject_unauth_pipelining permit_mynetworks permit_sasl_authenticated reject_unauth_destination
smtpd_sasl_auth_enable = yes
smtpd_sasl_authenticated_header = no
smtpd_sasl_local_domain =
smtpd_sasl_path = private/auth
smtpd_sasl_security_options = noanonymous
smtpd_sasl_type = dovecot
smtpd_sender_restrictions = permit_mynetworks permit_sasl_authenticated reject_non_fqdn_sender reject_unknown_sender_domain reject_unauth_pipelining
smtpd_soft_error_limit = 3
smtpd_tls_auth_only = yes
smtpd_tls_cert_file = /etc/letsencrypt/live/example.place/fullchain.pem
smtpd_tls_ciphers = high
smtpd_tls_key_file = /etc/letsencrypt/live/example.place/privkey.pem
smtpd_tls_loglevel = 0
smtpd_tls_mandatory_ciphers = high
smtpd_tls_mandatory_protocols = TLSv1.2, TLSv1.1, !TLSv1, !SSLv2, !SSLv3
smtpd_tls_protocols = TLSv1.2, TLSv1.1, !TLSv1, !SSLv2, !SSLv3
smtpd_tls_received_header = yes
smtpd_tls_security_level = may
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
strict_rfc821_envelopes = yes
tls_random_source = dev:/dev/urandom
virtual_alias_maps = sqlite:/etc/postfix/sqlite_alias.cf
virtual_gid_maps = static:5000
virtual_mailbox_base = /var/spool/mail/
virtual_mailbox_domains = sqlite:/etc/postfix/sqlite_domains.cf
virtual_mailbox_maps = sqlite:/etc/postfix/sqlite_mailbox.cf
virtual_transport = dovecot
virtual_uid_maps = static:5000

Contents of /etc/hostname: example

Contents of /etc/mailname: example.place

Contents of /etc/hosts:

127.0.0.1 localhost
123.123.123.123 example.place example

# The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts

Edit

Here's some parts of /var/log/mail.log that looked suspicious:

postfix/pickup[2498]: 72C5E9FB9E: uid=0 from=<root>
postfix/cleanup[2551]: 72C5E9FB9E: message-id=<20190407020002.72C5E9FB9E@example.place>
postfix/oqmgr[1829]: 72C5E9FB9E: from=<root@example.place>, size=675, nrcpt=1 (queue active)
postfix/pipe[2553]: 72C5E9FB9E: to=<root@example.place>, orig_to=<root>, relay=dovecot, delay=0.11, delays=0.05/0.01/0/0.05, dsn=5.1.1, status=bounced (user unknown)
postfix/cleanup[2551]: 877EC9FB73: message-id=<20190407020002.877EC9FB73@example.place>
postfix/oqmgr[1829]: 877EC9FB73: from=<>, size=2588, nrcpt=1 (queue active)
postfix/bounce[2558]: 72C5E9FB9E: sender non-delivery notification: 877EC9FB73
postfix/oqmgr[1829]: 72C5E9FB9E: removed
postfix/pipe[2553]: 877EC9FB73: to=<root@example.place>, relay=dovecot, delay=0.02, delays=0/0/0/0.02, dsn=5.1.1, status=bounced (user unknown)
postfix/oqmgr[1829]: 877EC9FB73: removed
dovecot: imap-login: Error: SSL: Stacked error: error:140760FC:SSL routines:SSL23_GET_CLIENT_HELLO:unknown protocol
  • What's in the mail log? What is the real domain name? – Michael Hampton Apr 7 at 20:06
  • "jasonsblog.place". Also, I have updated my question with some of the mail log. – Ertain Apr 8 at 7:40
  • 1
    Thank you for posting your actual domain: for one: the SMTP port (TCP port 25) can't be reached remotely, check your firewall – HBruijn Apr 8 at 8:05
  • I'll try opening port 25 (btw, I'm using ufw as a firewall). – Ertain Apr 8 at 21:50
  • I have tried sending a message to the e-mail from another address, but it didn't get there. Also, I can send e-mails, but I can't receive them (even after opening port 25). – Ertain Apr 8 at 23:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.