More sendmail: aliases, virtusertable

January 15, 2004

Like there is not enough sendmail information on the net here is a quick and dirty tip for you.

Synopsis:

Want to send one email to multiple receipients/users using sendmail here is how.Edit the virtusertable file and add the user and the alias where the email will go to. The alias is a group name.


vi /etc/mail/virtusertable
user1@dmacias.org   DM-group

Save and close the file, and now make the file


cd /etc/mail
make

Now it is time to add your aliases, but before you do that make sure that you sendmail.mc file has the correct location for the aliases file.


vi /etc/mail/sendmail.mc

If you made any changes to the sendmail.mc file then you must change the cf file. You do that with the following command.


m4 sendmail.mc > sendmail.cf

Now make or edit the aliases file in whatever location you specified in the sendmail.mc file. I use the /etc/mail/ folder for all my sendmail files.


vi /etc/mailaliases
DM-group: user1@domain.com, user2@domain.com

I added two recepients in my DM-group, now you have to map the aliases.


newaliases

And presto all you need to do is restart sendmail


/etc/rc.d/init.d/sendmail stop
/etc/rc.d/init.d/sendmail start

posted in General News by dmacias

Follow comments via the RSS Feed | Leave a comment | Trackback URL

Leave Your Comment

 
Powered by Wordpress and MySQL. Theme by Shlomi Noach, openark.org