Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

On my LAN are two servers: mail.example.com and alpha.example.com. A script on alpha.example.com sends an email to joe@example.com. Sendmail MTA on alpha.example.com sends this email to mail.example.com. with a "from" address of root@alpha.example.com

Postfix on mail.example.com is rejecting this, the mail log says "Sender address rejected: Domain not found"

Sep 29 13:58:20 mail postfix/smtpd[22938]: NOQUEUE: reject: RCPT from unknown[1.2.3.4]: 450 4.1.8 <root@alpha.example.com>: Sender address rejected: Domain not found; from=<root@alpha.example.com> to=<joe@example.com> proto=ESMTP helo=<alpha.example.com>

I don't understand why mail.example.com can't find domain alpha.example.com. The /etc/hosts on mail.example.com has an entry

1.2.3.4   alpha alpha.example.com

and I can ping either of those names from mail.example.com

Here's the Postfix main.cf

smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
biff = no

command_directory = /usr/sbin
daemon_directory = /usr/lib/postfix

mydestination = mail.localdomain, mail.localdomain, localhost.localdomain, localhost, /etc/postfix/mydomains

unknown_local_recipient_reject_code = 550
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128

alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases

recipient_delimiter = +

home_mailbox = Mail/
mailbox_size_limit = 0

disable_vrfy_command = yes
smtpd_helo_required = yes
smtpd_recipient_restrictions =
 permit_mynetworks
 reject_unauth_destination
 reject_unauth_pipelining
 reject_invalid_hostname
 reject_non_fqdn_sender
 reject_unknown_sender_domain
 reject_non_fqdn_recipient
 reject_unknown_recipient_domain
 reject_rbl_client dnsbl.njabl.org
 reject_rbl_client dnsbl.sorbs.net
 reject_rbl_client bl.spamcop.net
 permit

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:${queue_directory}/smtpd_scache
smtp_tls_session_cache_database = btree:${queue_directory}/smtp_scache

myhostname = bubba.localdomain
myorigin = /etc/mailname
relayhost = mail.<my ISP>.com
inet_interfaces = all
smtp_sasl_security_options = noplaintext, noanonymous
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
smtp_sasl_auth_enable = no

I have briefly reviewed similar questions on serverfault.com but in my main.cf I don't see a section for smtp_sender_restrictions so I am unclear how to get Postfix to cease rejecting mail from root@alpha.example.com.

share|improve this question

1 Answer 1

up vote 0 down vote accepted

Adding alpha.example.com to /etc/postfix/mydomains fixed the problem.

On a LAN with dozens or hundreds of servers this would be annoying to maintain, perhaps there's a more general solution?

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.