Can anyone offer advice on how to get that working again and to properly set
up the genericstable to map the email addresses correctly?
Here's is what I've done.
I'm running a Linux server with name based virtual hosting and the mail is
sent and received ok, but the address is displayed as:
instead of
The virtusertable is already set up and works fine.
I attempted to
add these lines to the sendmail.mc file:
FEATURE(masquerade_envelope)
FEATURE(genericstable, `hash -o /etc/mail/genericstable')
GENERICS_DOMAIN_FILE(`/etc/mail/sendmail.cG')
Then generated a new sendmail file with
m4 /etc/mail/sendmail.mc > /etc/sendmail.cf
Then created a genericstable text file that had the reverse mapping (reverse
of what's in the virtusertable)
client cli...@clientcompany.com
Ran "makemap hash /etc/mail/genericstable < /etc/mail/genericstable"
Created an /etc/mail/sendmail.cG text file that contained only the name of
the server
Restarted sensmail.
Any help would be greatly appreciated!
Steve
Well, your genericstable setup seems fine (modulo that it's better to
not have the '-o' in the FEATURE(), and that you didn't say *where* in
the .mc file you put the new directives). So if you want help, you'll
have to be abit more explicit about the problems you're having - what
happens, what *exactly* are the error messages, log entries etc. "Not
work at all" is useless information, and "the SMTP server name cannot be
found" is not the text of any sendmail error message AFAIK.
--Per Hedeland
p...@bluetail.com
I put the new directives right after FEATURE(`blacklist_recipients')dnl and
before EXPOSED_USER(`root')dnl in the sendmail.mc file
Does it matter where amongst the directives those 3 lines go?
After I attempted to compile the new sendmail files, the mail system shut
down. Sorry, I don't know a better way of saying that it doesn't work. If I
send email to the account, I recieve the following reply:
"<st...@diotimadesign.com>: Sorry, I wasn't able to establish an SMTP
connection. (#4.4.1) I'm not going to try again; this message has been in
the queue too long." This leads me to believe that it's a network error
instead of a sendmail problem, though I'm not sure.
In any case, after I had attempted to construct the genericstable and modify
the .mc file, any mail from users on the system still read
user@diotimadesign .com instead of us...@userdomain.com
Thanks again for your assistance and if I can clarify anything further, I
will try.
Steve
"Per Hedeland" <p...@bluetail.com> wrote in message
news:a6tod8$2plv$4...@hedeland.org...
That doesn't make me a whole lot wiser since I don't know where those
lines are in your .mc file, but if you didn't put the new lines at the
end it's probably OK.
>Does it matter where amongst the directives those 3 lines go?
There are certain restriction on the general order of the different
types of directives - see cf/README in the sendmail distribution.
>After I attempted to compile the new sendmail files, the mail system shut
>down. Sorry, I don't know a better way of saying that it doesn't work. If I
>send email to the account, I recieve the following reply:
>"<st...@diotimadesign.com>: Sorry, I wasn't able to establish an SMTP
>connection. (#4.4.1) I'm not going to try again; this message has been in
>the queue too long." This leads me to believe that it's a network error
>instead of a sendmail problem, though I'm not sure.
That seems to be an error message from another MTA (qmail) being unable
to contact yours. So is your sendmail daemon running? 'ps' will tell
you, as will trying to 'telnet localhost smtp'. If it isn't, start it.
If it still isn't running, the reason it quit will almost certainly be
in the log file (typically /var/log/maillog, but it depends on your
syslog configuration).
>In any case, after I had attempted to construct the genericstable and modify
>the .mc file, any mail from users on the system still read
>user@diotimadesign .com instead of us...@userdomain.com
So probably the genericstable isn't being used, probably because there
is some problem with it, and the '-o' (for "optional") tells sendmail to
just forget about it in that case instead of complaining and exiting.
You can test it with
sendmail -bt
> /map generics user
> /tryflags hs
> /try esmtp user
> /try esmtp us...@server.host.name
> /tryflags es
> /try esmtp user
> /try esmtp us...@server.host.name
(hs = header sender, es = envelope sender).
--Per Hedeland
p...@bluetail.com
Steve
"Per Hedeland" <p...@bluetail.com> wrote in message
news:a6ts1u$2plv$1...@hedeland.org...
> In article <u94qgn...@corp.supernews.com> "bill thefish"
> <dioti...@yahoo.com> writes:
> >
> >I put the new directives right after FEATURE(`blacklist_recipients')dnl
and
> >before EXPOSED_USER(`root')dnl in the sendmail.mc file
>
> That doesn't make me a whole lot wiser since I don't know where those
> lines are in your .mc file, but if you didn't put the new lines at the
> end it's probably OK.
OK, I've loaded a copy of the sendmail.mc file to my site
http://www.diotimadesign.com/smmc.htm
You can also see a copy of the sendmail.cf file here
http://www.diotimadesign.com/smcf.htm
>
> >Does it matter where amongst the directives those 3 lines go?
>
> There are certain restriction on the general order of the different
> types of directives - see cf/README in the sendmail distribution.
>
> >After I attempted to compile the new sendmail files, the mail system shut
> >down. Sorry, I don't know a better way of saying that it doesn't work. If
I
> >send email to the account, I recieve the following reply:
> >"<st...@diotimadesign.com>: Sorry, I wasn't able to establish an SMTP
> >connection. (#4.4.1) I'm not going to try again; this message has been in
> >the queue too long." This leads me to believe that it's a network error
> >instead of a sendmail problem, though I'm not sure.
>
> That seems to be an error message from another MTA (qmail) being unable
> to contact yours. So is your sendmail daemon running? 'ps' will tell
> you, as will trying to 'telnet localhost smtp'. If it isn't, start it.
> If it still isn't running, the reason it quit will almost certainly be
> in the log file (typically /var/log/maillog, but it depends on your
> syslog configuration).
>
I ran ps -C sendmail and got
PID TTY TIME CMD
5223 ? 00:00:00 sendmail
I also ran a telnet to the server and received a reply:
Connecting to net1.diotimadesign.com ... Could not open a connection to host
on port 25 : Connect failed
Does this mean that sendmail is running, but is failing to connect with
anything beyond the server?
I looked in the maillog and the only thing out of the ordinary I could find
was this:
Sendmail [1500]: NOQUEUE: SYSERR(root): /etc/sendmail.cf
line138: fileclass: cannot open /etc/sendmail.cG: no such file or
directory
Sendmail [1510]: NOQUEUE: SYSERR(root): /etc/sendmail.cf
line138: fileclass: cannot open /etc/sendmail.cG: no such file or
directory
Sendmail [1598]: alias database /etc/aliases rebuilt by root
Sendmail [1500]: /etc/aliases: 40 ailiases, longest 10 bytes, 395
bytes total
Sendmail [1500]: starting daemon (8.11.6): SMTP+queueing@ 00:01:00
Other than that, it's just the standard log in and log out records in the
maillog
> >In any case, after I had attempted to construct the genericstable and
modify
> >the .mc file, any mail from users on the system still read
> >user@diotimadesign .com instead of us...@userdomain.com
>
> So probably the genericstable isn't being used, probably because there
> is some problem with it, and the '-o' (for "optional") tells sendmail to
> just forget about it in that case instead of complaining and exiting.
I modified sendmail.mc and took out the -o reference
>
> You can test it with
>
> sendmail -bt
> > /map generics user
> > /tryflags hs
> > /try esmtp user
> > /try esmtp us...@server.host.name
> > /tryflags es
> > /try esmtp user
> > /try esmtp us...@server.host.name
>
> (hs = header sender, es = envelope sender).
I ran all of these commands:
/map generics user gave a reply of:
map named "generics" not found
hs esmtp user:
From Canonify input - masqSMTP input it was just the user
From masqSMTP return - masqHDR input it was user <@*LOCAL*>
From masqHDR return - final return it was us...@net1.diotimadesign.com
Rcode =0, addr=us...@net1.diotimadesign.com
hs esmtp us...@net1.diotimadesign.com
All replies were listed as us...@net1.diotimadesign.com
es esmtp user
All replies were identical to hs esmtp user
es esmtp us...@net1.diotimadesign.com
All replies were identical to hs esmtp us...@net1.diotimadesign.com
>
> --Per Hedeland
> p...@bluetail.com
Well, you could also try looking at it yourself, not just post it here
and sit back and wait...
>OK, I've loaded a copy of the sendmail.mc file to my site
>http://www.diotimadesign.com/smmc.htm
Try reading the comments in it too, and FAQ 5.3.3 (www.sendmail.org/faq).
>I ran ps -C sendmail and got
>PID TTY TIME CMD
>5223 ? 00:00:00 sendmail
Well, that form gives only the command name - we see that a sendmail
process is running, but not in what mode. Try instead e.g.
ps -ax | grep sendmail
>I also ran a telnet to the server and received a reply:
>Connecting to net1.diotimadesign.com ... Could not open a connection to host
>on port 25 : Connect failed
That seems to be a rather defective 'telnet' program, not telling you
anything about the *reason* for the failure. It should probably have
said "Connection refused". Try it on the same host where sendmail is
running, both 'telnet localhost 25' and 'telnet net1.diotimadesign.com
25' - and read the FAQ entry again.
>Does this mean that sendmail is running, but is failing to connect with
>anything beyond the server?
Um, it means that the host you telnet'ed from is unable to connect to
your sendmail.
>I looked in the maillog and the only thing out of the ordinary I could find
>was this:
>Sendmail [1500]: NOQUEUE: SYSERR(root): /etc/sendmail.cf
>line138: fileclass: cannot open /etc/sendmail.cG: no such file or
>directory
>Sendmail [1510]: NOQUEUE: SYSERR(root): /etc/sendmail.cf
>line138: fileclass: cannot open /etc/sendmail.cG: no such file or
>directory
This is obviously a serious error, with a message explaining in plain
English. But perhaps that's from earlier attempts, since the filename
doesn't match what is in your .mc file - or you are not actually using a
sendmail.cf generated from that .mc file.
I don't think you mentioned where your sendmail program came from, but
note that RedHat causes confusion by building the sendmail in their
rpm's to look for /etc/sendmail.cf, while if you build current standard
sendmail from source it will use /etc/mail/sendmail.cf.
>I modified sendmail.mc and took out the -o reference
>I ran all of these commands:
>
>/map generics user gave a reply of:
>map named "generics" not found
If there is a Kgenerics line in sendmail.cf, and it doesn't have the -o,
you *must* have received an error message about the genericstable prior
to this. Please *read* the information that sendmail gives you.
>hs esmtp user:
None of the remaining tests are meaningful if the genericstable isn't
used, of course.
--Per Hedeland
p...@bluetail.com