Solved

Problems getting sendmail 8.9.1 to run

Posted on 1998-12-23
7
324 Views
Last Modified: 2013-12-16
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
Comment
Question by:os012897
7 Comments
 
LVL 5

Expert Comment

by:n0thing
ID: 1812555
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
 
LVL 3

Author Comment

by:os012897
ID: 1812556
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
 
LVL 51

Expert Comment

by:ahoffmann
ID: 1812557
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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 3

Author Comment

by:os012897
ID: 1812558
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
 
LVL 1

Accepted Solution

by:
essuu earned 150 total points
ID: 1812559
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
 
LVL 3

Author Comment

by:os012897
ID: 1812560
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
 
LVL 51

Expert Comment

by:ahoffmann
ID: 1812561
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Attention: This article will no longer be maintained. If you have any questions, please feel free to mail me. jgh@FreeBSD.org Please see http://www.freebsd.org/doc/en_US.ISO8859-1/articles/freebsd-update-server/ for the updated article. It is avail…
Installing FreeBSD… FreeBSD is a darling of an operating system. The stability and usability make it a clear choice for servers and desktops (for the cunning). Savvy?  The Ports collection makes available every popular FOSS application and packag…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
In a previous video, we went over how to export a DynamoDB table into Amazon S3.  In this video, we show how to load the export from S3 into a DynamoDB table.

863 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

24 Experts available now in Live!

Get 1:1 Help Now