US: 1-941-4621-069
  
Cyprus: 3-572-2052-781

Go Back   ISPsystem.com Forums > ISPmanager > General technical discussion

Notices

Closed Thread
 
Thread Tools
Old 10-23-2009, 02:16 AM   #1
Junior Member
 
Join Date: Oct 2009
Posts: 7
Vito Botta is on a distinguished road
Default Redirect all incoming email to script

Hi all,

I have just installed the brilliant FOSS, Rails based ClockingIT for project management, and would like to be able to send comments to tasks by simply replying to the notification emails automatically sent by the application.
This is a feature supported by ClockingIT, but of course it also depends on the mail system's configuration.

How could I achieve this with ISPmanager / postfix?
I have tried the instructions here (see "Setting up Email Integration"), but those are based on FreeBSD with Sendmail, and do not seem to work on Postfix as installed by ISPmanager.

I have also tried directly from within ISPmanager to set cit: "|/path/to/cit/script/runner -e production 'Mailman.receive(STDIN.read)'" (where /path/to/cit is the root of the Rails application) as destination for all the incoming email for a domain, to no avail.

Any suggestions would be highly appreciated as am really looking forward to being able to update tasks via email.

Thanks in advance
Vito Botta is offline  
Old 10-23-2009, 02:55 AM   #2
Junior Member
 
Join Date: Oct 2009
Posts: 7
Vito Botta is on a distinguished road
Default

Solved.

Just in case somebody else needs this as well:

1) open /etc/mail/local-host-names and add a line with your domain name

2) open /etc/mail/virtusertable and add
@yourdomainname.com CIT

(you can use whatever vitual user name instead of CIT)

2) open /etc/aliases and add
cit: "| /website/root/script/runner -e production 'Mailman.receive(STDIN.read)'"

3) newaliases && postfix reload

4) make sure the x permissions on your script and the w permissions on the log sub folder (for Rails apps) are OK (I just chmod'ed 777 as am the only user etc)

This should also work to redirect all incoming email for a domain to PHP scripts or others, I think
Vito Botta is offline  
Old 01-05-2010, 01:12 PM   #3
Junior Member
 
Join Date: Jan 2010
Posts: 2
jonetall is on a distinguished road
Default

Hi!
Can somebody please help me how can I redirect an email to php script? I created one already and make my email redirect any of its incoming emails to my php script but it seems like the script is not reading the email and the email is bounced back to the sender.
__________________
micro sd
jonetall is offline  
Old 01-11-2010, 10:18 AM   #4
Member
 
Join Date: Apr 2009
Posts: 52
tanya is on a distinguished road
Default

Quote:
Originally Posted by jonetall View Post
Hi!
Can somebody please help me how can I redirect an email to php script? I created one already and make my email redirect any of its incoming emails to my php script but it seems like the script is not reading the email and the email is bounced back to the sender.
"| /website/root/script/runner -e production 'Mailman.receive(STDIN.read)'". Instead of "runner" you should write your php script.
tanya is offline  
Closed Thread

Thread Tools

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


All times are GMT +2. The time now is 05:42 PM.