Aliases is used to handle mails to a non existing address. This will allow to redirect the msgs destined to a given name to a real user.
The Aliases File:
Default Aliases in system:
When a msg is bounced or problem delivering a msg the destination of the msg will be MAILER-DAEMON.
i.e, if a mail is send to a non existing user then the mail header is modified to MAILER-DAEMON as user.
This means the problem msg or bounced msg has to go some where, and sendmail delivers it to MAILER-DAEMON.
MAILER-DAEMON is aliased to postmaster, and postmaster aliased to root - hence the mail is delivered to root.
Aliases File is case insensitive:
The aliases defined in sendmail is case insensitive.
After changing the aliases no need to restart or reload the sendmail service because in each and every request sendmail consults the db of aliases.
Types of aliases defined
There are 5 types of aliases:
1. 1-to-1 Aliases.(1 alias map to one local username)
This will allow aliases to include the list from separate file
4. File Redirection Aliases - Re-route the message to file
5.Redirecting the E-mail to PIPE (redirecting the output to an application)
when a mail comes we can send the output to certain commands. for example if mail comes for the user john and the is in vacation then we can redirect the mail to the program "vacation" to send the automated reply.
kiran: "|/usr/bin/vacation kiran"
# sendmail -bv support
kiran... deliverable: mailer local, user kiran
To enable the vacation program for an user called fazi install the vacation program that comes along with the sendmail binary.
Create a forward file
# vim ~/.forward
\fazi, "|/usr/bin/vacation -t0 fazi"
# vim ~/.vacation.msg
Hi Thanks for you mail !
hai i am on vacation
will ping you once i'm back