Link to home
Start Free TrialLog in
Avatar of os012897
os012897

asked on

Problems getting sendmail 8.9.1 to run

Hi there,

I tried to upgrade our sendmail-daemon from 8.6.7 to 8.9.1! The machine (lets call it A) runs SunOS 5.6 and is not our mailserver, as I wanted to try the new daemon out before installing it on machine (B) which is our mailserver. Users get their mail from B via POP.

Before upgrading, when a user on A sent a mail to another user with "mail otheruser", the machine A would deliver the mail to machine B where "otheruser" could retrieve it via POP.
Now machine A just queues the message saying that it cannot access the alias database.
When I send the mail from A to "otheruser@mydomain.abc" it works, even though I still get a message "dbm map "Alias0": unsafe map file /var/lib/mail/aliases".

Just in case I created the "relay-domains" file and added my own domain, which I guess should not be necessary, but that would not help either.

When I try to rebuild the alias database with "sendmail -v -bi" I get the following:

WARNING: World writable directory /var/lib/mail
dbm map "Alias0": unsafe map file /var/lib/mail/aliases
WARNING: cannot open alias database /var/lib/mail/aliases
Cannot create database for alias file /var/lib/mail/aliases

8.9.1 seems to be picker about those things, as with 8.6.7! I basically got the same error message, but still it worked.

I cannot even change the access-rights to the /var/lib/mail directory, as it seems to be locked by an application. Even killing sendmail would not help.

In my log I get:
Dec 22 19:15:02 MYCOMPUTER sendmail[405]: NOQUEUE: SYSERR(root): dbm map "Alias0": unsafe map file /var/lib/mail/aliases
for ever try to send a mail.


I know this sounds pretty confusing and confused ... but maybe someone can give me a hint....

Greetings,

os

PS: I used the same .mc files that were already used to configure 8.6.7, could that be a problem?
Avatar of n0thing
n0thing
Flag of United States of America image

You cannot use the same .mc file 8.6.x on 8.8+, you'll need to build a new one, or using the one already there.
sendmail 8.8.x came by default on Solaris 2.6m why don't you use that one ?? There ins't mch diff. between 8.8.x and 8.9.1 ...
Avatar of os012897
os012897

ASKER

Hi n0thing,

I did not install our Solaris machines and I have to use 8.9.1 to get the default-no-relaying behaviour that I want.

Thanx for the comment though, do you know what might be the reason for my specific problem? If I had to build a new .mc file for our mail-domain (the file with the DOMAIN and OSTYPE etc. in it) I probably would not do it differently, as I think (not sure though) that the .mc file from 8.6.7 had all the info in it that I would need for 8.9.1 too.

Greetings,

os

Sun's sendmail (up to 8.8) is different to Sendmail's sendmail (Sun has special behavior for "subsidary sendmail.cf" which simplifies mail in homogeneous Sun networks).
So you must use a sendmail.cf as described by sendmail 8.9.1 .
Also note that Sun's  mail command is proprietary too, a bsd-like mail is named mailx or may reside in /usr/bsd .
Hi ahoffmann,

Thanx for your comment.

The only custom .mc/.m4 files I used (directly from my previous 8.6.7 installation) are:
myname.mc:
==========
VERSIONID(`@(#)MYNAME.mc  2.0 (MYNAME (tm)) 22/1/95')
OSTYPE(solaris2.MYNAME)dnl
DOMAIN(MYNAME.hidden)dnl
MAILER(local)dnl
MAILER(smtp)dnl
FEATURE(allmasquerade)dnl

myname.m4:
==========
define(ALIASES, LIBDIR/aliases)
define(PSEUDODOMAINS, BITNET EARN UUCP)
define(FORCE_NAMED)
define(HIDDENNETHOST, MYNAME.X.Y.Z)
define(HIDDENNET, LIBDIR/hidden_hosts)
#define(MAILNAME, MYNAME.X.Y.Z.)
define(GENERICFROM, LIBDIR/genericfrom)
define(PSEUDONYMS, MYNAME.X.Y.Z)
define(RELAY_HOST, MYRELAY.A.B.C)
define(RELAY_MAILER, TCP)
define(POSTMASTERBOUNCE, root@MYNAME.X.Y.Z)
define(BANGIMPLIESUUCP)
define(DOMAINTABLE, LIBDIR/domaintable)

solaris2.myname.m4:
================
VERSIONID(`@(#)solaris2.MYNAME.m4 8.2 MYNAME (tm)) 1/23/94')
divert(-1)

define(`ALIAS_FILE', /var/lib/mail/aliases)
define(`HELP_FILE', /etc/mail/sendmail.hf)
define(`STATUS_FILE', /etc/mail/sendmail.st)
define(`LOCAL_MAILER_FLAGS', `fSn')

myname.hidden.m4:
=================
divert(-1)
#MYNAME sendmail configuration
divert(0)
VERSIONID(`@(#)MYNAME-hidden.mc   2.0 (MYNAME (tm)) 22/1/95')
MASQUERADE_AS(MYNAME.X.Y.Z)dnl

Can anyone see something wrong with those files?? The only "special" thing I see there are the masquerade and hide commands, could they account for my problems?

Does anyone know how to change the access-permissions on the /var/lib/mail directory on Solaris?? I cannot do it as some program obviously has it locked all the time. Killing sendmail did not help .....

Thanx,

os

ASKER CERTIFIED SOLUTION
Avatar of essuu
essuu

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Hi essuu,

Thanx for your answer ....

WARNING: World writable directory /var/lib/mail
dbm map "Alias0": unsafe map file /var/lib/mail/aliases
WARNING: cannot open alias database /var/lib/mail/aliases
Cannot create database for alias file /var/lib/mail/aliases

I think it is because some other application has a lock on the file (as on the /var/lib/mail directory) but I do not know which!

It also would not let me change the permissions on the /var/lib/mail directory ..... is there anything I have to do before I can do it that?

Greetings,

os
no, no,
Please read documention for sendmail 8.9.x
  <bold> this sendmail is different to all previous ones </bold>

os, these warnings come from world and/or group-writable dirs and/or files, exactly as the messages say.
You can omit them by using:

O DontBlameSendmail=GroupWritableDirPathSafe

in sendmail.cf, respectively

define(`confDONT_BLAME_SENDMAIL', GroupWritableDirPathSafe)

in the .mc file.
try following .mc file:

divert(0)dnl
VERSIONID(`@(#)generic-solaris2.mc      8.8 (Berkeley) 5/19/1998')
OSTYPE(solaris2)dnl
DOMAIN(generic)dnl
MAILER(local)dnl
MAILER(smtp)dnl
MASQUERADE_AS(as.domain)
MASQUERADE_DOMAIN(your.domain)
FEATURE(allmasquerade)
FEATURE(masquerade_entire_domain)
FEATURE(masquerade_envelope)
define(`confDONT_BLAME_SENDMAIL', GroupWritableDirPathSafe)