Hi again

Well it seems that only "soft_bounce = yes" requeue bounces, but not only if it is due to a command time limit exceeded.

A solution is to manage the timeout in the filtering application.

In my case, it is a bash script which call it.
So I choose to use the timeout utility (from coreutils) and exit 75 (temporary failure) to requeue the message when a timeout occures :

#!/bin/bash

[...]
/usr/bin/timeout 60m FILTERINGAPP ARGS

if [ $? -eq 124 ]; then
 exit 75
fi
[...]

Victor


-------- Message original --------
*Sujet: *Content filtering timeout : How to requeue instead of bouncing ?
*De : *Victor d'Agostino <victor.d.agost...@fiducial.net>
*Pour : *postfix-users@postfix.org
*Date : *20/04/2015 10:24
Hi all,

I am using an external content_filter script with postfix 2.9.1.

Here is my master.cf :

# filter to a bash file
filter    unix  -       n       n       -       12      pipe
  flags=Rq user=filter null_sender=MAILER-DAEMON
argv=/path/to/script.sh [${sasl_username}] ${client_address} ${sender} ${recipient}

# smtp main interface
25    inet  n       -       -       -        0       smtpd
        -o smtpd_sasl_auth_enable=yes
        -o smtpd_sasl_security_options=noanonymous
-o smtpd_client_restrictions=check_client_access,hash:/etc/postfix/access,permit_sasl_authenticated,reject
        -o content_filter=filter:dummy


If the filter script timeout (60 minutes by default) the message is bounced to the sender with the message Command time limit exceeded: "/path/to/script.sh"


Is it possible to requeue the message instead of bouncing it ?


Regards,

Victor





________________
Ce message et les éventuels documents joints peuvent contenir des informations 
confidentielles. Au cas où il ne vous serait pas destiné, nous vous remercions 
de bien vouloir le supprimer et en aviser immédiatement l'expéditeur. Toute 
utilisation de ce message non conforme à sa destination, toute diffusion ou 
publication, totale ou partielle et quel qu'en soit le moyen est formellement 
interdite. Les communications sur internet n'étant pas sécurisées, l'intégrité 
de ce message n'est pas assurée et la société émettrice ne peut être tenue pour 
responsable de son contenu. 

Reply via email to