Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Problems getting sendmail 8.9.1 to run

Posted on 1998-12-23
7
Medium Priority
?
341 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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 300 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

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

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

A metadevice consists of one or more devices (slices). It can be expanded by adding slices. Then, it can be grown to fill a larger space while the file system is in use. However, not all UNIX file systems (UFS) can be expanded this way. The conca…
Why Shell Scripting? Shell scripting is a powerful method of accessing UNIX systems and it is very flexible. Shell scripts are required when we want to execute a sequence of commands in Unix flavored operating systems. “Shell” is the command line i…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
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.:
Suggested Courses

604 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