[exim] Alter quota bounce messages

Startseite
Nachricht löschen
Nachricht beantworten
Autor: Todd Lyons
Datum:  
To: exim-users
Betreff: [exim] Alter quota bounce messages
I've recently put some renewed effort into "pretty-fying" quota
messages. I'm meeting with mixed levels of success, so I'd like a few
pointers. Basically, there are two reliable ways that I can see to do
quotas:

1) Have exim do the quota checks in the transport, don't accept
(queue) over-quota messages at all, and generate an email to the
sender if it fails due to overquota (once the message makes it into
the transport, there doesn't seem to be any other option).
2) Have the transport pass the message to maildrop, which enforces the
quota, and exim generates an email to the sender if it fails due to
overquota (maildrop exits with 77).

*** Sample email output from #1:
This message was created automatically by mail delivery software.

A message that you sent could not be delivered to one or more of its
recipients. This is a permanent error. The following address(es) failed:

save to /user_data/email/t/o/d/todd.org/todd/Maildir/
generated by todd@???
mailbox is full: retry timeout exceeded

------ This is a copy of the message, including all the headers. ------
<snip>

*** Sample email output from #2:
This message was created automatically by mail delivery software.

A message that you sent could not be delivered to one or more of its
recipients. This is a permanent error. The following address(es) failed:

save to /user_data/email/t/o/d/todd.org/todd/Maildir/
generated by todd@???
local delivery failed

The following text was generated during the delivery attempt:

------ save to /user_data/email/t/o/d/todd.org/todd/Maildir/
      generated by todd@??? ------


maildrop: maildir over quota.

------ This is a copy of the message, including all the headers. ------
<snip>


Notice that #1 is much shorter than #2, but the exact issue is much
clearer in #2 (maildrop: maildir over quota). What I would like,
using either #1 or #2, I don't care which, however this list is
probably more geared to #1, is to generate a message that says:
I'm sorry, your message to todd@??? cannot be accepted because
the user's mailbox is full.

Can this be done in exim? (4.69) I see the ability to specify the
quota warning message to the recipient when their mailbox is getting
full, but I see no way of controlling the message that is generated
and sent to the original sender. I just want a plain and simple
message, I don't want to quote the message which was sent, and there
should be no "error" or "warning" messages for the original senders to
freak out about.

I am pretty sure I also can use maildrop's scripting in #2 to achieve
this, but I've not gotten that part fully working yet. I'm working on
both methods to see which is better, maintainable, and configurable
(per user settings are something I would like to have as an option and
is much easier to do in #1 IMHO).

* Oh yeah. I know. Backscatter issues are always something to worry
about. Both #1 and #2 suffer from this. In my maildrop script, I do a
lot of checking to make sure that vacation replies don't go to various
mailing lists, bulk senders, etc, the same approach could be helpful
if my quota response is done by method #2. The reality is that any
message which gets either rejected or tempfailed at SMTP time will
generate an SMTP error that users and senders will freak out about
"because your mail is broken", so generating a new "friendly" reply is
desirable and backscatter is a tradeoff with as yet unknown
consequences.

** todd.org is not a valid domain.  I just have it setup in a local
test environment.  The email address is thusly not valid either.
-- 
Regards...      Todd
All truth passes through three stages. First, it is ridiculed. Second,
it is violently opposed. Third, it is accepted as being self-evident.