Answer the question
In order to leave comments, you need to log in
Postfix server behind NAT?
Hello dear colleagues,
I want to protect Postfix from the evil outside world with
NAT NAT on CISCO ASA 5005
Forwarded port 25,
Made the basic settings,
The test email is successfully sent from the local network (via telnet),
However,
when I try to send a test email via the telnet console from the Internet, I get the following -
220 ***************************************
helo TESTUS
502 5.5.2 Error: command not recognized
mail from: [email protected]
502 5.5.2 Error: command not recognized
421 4.4.2 smtp.contoso.loc Error: timeout exceeded
[email protected]:~$ cat /var/log/mail.log
Nov 25 10:27:19 smtp postfix/smtpd[2825]: connect from unknown[xxx.xxx.82.133]
Nov 25 10:32:58 smtp postfix/smtpd[2825]: timeout after UNKNOWN from unknown[xxx.xxx.82.133]
Nov 25 10:32:58 smtp postfix/smtpd[2825]: disconnect from unknown[xxx.xxx.82.133]
mynetworks = 0.0.0.0/0
smtpd_delay_reject = no
mynetworks_style = class
[email protected]:~$ sudo cat /etc/postfix/main.cf | grep -v '^#'
smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
biff = no
append_dot_mydomain = no
readme_directory = no
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 = smtp.contoso.loc
mydomain = contoso.loc
alias_maps = hash:/etc/postfix/aliases
alias_database = hash:/etc/postfix/aliases
myorigin = /etc/mailname
mydestination = $mydomain, $myhostname, localhost.contoso.loc, localhost
relayhost =
mynetworks = 0.0.0.0/0
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
inet_protocols = ipv4
smtpd_delay_reject = no
mynetworks_style = class
debug_peer_level = 2
Answer the question
In order to leave comments, you need to log in
mynetworks=0.0.0.0/0This is an open relay. it's not worth doing that.
Andrey thanks for the answer
mynetworks = 0.0.0.0/0 - This is for the setup period, I opened everything to the maximum
Now I smoke the official manual on Debug , as it turned out, the task is not trivial
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question