List Info

Thread: Changing temporary errors to permanent errors




Changing temporary errors to permanent errors
country flaguser name
United States
2007-04-17 09:45:54
Hello,

my organization has introduced filesystem quotas that are
proving to be 
somewhat problematic for our students because, when they go
over their 
quota limits, maildrop reports a temporary error and their
email will 
sit on the queue for days before bouncing back to the user.
See the 
error message from mailq:

(temporary failure. Command output: maildrop: error writing
to mailbox.)

How can I make maildrop report this as a permanent failure
so that 
Postfix will immediately bounce the message back to the
sender? Also, is 
there a way to give an informational message back to the
sender to let 
them know this user is over their quota?

Thanks to any and all who may be of assistance,

Gordon

------------------------------------------------------------
-------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and
take
control of your XML. No limits. Just data. Click to get it
now.
http://sourcefor
ge.net/powerbar/db2/
_______________________________________________
Courier-maildrop mailing list
Courier-maildroplists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/courie
r-maildrop

Re: Changing temporary errors to permanent errors
country flaguser name
United States
2007-04-17 16:42:01
Gordon Thagard writes:

> Hello,
> 
> my organization has introduced filesystem quotas that
are proving to be 
> somewhat problematic for our students because, when
they go over their 
> quota limits, maildrop reports a temporary error and
their email will 
> sit on the queue for days before bouncing back to the
user. See the 
> error message from mailq:
> 
> (temporary failure. Command output: maildrop: error
writing to mailbox.)
> 
> How can I make maildrop report this as a permanent
failure so that 
> Postfix will immediately bounce the message back to the
sender? Also, is 
> there a way to give an informational message back to
the sender to let 
> them know this user is over their quota?
> 
> Thanks to any and all who may be of assistance,

The two ways to do this are:

1) Wrap all the to and cc commands inside an exception {}
block, and 
explicitly set EXITCODE to a permanent error code, or

2) Wrap the invocation of maildrop, rather than setting a
plain 
/usr/bin/maildrop, or whatever, as your mail delivery agent,
use something 
like "/usr/bin/maildrop || exit 77".  That'll turn
all temporary errors into 
permanent ones, not just out of quota

As far as a custom message goes, you'll have to use #1, and
provide some 
additional hackery using the echo command.



------------------------------------------------------------
-------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and
take
control of your XML. No limits. Just data. Click to get it
now.
http://sourcefor
ge.net/powerbar/db2/
_______________________________________________
Courier-maildrop mailing list
Courier-maildroplists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/courie
r-maildrop

Re: Changing temporary errors to permanent errors
country flaguser name
Slovakia
2007-04-18 03:35:35
On Tue, Apr 17, 2007 at 10:45:54AM -0400, Gordon Thagard
wrote:
> my organization has introduced filesystem quotas that
are proving to be 
> somewhat problematic for our students because, when
they go over their 
> quota limits, maildrop reports a temporary error and
their email will 
> sit on the queue for days before bouncing back to the
user. See the 
> error message from mailq:
> 
> (temporary failure. Command output: maildrop: error
writing to mailbox.)
> 
> How can I make maildrop report this as a permanent
failure so that 
> Postfix will immediately bounce the message back to the
sender? 

--- courier-0.53.3/maildrop/deliver.C   2006-05-28
17:29:52.000000000 +0200
+++ courier-0.53.3_NEW/maildrop/deliver.C      2006-12-25
13:15:00.000000000 +0100
 -160,7
+160,7 
                        maildrop.msgptr->MessageSize())
< 0)
                {
 #if HAVE_COURIER
-                       throw 75;
+                       throw 77;
 #else
                        throw 77;
 #endif


> Also, is 
> there a way to give an informational message back to
the sender to let 
> them know this user is over their quota?

/etc/postfix/master.cf:   ... argv=/usr/bin/maildrop -w 80
-d $

/etc/courier/quotawarnmsg

-- 

5o   Peter.Mann at tuke.sk



------------------------------------------------------------
-------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and
take
control of your XML. No limits. Just data. Click to get it
now.
http://sourcefor
ge.net/powerbar/db2/
_______________________________________________
Courier-maildrop mailing list
Courier-maildroplists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/courie
r-maildrop

[1-3]

about | contact  Other archives ( Real Estate discussion Medical topics )