Jacob S. Barrett wrote:
Jacob S. Barrett wrote:

So two questions:

1) Is there a way to have maildrop hard fail the delivery of a message if the file is larger than quota and soft fail only when the message size is < quota but puts it over the limit?

2) Is there a way to shutoff the new "Address Temporary Unavailable" behavior?


So for anyone interested in a solution for this same problem I figured one out.

In my maildroprc I added this:

EXITCODE_FAIL_NOTRACK=70

if ( $MAILDIRQUOTA =~ /([0-9]+)S/ )
{
        MAX_SIZE=$MATCH1

        if ( $SIZE > $MAX_SIZE )
        {
echo "Message size ($SIZE bytes) exceeds maximum size allowed for this user ($MAX_SIZE bytes)."
                EXITCODE=$EXITCODE_FAIL_NOTRACK
                exit
        }
}


Basically if a quota size exists and the message size exceeds that then the message is rejected without putting a hard failure in the backscatter tracking. Normal overquota messages still get soft failed and tracked in the backscatter. All other hard fails still go to the backscatter as well. If you want your hard fail quota failure to backscatter just change the exit code to something like 64 which does track.

Well, either I read the source wrong or I am looking in the wrong place, but even with error code 70 it is still tracking the failure. There must be another place besides courierlocal where the tracking is being handled for these messages. Back to the drawingboard I guess.



-------------------------------------------------------
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

Reply via email to