On Tue, 27 May 2014 06:41:22 -0400 (EDT)
wie...@porcupine.org (Wietse Venema) wrote:

> Noel Jones:
> > Perhaps a simple content_filter will fit your needs better than a
> > transport. Or maybe not.
> > http://www.postfix.org/FILTER_README.html#simple_filter
>  
> mancyb...@gmail.com:
> > If you configure the script as a FILTER, instead of a transport_map, you'll 
> > not be able to catch bounced emails
> > as suggested here: http://marc.info/?l=postfix-users&m=139933564703452&w=2
> 
> The FILTER has already handled the email BEFORE it bounced.
> Why do you need to see it twice?
> 
>       Wietse


Hi Wietse, thanks for your attention.

When using the script as a FILTER, it isn't able to catch emails generated by 
postfix itself, as described here:
http://marc.info/?l=postfix-users&m=139932881701528&w=2

instead, while using it as a transport_map, it works very well
but works only with emails generated by postfix itself:
when trying to send an email to it, it loops 10 times and then gives up with 
the 'too many hops' error.

It is the last part of the script: http://pastebin.com/BZGNDcdn

this part:

$sendmail = '/usr/sbin/sendmail -G -i ' . implode(' ', $argv);
$handle = popen($sendmail, 'w');
fwrite($handle, $content);
$sendmail_return_value = pclose($handle);

the script passes the email to the receiver (itself in this given problem 
case), but it loops and then it gives up.


Thanks, regards and have a nice day,
Mike

Reply via email to