- How to add/edit email aliases:
This is useful when you have to send a report to many emails and you don't want to stress out too much the command line.
For example, you need to send email to asd@domain.com, fred@domain.com and dust@domain.com.
You open
/etc/mail/aliasesin your favorite editor and add the following line:
reporting: asd@domain.com, fred@domain.com, dust@domain.comSave the file and execute the command
newaliases(or
sendmail -bi):
gzaix@root:/etc/mail # newaliases
WARNING: Group writable directory /var/spool
WARNING: Group writable directory /var/spool/mqueue
/etc/mail/aliases: 8 aliases, longest 121 bytes, 374 bytes total
Now your command line will be much simpler:
/some/script.sh | mail -s "Reporting of the script.sh" [color=green]reporting[/color]PS: this was done on AIX but it should work on all distributions.
- Log in to post comments
- 25524 views