Postfix and sending Mail from "outside" of my LAN doenst work
Hi,
I set up a mail server behind NAT router using dyndns. All necessary ports have been forwarded.
Sending mails from my network using the servers IP as SMTP Server 192.168.16.11 works fine and mail will be send out. But how can I send mails from the outside over my dyndnsserver?
In main.cf "mynetworks" I define, what belongs to me and from whom the server should accept SMTP tasks. I set "mynetworks = all" without any luck.
See my /etc/postfix/main.cf below
Code:
# 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 (Ubuntu)
biff = no
# appending .domain is the MUA's job.
append_dot_mydomain = no
# Uncomment the next line to generate "delayed mail" warnings
#delay_warning_time = 4h
readme_directory = no
# TLS parameters
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
# See /usr/share/doc/postfix/TLS_README.gz in the postfix-doc package for
# information on enabling SSL in the smtp client.
myhostname = server
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
mydestination = server, localhost.localdomain, localhost
relayhost = localhost
mynetworks = 127.0.0.0/8, 192.168.16.0/24
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = 127.0.0.1, 192.168.16.11
inet_protocols = ipv4
sender_dependent_relayhost_maps = hash:/etc/postfix/relaymap
smtp_sender_dependent_authentication = yes
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/passes
smtp_sasl_security_options = noanonymous
mailbox_transport = lmtp:unix:/var/run/cyrus/socket/lmtp
I hope somebody knows what I am doing wrong