Operating System - HP-UX
1753797 Members
7505 Online
108805 Solutions
New Discussion юеВ

Re: Trigger command execution via e-mail - HPUX 10.20

 
SOLVED
Go to solution
Francisco Mancardi_1
Frequent Advisor

Trigger command execution via e-mail - HPUX 10.20

Hi!:
I would like to receive help (a Fool's Guide) to configure
my mail system in order to run a command after receiving
an e-mail directed to a specific user.
I have read that this can be done through aliases but my
mai knowledge is " below zero".

Any hint (the steps to follow, a pointer to a web site) is
welcome.

Thanks for your help

Francisco
2 REPLIES 2
Sridhar Bhaskarla
Honored Contributor
Solution

Re: Trigger command execution via e-mail - HPUX 10.20

Francisco,

You can configure a command as an alias. Read the man page for aliases.

For ex.,

Edit /etc/mail/aliases and keep the following

some_alias:"|echo "You got mail" >> /tmp/some_alias.mail"

#newaliases
#echo "test" |mailx some_alias
#mailq

.

Once the mailq is cleared, you can see the file /tmp/some_alias.mail. So basically it executed the command echo when you send a mail to some_alias.

Now you try sending mail from another system but with the mail-id some_alias@first_system

Search for ARPA Services in docs.hp.com to get more details on SMTP.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
Sridhar Bhaskarla
Honored Contributor

Re: Trigger command execution via e-mail - HPUX 10.20