1753539 Members
5484 Online
108795 Solutions
New Discussion юеВ

/etc/aliases file

 
Coolmar
Esteemed Contributor

/etc/aliases file

Hi,

I want to setup the aliases file so that when any message comes in for "root"...a copy of the message goes to the root mailbox and a copy is forwarded to my smtp account. Can someone show me how to do it?

Thanks!
7 REPLIES 7
IT_2007
Honored Contributor

Re: /etc/aliases file

check the link for creatin mail aliases in the following link:

http://docs.hp.com/en/A2615-90003/ch07s07.html
Mel Burslan
Honored Contributor

Re: /etc/aliases file

edit the /etc/mail/aliases file and insert a line like this:

root : mysmtpaddress@myhost.com

save and exit

execute command :

newaliases

which will build the aliases database from the ascii entries you made above.


After this, make sure your server can send mail to the outside world. To confirm this, make sure you have a line like this in /etc/mail/sendmail.cf file

DSmailrelayserver

and this mailrelayserver is able to accept and relay mail messages from your hpux host.

Hope this helps
________________________________
UNIX because I majored in cryptology...
Coolmar
Esteemed Contributor

Re: /etc/aliases file

I tried that method, but it only sent the message to the alias and didn't keep a copy in root's mailbox.
Coolmar
Esteemed Contributor

Re: /etc/aliases file

I just had to add root to the local aliases

Local Aliases
root: sysadm, root
sysadm: name@smtp.com
Marcel Boogert_1
Trusted Contributor

Re: /etc/aliases file

Hi there,

I you follow Mel's guide you shouldn't forget the following:

The program "/usr/sbin/newaliases" must be run after this file is updated, or else any changes will not be visible to sendmail.

Have you done that?

Regards, MB.
Coolmar
Esteemed Contributor

Re: /etc/aliases file

Yes, I knew that part. Thanks!
markbrassard
New Member

Re: /etc/aliases file

I use something like this format:

info: \info,johndoe

This sends a copy to the info mailbox and to the user johndoe.

This is on a Linux server but should work for any sendmail application.