• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 343
  • Last Modified:

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?
0
os012897
Asked:
os012897
1 Solution
 
n0thingCommented:
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 ...
0
 
os012897Author Commented:
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

0
 
ahoffmannCommented:
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 .
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
os012897Author Commented:
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

0
 
essuuCommented:
Hi,

 first, you said:
<em>When I try to rebuild the alias database with "sendmail -v -bi" I get the following</em>

<b>sendmail -v -bi</b> causes the aliases to be <b>initialised</b> as in, setup for the first time. Try running the command <b>newaliases</b> to rebuild your alias database.

As for any problems with sendmail and domain names, set your system's domain name in the
<code>/etc/defaultdomain</code> file.

Hope that helps,

E&#167;&#167;
0
 
os012897Author Commented:
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
0
 
ahoffmannCommented:
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)
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now