Operating System - HP-UX
1836579 Members
1550 Online
110102 Solutions
New Discussion

Strange sendmail problem.

 
SOLVED
Go to solution
Chris Johnson_11
Occasional Advisor

Strange sendmail problem.

Hello all.

I wonder if someone could help with a really odd sendmail problem.

I am trying to set up a mail alias for root as I wish to monitor system messages more carefully. I really dislike command line mail. This is not a problem and should be simple. Most UNIX pop3 programs disable any UID under 10 from accessing mail remotely because of security risks, which is ok. So I have added an alias to /etc/mail/ aliases. This is a simple entry “root : cjohnson”



At this point I run “newaliases” to update /etc/mail/aliases.db . Again this is very simple of course. I should get something like the following.

warning: /etc/mail/aliases has world read or write
permission. This is unsafe.
warning: /etc/mail/aliases.db has world read or write
permission. This is unsafe.
/etc/mail/aliases: 7 aliases, longest 9 bytes, 88 bytes total

I actually get :-

db_map_open: cannot pre-open database /etc/mail/aliases.db: Permission denied

ndbm_map_open: cannot create database /etc/mail/aliases: Permission denied
WARNING: cannot open alias database /etc/mail/aliases
Cannot create database for alias file /etc/mail/aliases: No such device

I am running this as root !!!

/etc/mail has the following attributes.

total 408
-rw-r----- 1 bin bin 882 Apr 20 14:54 aliases
-r--r--r-- 1 root sys 835 Apr 20 14:36 aliases.bak
-rw-r----- 1 root mail 32768 Dec 16 2002 aliases.db
-r--r--r-- 1 bin bin 10203 Oct 27 1997 mailcap
-r--r--r-- 1 root sys 77759 Oct 9 2002 sendmail.cf
-r--r--r-- 1 root sys 12760 Oct 9 2002 sendmail.cf.bak
-r--r--r-- 1 root sys 77759 Apr 11 2002 sendmail.cf.orig
-r--r--r-- 1 bin bin 702 Feb 6 2002 sendmail.cw
-r--r--r-- 1 bin bin 1002 Oct 27 1997 service.switch

System is HP/UX 11.00 running on an HP/9000 A class.

Cheer
4 REPLIES 4
Naveej.K.A
Honored Contributor
Solution

Re: Strange sendmail problem.

Hi,

Stop sendmail.

/sbin/init.d/sendmail stop

and start sendmail

/sbin/init.d/sendmail start

This will rebuild your aliases database. If it still doesn't work, remove the aliases.db file after stopping sendmail. and then start sendmail and check if newaliases are throwing errors.

Another way of routing the root's mail to cjohnson would be the use of .forward file in the root's home directory.
cat cjohnson > .forward

Regards,
Naveej
practice makes a man perfect!!!
Eric Antunes
Honored Contributor

Re: Strange sendmail problem.

Hi Chris,

I have the following for aliases* files:

-rw-r----- 1 root bin 835 Jan 4 2000 aliases
-rw-r----- 1 root bin 24576 Apr 20 16:45 aliases.db
-rw-r--r-- 1 root mail 0 Jan 4 2000 aliases.dir
-rw-r--r-- 1 root mail 1024 Jan 4 2000 aliases.pag

Best Regards,

Eric Antunes
Each and every day is a good day to learn.
Robert-Jan Goossens
Honored Contributor

Re: Strange sendmail problem.

Chris,

Check this doc.

Document description: Sendmail: resolving permissions on sendmail configuration files
Document id: S1100003137

http://www4.itrc.hp.com/service/cki/docDisplay.do?docLocale=en_US&docId=200000063210491

Best regards,
Robert-Jan
Chris Johnson_11
Occasional Advisor

Re: Strange sendmail problem.

Excellant guys, thank you. a .forward seems to be the way to go.

Kind Regards
Chris Johnson