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.
Reply
 
Thread Tools Display Modes
  #1  
Old 1st December 2011, 23:38
dgmufasa dgmufasa is offline
Member
 
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:
http://stackoverflow.com/questions/3...iving-an-email

but it uses CPanel

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

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
__________________
Falko
--
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
  #3  
Old 5th December 2011, 00:59
dgmufasa dgmufasa is offline
Member
 
Join Date: Oct 2011
Posts: 86
Thanks: 5
Thanked 1 Time in 1 Post
Default

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?
http://stackoverflow.com/questions/1...ments-from-php

I found this in the listing:
Quote:
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:

msgsubmit
"| /usr/bin/php ~path/to/example.php"
msgsubmit-box
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 22:40.
Reply With Quote
  #4  
Old 14th December 2011, 14:15
dgmufasa dgmufasa is offline
Member
 
Join Date: Oct 2011
Posts: 86
Thanks: 5
Thanked 1 Time in 1 Post
 
Default

also found this:
http://forum.parallels.com/showthread.php?t=99358
http://www.michael-hammer.at/blog/po...with_maildrop/

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

Bookmarks

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 16:01
Shell script for "Perfect Server Debian Squeeze" Croydon Tips/Tricks/Mods 3 28th May 2011 09:00
Shell Script If File Exists bschultz Programming/Scripts 5 30th April 2010 20:03
Need help for writing shell script chris_87 Programming/Scripts 7 4th April 2007 15:50
need urgent help for writing shell script dips Programming/Scripts 8 3rd September 2006 19:40


All times are GMT +2. The time now is 00:33.


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