Operating System - HP-UX
1834499 Members
2681 Online
110068 Solutions
New Discussion

/etc/aliases and # pound sign

 
SOLVED
Go to solution
Fred Martin_1
Valued Contributor

/etc/aliases and # pound sign

I'm hoping someone can tell me, or has a sandbox server they can try this on:

Can the /etc/aliases file have a comment after data on a line? Something like this....

accounting : fred,john,sally, # comment
tim,sue,jim

salesdept : frank,jenny # comment

I'm asking because I'm writing a script that reads the aliases file and would like to add tags in the form of comments, to easily pull lines out of the file.
fmartin@applicatorssales.com
2 REPLIES 2
Bill Hassell
Honored Contributor
Solution

Re: /etc/aliases and # pound sign

I think you mean /etc/mail/aliases, and no, training comments will be taken as emaill addresses, so you'll get addressing errors, typically "User unknown". Comments can be on their own line as well as blank lines. newaliases (or sendmail -bi) will not give an error for trailing comments.


Bill Hassell, sysadmin
Fred Martin_1
Valued Contributor

Re: /etc/aliases and # pound sign

thanks Bill
fmartin@applicatorssales.com