[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: customizing qmail failure delivery

At 21:25 Uhr -0800 16.02.2003, Ted Deppner wrote:
On Sun, Feb 16, 2003 at 08:02:45PM +0100, Christian Jaeger wrote:
 - By default, qmail tries for a week to deliver a message before it
 gives up. No warning whatsoever is sent to the sender before. Is
 there no way to make it send a delay warning after 4 hours?

man qmailsend, look for "queuelifetime".

That's not really what I'm asking for, I think it's ok to let qmail try for a week, but I want to get informed about the delay soon.

 > - The failure notices include the original mail as unformatted

Not true, see http://cr.yp.to/proto/qsbmf.txt

Thanks for the link. Well, why "not true", qsbmf is plaintext, and the original mail is appended unformatted :) - and from the view of my mailer the whole qsbmf is unformatted as well.

 > Why doesn't it include it as a MIME entity (or as multiple entities) so
 that the user receiving the notice can easily reuse the contents to send
 the message again? (i.e. in qmails default way, attachments are only
 seen as base64 encoded text, non-ascii chars are mangled)

Because that would be a translation expense on the receiving server, an
easy DoS.

It should not take significantly more cpu to use mime boundaries instead of the "--- Below this line is a copy of the message." boundary.

(Differences: 2 additional lines for "Content-Type: multipart/report..\n boundary=...", mime boundary line instead of "below this line", 1 additional line "Content-Type: message/rfc822" and 1 additional boundary line at the end.)

As far I can see, D.J.Bernstein states in qsbmf.txt that he does not want to follow the rfc's because of the complication in correctly *parsing* mime messages (as opposed to building them). But is it any better to have to write code for the qsbmf format, now that many mime parsing libraries exist (i.e. D.J.B's own fast C library)?

I have now stumbled about this:
which (paragraph 3.3) says exactly what I think.

 > - I want to set up a custom failure. For example, "Sorry, there are
 several users with this first name on this domain, please use one of
 > the following full addresses instead: .....".  This should really be
 a delivery failure message, not an autoreply, and it can be achieved
 by putting a program into the dot.qmail file that exits with error
 exit 100;

This is a DoS in the making.  Perl is really way too expensive for
something so trivial.  Maybe sh could echo your text and exit 100?

Why should perl be slower than sh (at least when using bash for sh)? In fact, with sh you'll probably pipe the message through sed or something to get the \r\n line endings, and I'm pretty sure that would be slower.
(..yep it is:
time for ((i=0; i<100; i++)) do ./refuse.pl > /dev/null; done
real	0m0.483s
user	0m0.320s
sys	0m0.160s
time for ((i=0; i<100; i++)) do ./refuse_lf.sh > /dev/null; done
real	0m0.538s
user	0m0.300s
sys	0m0.240s
time for ((i=0; i<100; i++)) do ./refuse_using_sed.sh > /dev/null; done
real	0m0.850s
user	0m0.440s
sys	0m0.410s

 > *BUT* this still gives this ugly, non structured failure notice as
 > described above, in particular, if I print german umlauts from the
 > script, they are not sent correctly.
 (There is a program "bouncesaying" which has exactly the same drawbacks)

It's not all that, see http://cr.yp.to/proto/qsbmf.txt again.

(What do you mean with it's not all that?)

 > Is there any addon/patch for customizing qmail's automatic messages?

Dunno.  A few minutes of me Googling answered the rest of these questions,
why not give it a try yourself?

I've been googling and reading on qmail.org several hours yesterday.

Helpful Hint: Try searching for "control qmail bounce message patch".  The
top 6 are all what you're seeking but didn't really bother looking for.

The reason I'm asking here is that I'm wondering to how you solve the problem. I don't like playing test bunny for patches that you haven't tried :). And are they really what I'm looking for?:

As far I can see does not solve the problem with umlauts (it does not add a content-type header with charset). It simply replaces the first paragraph (and the subject). The result will not only not be RFC compliant, but not even comply to QSBMF.

just limits the size of bounces
is something different
different stuff.
(And the following about ten hits are nothing for my problem either. And looking around another hour didn't reveal something else either.)

So I still have no solution.


Reply to: