Re: how execute command on every mail received
- From: Tzafrir Cohen <tzafrir@xxxxxxxxxxxxx>
- Date: Tue, 15 Jun 2010 12:32:04 +0000
On Tue, Jun 15, 2010 at 05:33:47PM +0800, paragasu wrote:
Hi all,
I wonder if there is a simple SMTP deamon.
This deamon will execute a specific command on every email received.
I have a PHP program that will parse the email and
send SMS to specific mobile phone number thereafter.
Assuming you have postfix: See aliases(7).
Generally you can have the following line in /etc/postfix/aliases:
sms: |/path/to/command
Alternatively, in $HOME/.forward (of user 'sms?' put:
|/path/to/command
However you may want to only send some of those mails. In such a case,
you can use something like procmail to e.g. pipe only mails with a
specific subject (or some other specific header).
Note: I assumed you use postfix. Other decent MTAs have similar
concepts and capabilities.
--
Tzafrir Cohen | tzafrir@xxxxxxxxxx | VIM is
http://tzafrir.org.il | | a Mutt's
tzafrir@xxxxxxxxxxxxx | | best
tzafrir@xxxxxxxxxx | | friend
--
To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx
with a subject of "unsubscribe". Trouble? Contact listmaster@xxxxxxxxxxxxxxxx
Archive: http://lists.debian.org/20100615123203.GP16560@xxxxxxxxxxxxxxxxxxx
- References:
- how execute command on every mail received
- From: paragasu
- how execute command on every mail received
- Prev by Date: Re: PCI-E mini wireless card to use Debian as AP
- Next by Date: new install and 1 MB between partitions
- Previous by thread: Re: how execute command on every mail received
- Next by thread: Re: how execute command on every mail received
- Index(es):
Relevant Pages
|