1

I have two identically configured OpenBSD machines that use sendmail for mail delivery. I basically made no changes to the sendmail install other than setting up an alias root: [email protected] on each one. They're both on the same subnet(s) and both can access the mail server mail.example.com. However, one of them cannot deliver mail. I'm not terribly familiar with sendmail, so hopefully someone can explain this behaviour. I've posted the /var/log/maillog/ from each machine below:

The machine which delivers successfully:

Dec  7 11:57:35 gw003 sendmail[9640]: nB7JvZmS009640: from=kamil, size=60, class=0, nrcpts=1, msgid=<200912071957.nB7JvZmS009640@gw00
3.backbone.example.com>, relay=root@localhost
Dec  7 11:57:35 gw003 sm-mta[30258]: nB7JvZlR030258: from=<[email protected]>, size=401, class=0, nrcpts=1, msgid=<2
[email protected]>, proto=ESMTP, daemon=MTA, [email protected] [127.
0.0.1]
Dec  7 11:57:35 gw003 sendmail[9640]: nB7JvZmS009640: [email protected], ctladdr=kamil (1031/1031), delay=00:00:00, xdelay=00:
00:00, mailer=relay, pri=30060, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (nB7JvZlR030258 Message accepted for delivery)
Dec  7 11:57:35 gw003 sm-mta[29848]: STARTTLS=client, relay=mail.example.com., version=TLSv1/SSLv3, verify=FAIL, cipher=AES256-SHA,
 bits=256/256
Dec  7 11:57:35 gw003 sm-mta[29848]: nB7JvZlR030258: to=<[email protected]>, ctladdr=<[email protected]> (1031/1
031), delay=00:00:00, xdelay=00:00:00, mailer=esmtp, pri=30401, relay=mail.example.com. [10.2.32.11], dsn=2.0.0, stat=Sent (4b1d5e2
f-0000528c Message accepted for delivery)

The machine which is failing to deliver:

Dec  7 12:00:35 gw004 sendmail[12957]: nB7K0ZdA012957: from=kamil, size=60, class=0, nrcpts=1, msgid=<200912072000.nB7K0ZdA012957@gw0
04.backbone.example.com>, relay=root@localhost
Dec  7 12:00:35 gw004 sm-mta[25655]: nB7K0Z7U025655: <[email protected]>... User unknown
Dec  7 12:00:35 gw004 sendmail[12957]: nB7K0ZdA012957: [email protected], ctladdr=kamil (1031/1031), delay=00:00:00, xdelay=00
:00:00, mailer=relay, pri=30060, relay=[127.0.0.1] [127.0.0.1], dsn=5.1.1, stat=User unknown
Dec  7 12:00:35 gw004 sm-mta[25655]: nB7K0Z7U025655: from=<[email protected]>, size=60, class=0, nrcpts=0, proto=ESM
TP, daemon=MTA, [email protected] [127.0.0.1]
Dec  7 12:00:35 gw004 sendmail[12957]: nB7K0ZdA012957: nB7K0ZdB012957: DSN: User unknown
Dec  7 12:00:36 gw004 sm-mta[25655]: nB7K0Z7W025655: from=<>, size=2203, class=0, nrcpts=1, msgid=<200912072000.nB7K0ZdB012957@gw004.
backbone.example.com>, proto=ESMTP, daemon=MTA, [email protected] [127.0.0.1]
Dec  7 12:00:36 gw004 sendmail[12957]: nB7K0ZdB012957: to=kamil, delay=00:00:01, xdelay=00:00:01, mailer=relay, pri=31084, relay=[127
.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (nB7K0Z7W025655 Message accepted for delivery)
Dec  7 12:00:36 gw004 sm-mta[9947]: nB7K0Z7W025655: to=<[email protected]>, delay=00:00:01, xdelay=00:00:00, mailer=
local, pri=32465, dsn=2.0.0, stat=Sent
2
  • "Identically configured"... they've got different hostnames, for a start...
    – womble
    Dec 7, 2009 at 22:12
  • Sure, apart from the hostname and individual IP addresses. They are a mirror image of each other built with the same configuration managed steps. Dec 7, 2009 at 22:25

3 Answers 3

1

I suspect a name resolution problem on the "bad" system. Check /etc/hosts for non-symmetric entries. Check DNS resolution on both machines.

ifconfig -a            # note various IP adresses of this system
dig -x 192.1.2.3       # query FQDN for my own ip, are results symmetric?
dig -x 1.2.3.4         # same on another interface
dig -x 5.6.7.8         # and another one

and

dig my.fully.qualified.domain.name.
dig another.fully.qualified.domain.name.

and

hostname   # is it symmetric on both systems? or short on one and fully-qualified on another?
1
  • I've checked the relevant IP addresses (the primary management interface IP, the interface for the VLAN with the mail server, and the primary external interface) and the forward and reverse queries seem to match. hostname shows the FQDN for both systems, and it is set correctly in /etc/hosts Dec 7, 2009 at 23:34
0

[email protected] [127.0.0.1]

You are not relaying through your mail server mail.example.com

This is certainly a configuration problem related to relay domain or the server domain. (on the second machine it delivers mails on localhost, meaning it believes that the final destination is itself. check domain/hostname/relays)

1
  • The successful one also has the same relay line. Also, why would only the second machine think it is the final destination for the domain while the first does not? It seems gw004 decides right away that [email protected] is an unknown user where as gw003 correctly relays the mail to the mail server. Dec 7, 2009 at 22:30
0

Check the contents of /etc/mail/local-host-names and /etc/mail/relay-domains and maybe /etc/mail/mailertable -- your second box needs to know either it is example.com, or how to get there.

2
  • I checked these and they're empty on both boxes. I thought that by virtue of mail.example.com being the MX record for example.com, they should both be able to figure out that [email protected] should send there. Indeed it seems like gw003 does. Or am I wrong in this assumption? Dec 8, 2009 at 17:28
  • Hmmm. Look in /etc/mail/access to make sure it is permitted to send to itself, first. Dec 8, 2009 at 20:04

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .