#1  
Old 6th November 2008, 12:53
rboschin rboschin is offline
Junior Member
 
Join Date: Nov 2008
Posts: 3
Thanks: 0
Thanked 2 Times in 2 Posts
Question piping email to a script

Hi,
is there someone who could explain me how to pass an email to a script when it arrives?
I know how to do it with procmail but don't know about dropmail (which is the mailfilter used in ISPConfig).
I've tried to open the custom rules box end entering a line as 'to /path/to/the/script' but this doesn't work and the email gets sent into the inbox as always.

Any hints?
Reply With Quote
The Following User Says Thank You to rboschin For This Useful Post:
lzgzytqo (17th November 2012)
Sponsored Links
  #2  
Old 6th November 2008, 13:37
till till is online now
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 35,432
Thanks: 813
Thanked 5,209 Times in 4,085 Posts
Default

Do you talk about ispconfig 2 or ispconfig 3? This are two different software and they work completely different.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
The Following User Says Thank You to till For This Useful Post:
PreapKedeTorp (4th December 2012)
  #3  
Old 6th November 2008, 14:52
rboschin rboschin is offline
Junior Member
 
Join Date: Nov 2008
Posts: 3
Thanks: 0
Thanked 2 Times in 2 Posts
Default

I mean ISPConfig 3
Reply With Quote
  #4  
Old 6th November 2008, 15:01
till till is online now
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 35,432
Thanks: 813
Thanked 5,209 Times in 4,085 Posts
Default

Please try:

to "|/path/to/script"
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #5  
Old 6th November 2008, 19:36
rboschin rboschin is offline
Junior Member
 
Join Date: Nov 2008
Posts: 3
Thanks: 0
Thanked 2 Times in 2 Posts
Default

It doesn't seem to work.
I've tried with:
to "|/var/clients/client1/web1/.filter.php"
and with:
to "|/usr/bin/php -q /var/clients/client1/web1/.filter.php"
but the email continues to be inserted into the mailbox.
This script simply creates a file, and if I execute it by hand it does it, but not when an email arrives.

Maybe I should look at the mail log ? (where is it?)
or maybe I should verify if ispconfig really creates the dropmail filter, since version 3 is not completely stable??

rob
Reply With Quote
The Following User Says Thank You to rboschin For This Useful Post:
lzgzytqo (12th November 2012)
  #6  
Old 27th October 2012, 02:33
abdi abdi is offline
Senior Member
 
Join Date: Sep 2012
Posts: 118
Thanks: 0
Thanked 10 Times in 6 Posts
Default

Quote:
Originally Posted by till View Post
Please try:

to "|/path/to/script"
Till, I have exactly this:

to "|/var/www/domain.com/web/includes/getEmail.php"

But it will not work for me, infact the I get the error

# tail -f /var/vmail/domain.com/billing/.sieve.log
sieve: info: started log at Oct 27 00:17:49.
main_script: line 5: error: unknown command 'to' (only reported once at first occurence).
main_script: error: validation failed.
sieve: info: started log at Oct 27 00:20:53.
main_scrip
Reply With Quote
  #7  
Old 28th October 2012, 17:43
till till is online now
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 35,432
Thanks: 813
Thanked 5,209 Times in 4,085 Posts
Default

You mix up courier maildrop and dovecot sieve email filter rules. The above rule is for a courier email server with maildrop filtering, but you use a dovecot server with sieve filtering. Maildrop and sieve are two different filter languages, so you can not use a command from courier on a dovecot server.

Dovecot and sieve that you use on your server do not support piping of emails to a shell script.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #8  
Old 28th October 2012, 17:53
abdi abdi is offline
Senior Member
 
Join Date: Sep 2012
Posts: 118
Thanks: 0
Thanked 10 Times in 6 Posts
Default

Till could then please give me the equivalent of that with Dovecot and Sieve as adviced. Thanks alot
Reply With Quote
  #9  
Old 28th October 2012, 17:59
till till is online now
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 35,432
Thanks: 813
Thanked 5,209 Times in 4,085 Posts
 
Default

Please see my answer above:

Quote:
Dovecot and sieve that you use on your server do not support piping of emails to a shell script.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
Reply

Bookmarks

Tags
mail script pipe filter

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
freebsd 7, samba 3, domain controller alexdimarco Suggest HOWTO 6 5th November 2010 16:54
hotmail rejects outgoing email nzimas Server Operation 3 1st May 2009 03:39
php email script www-data cat Installation/Configuration 3 29th September 2008 05:18
Create user and email script TheRudy Programming/Scripts 0 7th June 2008 11:15
perl script hylafax email to fax gateway nenad Programming/Scripts 1 23rd March 2007 19:12


All times are GMT +2. The time now is 11:31.


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