Operating System - HP-UX
1753767 Members
5440 Online
108799 Solutions
New Discussion юеВ

Re: Receiving mailx error for /etc/mail/aliases

 
Houston Kemper
Occasional Advisor

Receiving mailx error for /etc/mail/aliases

Hello all,

I'm receiving the following error when I send a message via mailx:

dbm map "Alias0": unsafe map file /etc/mail/aliases: No such file or directory

I've got three other machines where the aliases file looks exactly the same and the mailx function works fine. Has anyone experienced this before?

Many thanks.
8 REPLIES 8
IT_2007
Honored Contributor

Re: Receiving mailx error for /etc/mail/aliases

If you have a good copy on other machine then move present one to old and copy from other server. Don't forget to run newaliases command.
Paul F. Carlson
Valued Contributor

Re: Receiving mailx error for /etc/mail/aliases

Check the owner and permissions on /etc/mail/aliases.

Should be owned by root and permissions of 640.

Paul
Link down -- cable problem?
Paul F. Carlson
Valued Contributor

Re: Receiving mailx error for /etc/mail/aliases

Also check the permissions on /etc/mail. Should be owned by root and not writeable by group or other.

Paul
Link down -- cable problem?
Houston Kemper
Occasional Advisor

Re: Receiving mailx error for /etc/mail/aliases

Thanks for the input thus far...

We thought it was a permissions issue, but when we set the permissions to 640 the error message still appeared.

I just attempted a copy of the aliases file from another server and running 'newaliases' resulted in the same error message.

Could I be looking at a corrupted aliases database file?
Paul F. Carlson
Valued Contributor

Re: Receiving mailx error for /etc/mail/aliases

I just wanted to double check: Did you also check the permissions on /etc/ and /etc/mail/ ?
Link down -- cable problem?
Houston Kemper
Occasional Advisor

Re: Receiving mailx error for /etc/mail/aliases

/etc is set to bin:bin and permissions of 555
and /etc/mail is set with the same ownership and permissions on a server that works. The server in question has /etc set to bin:bin but the permissions are 557 (not sure why) and /etc/mail is set to bin:bin with 555 perms.

Would 557 on etc be the cause?
Sameer_Nirmal
Honored Contributor

Re: Receiving mailx error for /etc/mail/aliases

Yes permissions 557 is a problem.

There is a default security check parameter set in sendmail. Hence if directories ( /, /etc, /etc/mail) above the file " /etc/mail/aliases" in this case are group or world writable, then sendmail will flash the similar error message.

So change the /etc permissions to 555.
Similary ensure the permissions for
/etc/mail/aliases bin:bin 640
/etc/mail/aliases.db root:sys 640
Bill Hassell
Honored Contributor

Re: Receiving mailx error for /etc/mail/aliases

You can safely assume that a 7 (or rwx) in the last digit of a directory is a BIG mistake (especially in system directories) unless the directory is /tmp or /var/tmp. The mail system is complaining that the permissions for the directory allow anyone of the system to trash sendmail.conf and aliases, and a bunch of other critical files.


Bill Hassell, sysadmin