Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > ISPConfig 3 > Installation/Configuration

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Thread Tools Display Modes
Old 2nd December 2011, 00:38
dgmufasa dgmufasa is offline
Join Date: Oct 2011
Posts: 86
Thanks: 5
Thanked 1 Time in 1 Post
Default trigger a shell script on an through an email

Hello all,

Is it possible to accomplish this through ISPConfig?

This is what I have seen:

but it uses CPanel

Reply With Quote
Sponsored Links
Old 2nd December 2011, 18:34
falko falko is offline
Super Moderator
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,751 Times in 2,581 Posts

ISPConfig 3 doesn't use procmail, so this won't work. But you can create a Postfix filter: http://www.postfix.org/FILTER_README.html
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
Old 5th December 2011, 01:59
dgmufasa dgmufasa is offline
Join Date: Oct 2011
Posts: 86
Thanks: 5
Thanked 1 Time in 1 Post

Thanks for the information.

What I needed to do was something along these lines - except that images would be deposited in the directories of the senders.

Could this work on ISPConfig?

I found this in the listing:
If you're creating a dedicated mailbox for this purpose, using a filtering mechanism is almost definitely not what you want. Instead, you want to have the mailbox be a pipe to the application, and have the application simply read in the message from stdin, parse out the body, and MIME parse the body to get the attachments.

Having a mailbox be a pipe is supported by all the popular unix-based MTAs that I know of, such as sendmail, postfix, and qmail. Generally you define it in your aliases file, like so:

# sendmail or postfix syntax
msgsubmit: "| /usr/bin/php ~path/to/example.php"

Then mails to msgsubmit@ get routed to a php program for delivery.

This has the advantage of not relying on an IMAP server or any other server beyond the MTA being alive, and it works fine as long as you have control over the MTA of the destination host. Filtering is what you'd want if you wanted all messages on a system to be inspected by the script, which I'm guessing is not the case.

If you want a copy kept in a mailbox somewhere (not a bad idea) simply define the alias to go to multiple addresses, like so:

msgsubmit: "| /usr/bin/php ~path/to/example.php", msgsubmit-box
Or postfix virtual format:

"| /usr/bin/php ~path/to/example.php"
The item above says to create an Alias as a pipe. How can one execute this instruction in ISPConfig?

Last edited by dgmufasa; 5th December 2011 at 23:40.
Reply With Quote
Old 14th December 2011, 15:15
dgmufasa dgmufasa is offline
Join Date: Oct 2011
Posts: 86
Thanks: 5
Thanked 1 Time in 1 Post

also found this:

Last edited by dgmufasa; 14th December 2011 at 15:20.
Reply With Quote


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
question in shell script abood1190 Programming/Scripts 3 2nd September 2011 17:01
Shell script for "Perfect Server Debian Squeeze" Croydon Tips/Tricks/Mods 3 28th May 2011 10:00
Shell Script If File Exists bschultz Programming/Scripts 5 30th April 2010 21:03
Need help for writing shell script chris_87 Programming/Scripts 7 4th April 2007 16:50
need urgent help for writing shell script dips Programming/Scripts 8 3rd September 2006 20:40

All times are GMT +2. The time now is 07:16.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.