This is a discussion on [courier-users] Re: Over Quota / Temporary Unavailable within the Courier-Imap forums, part of the Mail Servers and Related category; Jacob S. Barrett wrote: > So two questions: > > 1) Is there a way to have maildrop hard fail ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
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. ------------------------------------------------------- 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=...486&dat=121642 _______________________________________________ courier-users mailing list courier-users@lists.sourceforge.net Unsubscribe: https://lists.sourceforge.net/lists/.../courier-users |