Koozali.org: home of the SME Server

Email sys commands to SME.

BJ

Email sys commands to SME.
« on: April 30, 2002, 09:51:07 PM »
Hi,

I appreciate that this might sound abit off a strange request, but I am trying to have my SME 5 server run a perl script when an email is received by a specific user.

For example if I send an email to dothis@myisp.net with a subject of task-1 I need the sme server to go and run whatever script applies to task-1 label.

My thoughts are along the lines of seting up a dedicated account, pass all email through a script which pulls the relavant details out, then calls the appropriate script. I am OK with the perl side of things, just can seem to get the forwarding to the initial script working.

Any ideas (other than don't do this due to security risks) appreciated ?

Regards

BJ

Geoff Bennion

Re: Email sys commands to SME.
« Reply #1 on: June 12, 2002, 08:24:27 PM »
How about a cron job, which reads all mail for that user ?

Abe Loveless

Re: Email sys commands to SME.
« Reply #2 on: August 20, 2002, 09:09:26 PM »
I'm not real positive how this works, but if you already have the perl script written... can you just edit the user's .qmail file to redirect all incoming messages for that user to your script?

In:
/home/e-smith/files/users/USERNAME/.qmail

Change:
./Maildir/

To:
| /var/qmail/bin/preline /path/to/your/script

Might be worth a try, anyway.  This is working for me on one of the 3rd party apps that I just got installed.

Abe