On this page
Running a Command When Receiving an Email
Introduction
There’s a very useful feature that can be easily implemented: launching a command or script when receiving an email.
Usage
Sending an Email
You can send an email in the following way:
|
|
If you want to add an attachment:
|
|
Or for a binary attachment:
|
|
Receiving an Email
To use this procedure, edit the aliases configuration and add a line like this (/etc/aliases
):
|
|
When you send an email to your server with the recipient test (e.g. test@fqdn), the touch command will be executed.
Note: Don’t forget to run newaliases after making changes.
Last updated 06 May 2013, 08:32 CEST.