Page 1 of 1

trigger script on receipt of email

Posted: Tue Sep 12, 2006 6:02 am
by skygriffin
Hi,

we are just starting to look at Scalix for our enterprise email system. One consideration is support for triggering scripts on receipt of email. We have several email accounts that use the .forward file to frigger a message to an automated paging service. The .forward looks like this:

"|/usr/local/bin/pager.pl"

This automated functionality is very important to us. There is a similar requirement (though not as critical) to implement an autoforward on a specific address.

I suspect that both these functions are possible - just finding it difficult to understand how to implement them.

any assistance appreciated
Scalix 10 / Fedora 4

Posted: Tue Sep 12, 2006 6:11 am
by Valerion
The easiest way would be to put the script in your sendmail /etc/aliases file, eg.

Code: Select all

pager<TAB>|/usr/local/pager.pl


Then mail sent to pager@domain.com will be sent to the script. However, this can very easily lead to security issues, so sendmail has very strict requirements on where the script is, and who is allowed to execute scripts. I suggest you look on www.sendmail.org for more info.

As to the autoforward, you simply create a "Redirect" rule with either sxaa or the web rules wizard, or the Outlook Rules Wizard and you're all set for that account.