> Yes there is. Dave Platt pointed me to the solution: > > > Set up a .mailfilters/rcptfilter-WHATEVER script file for this ID. > > > > Have it simply do an > > > > echo "451 fee fie foe fam, I smell the blood of SMTP spam" > > EXITCODE=100 > > I was thinking that _any_ EXITCODE from rcptfilter other than 0 or 99 > returned a 5xx error, however apparently this isn't the case. The above > code quotes the echoed string directly to the SMTP dialog without prefixing > any other error code, so whatever the number is at the beginning of this > string will be the error returned by the SMTP session.
To clarify (or perhaps confuse) things a bit further... there seems to be a difference between the way that the "echo" result string is handled in the case of an rcptfilter script, and an smtpfilter script. In the rcptfilter, you can echo back whatever you want (including a 4xx temporary-failure code) and it's sent to the SMTP client as-is. That trick doesn't seem to work for an smtpfilter, however. If one tries to echo a 4xx temporary-failure code in an smtpfilter, Courier prefaces the whole string (including the 4xx) with a 558 code, making the error permanent rather than temporary. I'm not sure why this distinction exists in the code. It'd be nice to allow an smtpfilter to return a temporary error, too. ------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642 _______________________________________________ courier-users mailing list [email protected] Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users
