Click to See Complete Forum and Search --> : Sendmail compiling...
Mhaddy
12-03-2001, 12:43 AM
All right, I guess you could refer to me as the man with the unsolvable sendmail problems, as I have been pulling my hair out over this for literally months now.
I just installed the latest version of sendmail (8.12.1) and followed all of the steps in the readme (EXCEPT the step about the /devtools/Site/ one, as I haven't the faintest clue to what they're talking about).
When my box starts up I get the following error in /var/log/maillog:
readcf: map virtuser: class hash not available
readcf: config K line, map access, no map class
I've tried compiling with dbm instead of hash but it gives me the same error (with dbm instead of hash. Here's my sendmail.mc file:
divert(0)dnl
VERSIONID(`$Id: sendmail.mc,v 8.1 1999/09/24 22:48:05 gshapiro Exp $')
OSTYPE(linux)dnl
DOMAIN(mdsnexus.net)dnl
FEATURE(redirect)
FEATURE(always_add_domain)
FEATURE(local_procmail)
FEATURE(relay_entire_domain)
FEATURE(`virtusertable', `hash /etc/mail/virtusertable')dnl
FEATURE(`access_db', `-T<TMPF> hash /etc/mail/access')dnl
MAILER(local)dnl
MAILER(smtp)dnl
Is there anything wrong with this? Or perhaps I've missed something somewhere? Please help, this is absolutely ridiculous :(
[ 02 December 2001: Message edited by: Mhaddy ]
error27
12-03-2001, 02:37 AM
What distro and version are you using?
There are often simpler ways than compiling from scratch... Also distros customize things a bit.
posterboy
12-03-2001, 10:35 AM
sendmail.cf (which you have built out with M4, we will assume) expects both access and virtuser stuff to be in a DB format.Often in /etc/mail. Make up your tables in ascii, then do makemap (read the man page on the syntax) to create these hashes. HTH, Ray
Mhaddy
12-03-2001, 03:23 PM
I'm running Linux RH 7.1.
When I first compiled dbm:
FEATURE(`virtusertable', `dbm /etc/mail/virtusertable')dnl
FEATURE(`access_db', `-T<TMPF> dbm /etc/mail/access')dnl
in sendmail.mc, I then created the access and virtusertable in /etc/mail. Then after inputting my entries (according to Sendmail's walkthrough of virtual host (http://www.sendmail.org/virtual-hosting.html)) I tried to convert the access and virtusertable's:
makemap dbm /etc/mail/virtusertable < virtusertable
It told me I needed -DNDBM (if I remember correclty) when I compiled. I didn't know what to do, so I went back to my sendmail.mc file and replaced dbm with hash and then according to this document (https://www.nsacom.net:1952/openbsd/txt/sendmail_redundancy.txt) I used the following commands to convert the files:
makemap hash /etc/mail/virtusertable.db < /etc/mail/virtusertable
This one worked. So, I restarted and then it still gave the same error. :( This is where I'm at now...
posterboy
12-03-2001, 04:20 PM
I don't really know what's gone wrong, but i do know RH7.1 comes with preconfigured sendmail binaries that are already working. I think some adjustment has to be made to make it see outside localhost space, and I don't know what that is, but I am sure others do. Are you taking this route from a need, or just climbing the mountain cause it's there? Ray
Mhaddy
12-03-2001, 08:32 PM
I've always been under the impression that if I wanted to customize sendmail I had to do it through the packages and not through the RPM's, since they install just a general config.
The above values (first message) are what I believe I need / want in my sendmail.mc to have things (both sendmail and POP3 email addresess) operating successfully.
So, how would I go about this with the RPM's? OR, is it logical to do so given what I need / want to do?
posterboy
12-04-2001, 06:46 AM
I am using RH6.2 here, with the sendmail pack as distributed, and by jacking around with the CF file, and the stuff in /etc/mail, I find it quite flexible. I only have a half dozen users, but they all can do email, pop it from anywhere, etc. I would expect 7.1 to be the same.
error27
12-05-2001, 03:10 AM
yeah.
I would stick with RPMs/debs whenever I could.
Compiling stuff from scratch all the time is a twisted form of masochism in most cases. In rare cases it's required for unusual features. Also some people like to do things "the old way."
Mhaddy
12-06-2001, 12:07 AM
Well, I've got to hand it to you guys, your advice worked! I deleted everything in my /etc/mail directory and installed the latest sendmail RPM and sendmail is now running and operating properly!
I've also made a backup of all my config files in there so if I do end up screwing something up in the future, I can just copy the ones back :)
What I'm doing right now is trying to get POP3 email's working. I've got the IPOP3daemon running so I think it's just a matter of configuring sendmail now, right?
Edit: Now I'm making progress! I have had no errors with sendmail, but receiving the following one through MS Outlook on another machine while trying to send email:
"Server Response 550 5.7.1 <email@email.com>... Relaying Denied. IP Name Lookup Failed [internal LAN IP]"
[ 05 December 2001: Message edited by: Mhaddy ]
PLBlaze
12-06-2001, 03:19 AM
[QUOTE]Originally posted by Mhaddy:
<STRONG>I've also made a backup of all my config files in there so if I do end up screwing something up in the future, I can just copy the ones back :)</STRONG>
I would be careful copying the old files over or else they might cause trouble later on...i'm speaking of sendmail.cf especially.
<STRONG>"Server Response 550 5.7.1 <email@email.com>... Relaying Denied. IP Name Lookup Failed [internal LAN IP]"</STRONG>
It fails because the client hostname/ip is not known to server thus relaying denied...
You can create /etc/mail/local-hostnames and put the ip in there (might want also create relay-domains file if you will relay) then run it thru makemap to create the db file.For more info see the FAQ-u at www.sendmail.org (http://www.sendmail.org) .Hope this helps.
Mhaddy
12-06-2001, 02:08 PM
For that relaying problem, I just put the IP in my /etc/mail/access file and then rebuilt the database and everything works now! Is this is the right way to go about things? I thought that the local-host-names file was only for domains that you hosted on your machine... ie. aliases for that machine.
Also, for all email addresses, do I have to add them to the virtusertable? Like, if I create a user named john, will it automatically be linked to john@whateverdomain.com or do I have to do the:
john@whateverdomain.com john
Hmm... also, since I'm hosting more than one domain, if I create the john user they can use it for john@domain1.com and john@domain2.com for example, right? I thought this is what the virtusertable file was for, to link the two together. So, you could only have john@domain1.com for the user john and he'd only be able to have his email for @domain1.com?
Thanks!