I've managed to setup a simple mail server that is working on every level but with one exception: when I'm sending email to an external email address, the receiver is seeing it as coming from blabla@example.com (that is literally the domain that appears "example.com)
The mail server has been setup like this: Postfix+dovecot+squirrelmail ( with sasl ) for a specific domain: mydomain.com (it's not literally the name of the domain). I've setup the MX record for the domain, etc, etc…bottom of the line is that I can send mail from this mail server and I can receive mail if one would specifically sent it to an email address on my mail server.
Now I've setup the /etc/postfix/main.conf file like this:
smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
biff = no
append_dot_mydomain = no
readme_directory = no
smtpd_sasl_auth_enable = yes
smtpd_sasl_local_domain = mydomain.com
smtpd_recipient_restrictions = permit_mynetworks,permit_sasl_authenticated,reject_unauth_destination
smtpd_sasl_security_options = noanonymous
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
myhostname = xxxxx.xxx.xxx.xxx
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
mydomain = mydomain.com
myorigin = /etc/mailname (in /etc/mailname I have set the mailname to mydomain.com )
mydestination = mydomain.com, xxxxx.xxx.xxx.xxx, localhost.xxx.xxx.xxx, localhost
relayhost =
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
What am I missing here ?
Best Answer
Make sure to check the squirrelmail configuration as well, sometimes the problem might be there.