1
I have configured postfix similar to this one: "Recipient address rejected" when sending an email with sendgrid
$ /etc/postfix/main.cf
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = static:username:password
smtp_sasl_security_options = noanonymous
smtp_tls_security_level = may
header_size_limit = 4096000
relayhost = [smtp.sendgrid.net:587]
But I keep getting such errors:
Feb 3 22:57:29 vsempprdapp11 postfix/error[24019]: 327A4441481: to=<DistU_MyAdmin@bratgroup.com>, relay=none, delay=193633, delays=193632/1/0/0.01, dsn=4.3.0, status=deferred (unknown mail transport error)
netstat shows I have port 25 listening
/var/www/app: netstat -an | grep :25
tcp 0 0 0.0.0.0:25 0.0.0.0:*
LISTEN
tcp6 0 0 :::25 :::*
LISTEN
udp6 0 0 fe80::250:56ff:fe96:123 :::*
my postconf
Another interesting thing is, if I change my main.cf
to following it works for non-domain emails-ids(email addresses other than @bratgroup.com like @gmail.com, @hotmail.com emails get delivered). And for @bratgroup.com mail.log says connection timed out
# 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 = mybrat.bratgroup.com
mydomain = mybrat.bratgroup.com
myhostname = mybrat.bratgroup.com
mydestination = localhost.$mydomain, localhost
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
message_size_limit = 27852800
append_dot_mydomain = no
biff = no
readme_directory = no
#delay_warning_time = 4h
# TLS parameters
smtpd_use_tls=yes
smtpd_tls_cert_file=/etc/apache2/ssl/mybrat.bratgroup.com/site.crt
smtpd_tls_key_file=/etc/apache2/ssl/mybrat.bratgroup.com/site.key
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
# opportunistic encryption, as a client
smtp_tls_security_level = may
bounce_template_file = /etc/postfix/bounce.cf
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
relayhost =
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
inet_protocols = ipv4
virtual_mailbox_domains = mybrat.bratgroup.com
virtual_mailbox_maps =