procmail
[Top] [All Lists]

errormessage back to sendmail

2001-11-28 09:50:32
for hosting of virtual domains I use the mailertable and as mailer procmail.
for each incoming mail procmail is invoked and my procmail-configfile calls 
a perl-script that does the actual delivery. (It checks in an sql-database 
if the emailadress is valid, active and delivers to the appropriate box).
If the perlscript fails or decides not to accept the mail it returns 
exitstatus 1. procmail checks for this exitstatus and returns 1 itself to 
sendmail and so the  mail is sent back to the original sender.

unfortunately all the sender gets back is a mail containing a message like 
this:

 ----- The following addresses had permanent fatal errors -----
<pinkel(_at_)mail(_dot_)local>
    (reason: 1)
----- Transcript of session follows -----
554 5.3.0 unknown mailer error 1

this is not very customer-friendly and I wonder if there is a way to return 
a more detailed message to the sender.

my perlscript writes its error-message to stderr, but procmail or sendmail 
seems not to read STDERR :-(

any idea ?

thnx,
peter

ps: my procmailfile:

LOGFILE=/tmp/procmail.log
:0 w
| /usr/local/sbin/scripts/mailtest.pl $1 $2

# if the previous script fails return 1 which means the mail was not 
delivered

EXITCODE=1;

and my mailertable:
mail.local procmail:/etc/procmail_rc/mail.local

-- 
mag. peter pilsl

phone: +43 676 3574035
fax  : +43 676 3546512
email: pilsl(_at_)goldfisch(_dot_)at
sms  : pilsl(_at_)max(_dot_)mail(_dot_)at

pgp-key available
_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

<Prev in Thread] Current Thread [Next in Thread>