I have a mail server with postfix and dovecot that uses ssl. Everything was working fine, but it stopped working apparently without reason. I already tried to update the ssl certificates, change inet_protocols to accepdt only ipv4 on main.cf, change mydestionation parameters and nothing worked.
/etc/postfix/main.cf
alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
append_dot_mydomain = no
biff = no
config_directory = /etc/postfix
inet_interfaces = all
inet_protocols = ipv4
mailbox_size_limit = 0
mydestination = localhost
mydomain = domain.com.br
myhostname = mail.domain.com.br
mynetworks = 127.0.0.1 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
myorigin = /etc/mailname
readme_directory = no
recipient_delimiter = +
relayhost =
smtp_tls_security_level = may
smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
smtpd_recipient_restrictions = permit_sasl_authenticated, permit_mynetworks, reject_unauth_destination
smtpd_sasl_auth_enable = yes
smtpd_sasl_path = private/auth
smtpd_sasl_type = dovecot
smtpd_tls_CAfile = /etc/letsencrypt/live/domain.com.br/chain.pem
smtpd_tls_auth_only = yes
smtpd_tls_cert_file = /etc/letsencrypt/live/domain.com.br/cert.pem
smtpd_tls_key_file = /etc/letsencrypt/live/domain.com.br/privkey.pem
smtpd_tls_security_level = may
smtpd_use_tls = yes
virtual_alias_maps = mysql:/etc/postfix/mysql-virtual-alias-maps.cf
virtual_mailbox_domains = mysql:/etc/postfix/mysql-virtual-mailbox-domains.cf
virtual_mailbox_maps = mysql:/etc/postfix/mysql-virtual-mailbox-maps.cf
virtual_transport = lmtp:unix:private/dovecot-lmtp
commando mailq
-Queue ID- --Size-- ----Arrival Time---- -Sender/Recipient-------
1F7A4C0012 849 Wed Jan 3 16:40:28 user@domain.com.br
(connect to alt4.gmail-smtp-in.l.google.com[173.194.79.27]:25: Connection timed out)
user2@gmail.com
5873EC0414 1259 Wed Jan 3 16:49:44 user@domain.com.br
(connect to alt4.gmail-smtp-in.l.google.com[173.194.79.27]:25: Connection timed out)
user2@gmail.com
Thanks for your help.
EDIT: Enabling the verbose on smtpd, I identified the following strange lines:
Jan 4 10:45:05 user postfix/smtpd[4729]: ctable_locate: leave existing entry key destination@yahoo.com.br
Jan 4 10:45:05 user postfix/smtpd[4729]: maps_find: recipient_canonical_maps: destination@yahoo.com.br: not found
Jan 4 10:45:05 user postfix/smtpd[4729]: match_string: yahoo.com.br ~? localhost
Jan 4 10:45:05 user postfix/smtpd[4729]: match_list_match: yahoo.com.br: no match
Jan 4 10:45:05 user postfix/smtpd[4729]: maps_find: recipient_canonical_maps: @yahoo.com.br: not found
Jan 4 10:45:05 user postfix/smtpd[4729]: mail_addr_find: destination@yahoo.com.br -> (not found)
Jan 4 10:45:05 user postfix/smtpd[4729]: maps_find: canonical_maps: destination@yahoo.com.br: not found
Jan 4 10:45:05 user postfix/smtpd[4729]: match_string: yahoo.com.br ~? localhost
Jan 4 10:45:05 user postfix/smtpd[4729]: match_list_match: yahoo.com.br: no match
Jan 4 10:45:05 user postfix/smtpd[4729]: maps_find: canonical_maps: @yahoo.com.br: not found
Jan 4 10:45:05 user postfix/smtpd[4729]: mail_addr_find: destination@yahoo.com.br -> (not found)
Jan 4 10:45:05 user postfix/smtpd[4729]: dict_mysql_get_active: attempting to connect to host 127.0.0.1
Jan 4 10:45:05 user postfix/smtpd[4729]: dict_mysql: successful connection to host 127.0.0.1
Jan 4 10:45:05 user postfix/smtpd[4729]: dict_mysql: successful query from host 127.0.0.1
Jan 4 10:45:05 user postfix/smtpd[4729]: dict_mysql_lookup: retrieved 0 rows
Jan 4 10:45:05 user postfix/smtpd[4729]: maps_find: virtual_alias_maps: destination@yahoo.com.br: not found
Jan 4 10:45:05 user postfix/smtpd[4729]: match_string: yahoo.com.br ~? localhost
Jan 4 10:45:05 user postfix/smtpd[4729]: match_list_match: yahoo.com.br: no match
Jan 4 10:45:05 user postfix/smtpd[4729]: dict_mysql_get_active: found active connection to host 127.0.0.1
Jan 4 10:45:05 user postfix/smtpd[4729]: dict_mysql: successful query from host 127.0.0.1
Jan 4 10:45:05 user postfix/smtpd[4729]: dict_mysql_lookup: retrieved 0 rows
Jan 4 10:45:05 user postfix/smtpd[4729]: maps_find: virtual_alias_maps: @yahoo.com.br: not found
Jan 4 10:45:05 user postfix/smtpd[4729]: mail_addr_find: destination@yahoo.com.br -> (not found)