cancel
Showing results for 
Search instead for 
Did you mean: 

mail question

 
SOLVED
Go to solution
Highlighted
Trusted Contributor

mail question

If I lose my /etc/mail/aliases, can I recreate by just reissuing the newaliases command?

thanks in advance
Should have been an astronaut.
8 REPLIES 8
Highlighted
Honored Contributor

Re: mail question

No. The aliases file is what the 'newaliases' command uses to created the aliases.db file.

If aliases is gone, you'll have to restore from backup.
Highlighted
Trusted Contributor

Re: mail question

the /etc/aliases file is there, just not /etc/mail/aliases.

Seriously? From backup??
Should have been an astronaut.
Highlighted
Acclaimed Contributor

Re: mail question

Hi Ron:

You can restore a virgin aliases file from:

/usr/newconfig/etc/mail/aliases

Regards!

...JRF...
Highlighted
Trusted Contributor

Re: mail question

Will I have to vi the /etc/mail/aliases file to match /etc/aliases, or will newaliases configure it for me?
Should have been an astronaut.
Highlighted
Honored Contributor

Re: mail question

On one of my systems /etc/aliases is a link to /etc/mail/aliases. So, if /etc/mail/aliases is gone, the /etc/aliases is useless.

If you cp a virgin aliases as JRF suggests, then yes you will have to edit it to get it back to its previous form.

The aliases file is only used by the newaliases command to generate aliases.db. If aliases doesn't exist, then there's no harm until you need to make a change.

There's no way I know of to have 'newaliases' work in reverse to generate aliases from aliases.db.

Why is restoring from backup a problem? That's why you have them.
Highlighted
Trusted Contributor

Re: mail question

Ok...got it from backup.

How do I re-link the /etc/aliases to /etc/mail/aliases.

That's the way it's setup on our other servers.

# ln -i /etc/aliases /etc/mail/aliases?
Should have been an astronaut.
Highlighted
Honored Contributor
Solution

Re: mail question

rm /etc/aliases
ln -s /etc/mail/aliases /etc/aliases
Highlighted
Trusted Contributor

Re: mail question

thank you all!! All better now!!
Should have been an astronaut.