Operating System - HP-UX
1834149 Members
2366 Online
110064 Solutions
New Discussion

Re: place aliases.db file in a different location?

 
SOLVED
Go to solution
RobertCarback
Frequent Advisor

place aliases.db file in a different location?

Is it possible to take an aliases file (say a user-defined) and using the newaliases command place the resulting aliases.db in a different location other than /etc/mail?
5 REPLIES 5
Tim Nelson
Honored Contributor

Re: place aliases.db file in a different location?

There looks to be NO option for such in either the sendmail or newaliases man page.

Just curious on why you want to do this ?
Dennis Handly
Acclaimed Contributor

Re: place aliases.db file in a different location?

You might be able to use a symlink to move it elsewhere. (But this would be root and not user defined. :-)

And as Tim asked, why? Out of space in "/"?
For spam security you don't want this backed up?
Or you want to ignite multiple machines but don't want the same aliases?
VK2COT
Honored Contributor
Solution

Re: place aliases.db file in a different location?

Hello,

It is actually easy to do it.

I assume your question is related to
Sendmail Mail Transfer Agent (defalt on
HP-UX). If not, I can give you
answers for Postfix, Exim, Smail, Qmail...

Check the following option in
/etc/mail/sendmail.cf:

O AliasFile=/etc/mail/aliases

Change it to some other directory, make
sure you have ASCII file called aliases
there, and whatever database format you
use newaliases(1) will know what to with
it :)

Cheers,

VK2COT
VK2COT - Dusan Baljevic
VK2COT
Honored Contributor

Re: place aliases.db file in a different location?

One more note.

There is nothing wrong (if you wish
so) to have multiple aliases file.

I prove it to you, I just did
it ona SuperDome nPar running HP-UX 11.11.

O AliasFile=/etc/mail/aliases
O AliasFile=/var/ZZZ/aliases

Then, I ran:

# newaliases
/etc/mail/aliases: 7 aliases, longest 9 bytes, 88 bytes total
/var/ZZZ/aliases: 1 aliases, longest 11 bytes, 14 bytes total

One warning: make sure that directory and
file permissions for additional aliases
do not cause "unsafe" errors!

Cheers,

VK2COT
VK2COT - Dusan Baljevic
RobertCarback
Frequent Advisor

Re: place aliases.db file in a different location?

Thank you Dusan