0

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 ?

  • Nevermind...like always...I'm struggling more than an hour to find a solution, I'm wasting 10-20 min to create a question for others to answer, and then 5 min after I've posted it...the solution was so easy. It was a problem with Squirrelmail. I had to enter into its configure panel and there to set the server settings->domain from example.com to mydomain.com –  Feb 07 '11 at 01:31

2 Answers2

1

Make sure to check the squirrelmail configuration as well, sometimes the problem might be there.

Aaron
  • 2,968
  • 1
  • 22
  • 36
1

<bot>Steal comment and put it to appriacate place</bot>

It was a problem with Squirrelmail because of wrong default domain. To fix this I had to reconfigure the squirrelmail with configuration tool config/conf.pl.

  • Select 2. Server settings
  • Select 1. Domain
  • Change from example.com to mydomain.com

This configuration will be used as default domain.

References: Squirrelmail documentation

masegaloeh
  • 17,978
  • 9
  • 56
  • 104