[oclug] Sendmail and Virtual Hosting... not working.
Jon Earle
je_oclug at kronos.honk.org
Tue Nov 2 15:32:05 EST 2004
Hi folks,
Still trying to bang away at this problem, and am having no luck.
Apologies in advance for the longish post - it seemed prudent to post as
much info as I could in the hope that someone might spot what it is that's
preventing this from working.
Config
======
Sendmail on debian stable - 8.12.3-7.1
In /etc/hosts:
127.0.0.1 localhost localhost.localdomain
69.156.222.39 kronos.honk.org mail.northernsportsman.ca
northernsportsman.ca kronos
10.16.52.1 os.digitalnetworks.ca os
In /etc/mail/local-host-names, the names for which I wish to accept mail:
kronos.honk.org
northernsportsman.ca
In /etc/mail/relay-domains:
northernsportsman.ca
In /etc/mail/access:
127.0.0.1 RELAY
os.digitalnetworks.ca OK
(There's other stuff in there too, but unrelated to this - just remote
user and domain blocks.)
In /etc/mail/virtusers/, thar be one file, named for the domain to be
virt-hosted:
northernsportsman.ca
containing (docs in /usr/share/sendmail/buildvirtuser):
earlej earlej at hotmail.com
test.user earlej at hotmail.com
earlej at hotmail.com
Which was then built with /usr/share/sendmail/buildvirtuser, which
produces two files in /etc/mail:
virtusertable.db
virthosts
In /etc/mail/virthosts:
northernsportsman.ca
It appears the .db file is ready to use.
Finally, my sendmail.mc and submit.mc are in
http://kronos.honk.org/~earlej/files/
.cf files were rebuilt after changes, and sendmail restarted.
Testing results
===============
(not sure what these tests accomplish - I got this off the web):
root at kronos:/etc/mail> sendmail -bt
ADDRESS TEST MODE (ruleset 3 NOT automatically invoked)
Enter <ruleset> <address>
> $=w
[os.digitalnetworks.ca]
kronos
os
os.digitalnetworks.ca
localhost.localdomain
northernsportsman.ca
localhost
[os]
[localhost.localdomain]
kronos.honk.org
[127.0.0.1]
mail.northernsportsman.ca
[10.16.52.1]
[69.156.222.39]
> /map virtuser earlej at northernsportsman.ca
map_lookup: virtuser (earlej at northernsportsman.ca) returns
earlej at hotmail.com (0)
> /map virtuser earlej at kronos.honk.org
map_lookup: virtuser (earlej at kronos.honk.org) no match (0)
> /map virtuser test at northernsportsman.ca
map_lookup: virtuser (test at northernsportsman.ca) no match (0)
> /map virtuser @northernsportsman.ca
map_lookup: virtuser ( @northernsportsman.ca) no match (0)
> /map virtuser test.user at kronos.honk.org
map_lookup: virtuser (test.user at kronos.honk.org) no match (0)
> /map virtuser test.user at northernsportsman.ca
map_lookup: virtuser (test.user at northernsportsman.ca) returns
earlej at hotmail.com (0)
> 3,0 earlej at kronos.honk.org
canonify input: earlej @ kronos . honk . org
Canonify2 input: earlej < @ kronos . honk . org >
Canonify2 returns: earlej < @ kronos . honk . org . >
canonify returns: earlej < @ kronos . honk . org . >
parse input: earlej < @ kronos . honk . org . >
Parse0 input: earlej < @ kronos . honk . org . >
Parse0 returns: earlej < @ kronos . honk . org . >
ParseLocal input: earlej < @ kronos . honk . org . >
ParseLocal returns: earlej < @ kronos . honk . org . >
Parse1 input: earlej < @ kronos . honk . org . >
Parse1 returns: $# local $: earlej
parse returns: $# local $: earlej
> 3,0 earlej at northernsportsman.ca
canonify input: earlej @ northernsportsman . ca
Canonify2 input: earlej < @ northernsportsman . ca >
Canonify2 returns: earlej < @ kronos . honk . org . >
canonify returns: earlej < @ kronos . honk . org . >
parse input: earlej < @ kronos . honk . org . >
Parse0 input: earlej < @ kronos . honk . org . >
Parse0 returns: earlej < @ kronos . honk . org . >
ParseLocal input: earlej < @ kronos . honk . org . >
ParseLocal returns: earlej < @ kronos . honk . org . >
Parse1 input: earlej < @ kronos . honk . org . >
Parse1 returns: $# local $: earlej
parse returns: $# local $: earlej
> 3,0 test at northernsportsman.ca
canonify input: test @ northernsportsman . ca
Canonify2 input: test < @ northernsportsman . ca >
Canonify2 returns: test < @ kronos . honk . org . >
canonify returns: test < @ kronos . honk . org . >
parse input: test < @ kronos . honk . org . >
Parse0 input: test < @ kronos . honk . org . >
Parse0 returns: test < @ kronos . honk . org . >
ParseLocal input: test < @ kronos . honk . org . >
ParseLocal returns: test < @ kronos . honk . org . >
Parse1 input: test < @ kronos . honk . org . >
Parse1 returns: $# local $: test
parse returns: $# local $: test
> 3,0 test.user at northernsportsman.ca
canonify input: test . user @ northernsportsman . ca
Canonify2 input: test . user < @ northernsportsman . ca >
Canonify2 returns: test . user < @ kronos . honk . org . >
canonify returns: test . user < @ kronos . honk . org . >
parse input: test . user < @ kronos . honk . org . >
Parse0 input: test . user < @ kronos . honk . org . >
Parse0 returns: test . user < @ kronos . honk . org . >
ParseLocal input: test . user < @ kronos . honk . org . >
ParseLocal returns: test . user < @ kronos . honk . org . >
Parse1 input: test . user < @ kronos . honk . org . >
Parse1 returns: $# local $: test . user
parse returns: $# local $: test . user
And an actual email test:
The original message was received at Tue, 2 Nov 2004 15:02:11 -0500
from root at localhost
----- The following addresses had permanent fatal errors -----
test.user at northernsportsman.ca
(reason: 550 5.1.1 <test.user at kronos.honk.org>... User unknown)
(expanded from: test.user at northernsportsman.ca)
----- Transcript of session follows -----
... while talking to [127.0.0.1]:
>>> DATA
<<< 550 5.1.1 <test.user at kronos.honk.org>... User unknown
550 5.1.1 test.user at northernsportsman.ca... User unknown
<<< 503 5.0.0 Need RCPT (recipient)
[ Part 2: "Delivery Status" ]
Reporting-MTA: dns; kronos.honk.org
Arrival-Date: Tue, 2 Nov 2004 15:02:11 -0500
Final-Recipient: RFC822; test.user at northernsportsman.ca
X-Actual-Recipient: RFC822; test.user at kronos.honk.org
Action: failed
Status: 5.1.1
Remote-MTA: DNS; [127.0.0.1]
Diagnostic-Code: SMTP; 550 5.1.1 <test.user at kronos.honk.org>... User
unknown
Last-Attempt-Date: Tue, 2 Nov 2004 15:02:11 -0500
[ Part 3: "Included Message" ]
Date: Tue, 2 Nov 2004 15:02:11 -0500
From: root <root>
To: test.user at kronos.honk.org
Subject: test
The email bounces back to the sender with the above, and the log shows:
Nov 2 15:02:11 kronos sendmail[11947]: iA2K2Bsk011947: from=root,
size=50, class=0, nrcpts=1,
msgid=<200411022002.iA2K2Bsk011947 at kronos.honk.org>, relay=root at localhost
Nov 2 15:02:11 kronos sm-mta[11949]: iA2K2BHn011949:
<test.user at kronos.honk.org>... User unknown
Nov 2 15:02:11 kronos sendmail[11947]: iA2K2Bsk011947:
to=test.user at northernsportsman.ca, ctladdr=root (0/0), delay=00:00:00,
xdelay=00:00:00, mailer=relay, pri=30050, relay=[127.0.0.1] [127.0.0.1],
dsn=5.1.1, stat=User unknown
Nov 2 15:02:11 kronos sm-mta[11949]: iA2K2BHn011949:
from=<root at kronos.honk.org>, size=50, class=0, nrcpts=0, proto=ESMTP,
daemon=MSA, relay=localhost [127.0.0.1]
Nov 2 15:02:11 kronos sendmail[11947]: iA2K2Bsk011947: iA2K2Bsl011947:
DSN: User unknown
Nov 2 15:02:11 kronos sm-mta[11949]: iA2K2BHp011949: from=<>, size=2098,
class=0, nrcpts=1, msgid=<200411022002.iA2K2Bsl011947 at kronos.honk.org>,
proto=ESMTP, daemon=MSA, relay=localhost [127.0.0.1]
Nov 2 15:02:11 kronos sendmail[11947]: iA2K2Bsl011947: to=root,
delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=31074,
relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (iA2K2BHp011949
Message accepted for delivery)
Nov 2 15:02:12 kronos sm-mta[11950]: iA2K2BHp011949:
to=<root at kronos.honk.org>, delay=00:00:01, xdelay=00:00:01, mailer=local,
pri=32296, dsn=2.0.0, stat=Sent
--
Jon Earle
Software Developer / Network Manager
Specializing in Open Source Software Solutions
http://kronos.honk.org/~earlej/
More information about the OCLUG
mailing list