Postfix not sending to the right domain
Here is my main.cf
# 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
# TLS parameters
smtpd_tls_cert_file = /etc/postfix/ssl/smtpd.crt
smtpd_tls_key_file = /etc/postfix/ssl/smtpd.key
smtpd_use_tls = yes
smtpd_tls_session_cache_database = btree:${queue_directory}/smtpd_scache
smtp_tls_session_cache_database = btree:${queue_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 = mugen.ext9.org
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
mydestination = mugen.ext9.org, localhost.ext9.org, localhost.localdomain, localhost, ext9.org
relayhost =
mynetworks = 127.0.0.0/8
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
inet_protocols = all
home_mailbox = Maildir/
smtpd_sasl_local_domain =
smtpd_sasl_auth_enable = yes
smtpd_sasl_security_options = noanonymous
broken_sasl_auth_clients = yes
smtpd_tls_session_cache_timeout = 3600s
tls_random_source = dev:/dev/urandom
and here is my /etc/host
127.0.0.1 localhost.localdomain localhost
#67.18.187.77 mugen.ext9.org mugen
# The following lines are desirable for IPv6 capable hosts
# (added automatically by netbase upgrade)
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts
and /etc/hostname
mugen.ext9.org
How do I fix this? Thanks
4 Replies
What's in /etc/mailname?
Oh, and your DNS setup is broken – your MX record for ext9.org points to mail.ext9.org, but there's not A record for that. Is that what you were saying, that you
could send mail to hostname.domain.com, but not domain.com? The DNS problem would explain that.
> that you
could send mail to hostname.domain.com, but not domain.com? The DNS problem would explain that.
Exactly what I mean. I've changed my MX record to mugen.ext9.org. Hope this works.
$ dig -t MX ext9.org
; <<>> DiG 9.3.4 <<>> -t MX ext9.org
;; global options: printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 64405
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 2, ADDITIONAL: 2
;; QUESTION SECTION:
;ext9.org. IN MX
;; ANSWER SECTION:
ext9.org. 7200 IN MX 0 mugen.ext9.org.
;; AUTHORITY SECTION:
ext9.org. 7190 IN NS ns3.zoneedit.com.
ext9.org. 7190 IN NS ns9.zoneedit.com.
;; ADDITIONAL SECTION:
mugen.ext9.org. 7190 IN A 67.18.187.77
ns3.zoneedit.com. 20952 IN A 72.51.43.223