Sendmail - Alias0; missing map file /etc/mail/aliases (2935 Views)
Reply
Advisor
Brian Atkins
Posts: 37
Registered: ‎11-05-2000
Message 1 of 10 (2,935 Views)

Sendmail - Alias0; missing map file /etc/mail/aliases

[ Edited ]

I'm in the process of updating sendmail to 8.11.5 and I am having issues with the aliases file. The upgrade is basically complete and I am able to mail to fully resolved addresses (i.e., user@system.com) but not an alias. When mail is sent to an alias, I get the error:

dbm map "Alias0": missing map file /etc/mail/aliases

According to the documentation and information from the FAQs at sendmail.org, the error is a result of improper security settings. However, following the documentation and FAQs at sendmail.org, I ran:

chmod go-w / /etc /etc/mail /usr /var /var/spool /var/spool/mqueue
chown root chmod go-w / /etc /etc/mail /usr /var /var/spool /var/spool/mqueue

and the alias file permissions are:

-rw-r--r-- 1 root bin 1416 Aug 15 20:35 aliases
-r--r--r-- 1 bin bin 32768 Aug 15 12:47 aliases.db

I did find a reference to the new version not liking .forward files, so I removed them and added the users to the alias file.

I can't find any other references for other issues that might be causing the error at sendmail.org, in the README files or in my O'Reilly sendmail book.

Any assistance is greatly appreciated.

 

 

P.S. this thread has been moved from HP-UX > General to HP-UX > messaging - HP Forums Moderator

Advisor
Brian Atkins
Posts: 37
Registered: ‎11-05-2000
Message 2 of 10 (2,935 Views)

Re: Sendmail - Alias0; missing map file /etc/mail/aliases

An additional note: I had started posting my message before I noticed Sam Rudland's post "Odd Sendmail Behaviour". Since then, I have tried the recommendations by Ramesh and James with no more success. However, I do get a slightly different message:

# newaliases
dbm map "Alias0": unsafe map file /etc/mail/aliases: Permission denied
WARNING: cannot open alias database /etc/mail/aliases
Cannot create database for alias file /etc/mail/aliases

Occasional Advisor
Steve Darnell
Posts: 6
Registered: ‎08-15-2000
Message 3 of 10 (2,935 Views)

Re: Sendmail - Alias0; missing map file /etc/mail/aliases

This may or may not help, but I have my /etc/mail directory and aliases files set to the following, and have not had any problems:

drwxr-xr-x 2 root root /etc/mail

-rw-r--r-- 1 root root /etc/mail/aliases
-rw-r--r-- 1 root root /etc/mail/aliases.db
Honored Contributor
linuxfan
Posts: 874
Registered: ‎10-19-2000
Message 4 of 10 (2,935 Views)

Re: Sendmail - Alias0; missing map file /etc/mail/aliases

Hi,

All the permissions seem ok but the group for /etc/mail/aliases.db should be mail
The permissions should be (644)
owner root
group mail

-rw-r--r-- root:root aliases
-rw-r--r-- root:mail aliases.db

-HTH
I am RU
They think they know but don't. At least I know I don't know - Socrates
Advisor
Brian Atkins
Posts: 37
Registered: ‎11-05-2000
Message 5 of 10 (2,935 Views)

Re: Sendmail - Alias0; missing map file /etc/mail/aliases

Thanks for the information, but I'm afraid that I'm still getting errors, slightly different, but an error none the less:

dbm map "Alias0": unsafe map file /etc/mail/aliases: Permission denied
WARNING: cannot open alias database /etc/mail/aliases
Cannot create database for alias file /etc/mail/aliases

Honored Contributor
Sridhar Bhaskarla
Posts: 6,350
Registered: ‎08-15-2001
Message 6 of 10 (2,935 Views)

Re: Sendmail - Alias0; missing map file /etc/mail/aliases

The default permissions are
bin:bin /etc/mail

alias.db should have the group as mail.

How about renaming aliases.db and running
newaliases again and see what happens?.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
Honored Contributor
Sridhar Bhaskarla
Posts: 6,350
Registered: ‎08-15-2001
Message 7 of 10 (2,935 Views)

Re: Sendmail - Alias0; missing map file /etc/mail/aliases

The default permissions are
bin:bin /etc/mail

aliases.db should have the group as mail. Read permissions for others is sufficnet for aliases file.

How about renaming aliases.db and running
newaliases again and see what happens?.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
Advisor
Brian Atkins
Posts: 37
Registered: ‎11-05-2000
Message 8 of 10 (2,935 Views)

Re: Sendmail - Alias0; missing map file /etc/mail/aliases

OK, so this is what I get for being assigned a dying system. Oh, well. In any event, this is what I was able to uncover on my own. I appreciate all of the great answers, it's just the new version of sendmail has some new rules to abide by. Something about security or something. Anyway, this is what sendmail.org has about my error in relation to the new version:
_______________________________________________
unsafe map file /etc/mail/aliases:
With the latest sendmail release many people get an error message like:
unsafe map file /etc/mail/aliases
(or another map). There may be several reasons for this, the most common is that the permissions of the directories leading to the alias file are incorrect. It must be:
drwxr-xr-x 12 root staff 3072 Nov 20 10:47 /etc/
drwxr-xr-x 4 root staff 1024 Dec 21 16:40 /etc/mail/
i.e., the directory must be owned by root and not writable by the group or the rest of the world. The alias file itself must have similar permissions. Moreover, if you have a db map, you may try to touch the resulting map (file.db) and call makemap or newaliases thereafter.
See the release notes for further details. /usr/lib/sendmail -bi -d44.4 gives some debug output for the alias map.
_______________________________________________

Am I allowed to give myself points? Or do I get negative numbers for posting my own answer?
Valued Contributor
Ralf Hildebrandt
Posts: 114
Registered: ‎04-16-1997
Message 9 of 10 (2,935 Views)

Re: Sendmail - Alias0; missing map file /etc/mail/aliases

No, but you get a negative 1000 points for still using sendmail :)
Postfix/BIND/Security/IDS/Scanner, you name it...
Occasional Visitor
Thangamariappan
Posts: 1
Registered: ‎09-11-2012
Message 10 of 10 (2,550 Views)

Re: Sendmail - Alias0; missing map file /etc/mail/aliases

Please find the below steps

 

1)Pls copy from working file of /etc/mail/aliases or copy &past below entries
##
#  Sendmail Alias File
#  @(#)B11.23_LRaliases $Revision: 1.1.212.1 $ $Date: 99/09/13 15:13:16 $
#
#  Mail to an alias in this file will be sent to the users, programs, or
#  files designated following the colon.
#  Aliases defined in this file will NOT be expanded in headers from
#  mailx(1), but WILL be visible over networks and in headers from
#  rmail(1).
#
#    >>>>>>>>>>   The program "/usr/sbin/newaliases" must be run after
#    >> NOTE >>   this file is updated, or else any changes will not be
#    >>>>>>>>>>   visible to sendmail.
##

# Alias for mailer daemon
MAILER-DAEMON   : root

# RFC 822 requires that every host have a mail address "postmaster"
postmaster      : root

# Aliases to handle mail to msgs and news
nobody          : /dev/null

# System Admistration aliases
operator        : root
uucp            : root
daemon          : root

# Ftp maintainer.
ftp-bugs        : root

# Local aliases

2)chown bin:mail /etc/mail/aliases
3)chown root:bin /usr/sbin/newaliases
4)chown root:mail /etc/mail/aliases.db
5)/sbin/init.d/sendmail stop
6)/sbin/init.d/sendmail start

The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation.