Problem using "newaliases" to update sendmail alias file
Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Problem using "newaliases" to update sendmail alias file
I am getting pretty frustrated with this, perhaps someone can shed some light..
I am simply trying to update my alias file for sendmail. I run "newaliases" and it seems to run without any issues. However, my aliases.db file never updates to match my aliases text file. I have checked, and double checked the sendmail.cf to make sure I have the aliases file in the correct location, which I do. I am fairly new at this so I could easily be overlooking something extremely simple!
I am running sendmail on Redhat currently.
This is what I am doing:
1. editing the aliases file located at /etc/aliases
2. running "newaliases" and ran "sendmail -bi" for the hell of it
3. even restart my sendmail services using "service sendmail restart"
4. look at the aliases.db and bang my hand against my head because it doesn't update
5. go back to step "1." and repeat
I did read something about running the makemap command to create the db file, however, it doesn't seem to render the proper format for sendmail. I found some sites that reccomended running something to the effect of: "makemap hash /etc/aliases.db < /etc/aliases" but this stops sendmail from receiving mail completely so I have to copy over the old aliases.db file and restart the sendmail service. Is there a way I could manually create this file outside of the "newaliases" or "sendmail -bi" command? how about directly editing the aliases.db file?
If you are using RedHat 9, then I think editing the sendmail.cf file directly is not the best way to configure sendmail....RedHat provides another file sendmail.mc in the same directory (/etc/mail), which you should ideally look to edit ...
This is how I go on to make changes to my sendmail configuration:
1. cd /etc/mail
2. cp sendmail.cf sendmail.cf.orig
(keep a copy of original sendmail file in case u mess up)
After making changes in the file sendmail.mc give the command
3. m4 sendmail.mc > sendmail.cf
4. service sendmail restart
So that whatever changes made are activated.
As far as my knowledge goes, I dont think one needs to touch the aliases.db file as it is automatically generated from the /etc/aliases file.....
Thank you for the response. I have located the sendmail.mc file however interesting I did not find a line to specify the alias file location... Do I need to add a particular variable for aliases?
for an exmaple this is what I saw for the virtusertable:
Well, I can tell u one thing for sure that if you are using Red Hat 9 and chose to install sendmail from the RedHat cds, then you dont need to add anything to the sendmail.mc file with regard to aliases.
Just edit the file /etc/aliases and after you save and exit the editor, give the command
newaliases
service sendmail restart
Thats it...and you dont need to change anything else anywhere to get the aliases working.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.