Mailing List Archive

limiting size and (body-less bounces possible?)
>i seem to recall a brief reference to being able to suppress the body of
>a message when bouncing it. can qmail do this?

This leads into a question I need to ask. Can qmail limit the size of
messages it sends/receives?

We have an institution-wide policy limiting email messages to 2 megabytes.
Most of our in-house email systems are set up to enforce that limit. And,
our qmail machine also acts as a 'smart host'. So what happens (more often
than I'd like) is that someone mails a six meg file to another person. The
recipient's mail system rejects the message because it's too big. Qmail is
unable to bounce the message because the sender's mailer also rejects it as
being too big so postmaster ends up with this file. Quite frankly, when I'm
reading through postmaster messages, _I_ don't really want to download this
message either. Especially if I happen to be home using POP. So, two
questions:

1) can we strip the body of bounces (especially attachments) so that the
above bounce can go through and

2) can we make qmail reject mail over a certain size?

_____________________________________________________________________

Rick Beebe (203) 785-4566
Network Engineering Manager FAX: (203) 737-4037
ITS-Med Technology Operations Richard.Beebe@yale.edu
Yale University School of Medicine
333 Cedar Street, New Haven, CT 06510
_____________________________________________________________________
Re: limiting size and (body-less bounces possible?) [ In reply to ]
At 15:40 13/03/97 -0500, Rick Beebe wrote:
>reading through postmaster messages, _I_ don't really want to download this
>message either. Especially if I happen to be home using POP. So, two
>questions:

If you use Eudora to POP you can tell it to only download messages of no
more than x kbytes :)

Anyways, there is nothing built into qmail to allow this. I suggested to
Dan to build in something like ALIAS_EMPTY which will be the first thing to
execute on any delivered mail. But Dan hasn't even answered the mail so I
guess he's not going to add it in or any general support for "pre-delivery"
checks.

To fix this specifically for postmaster is no problem. Make a program which
fstat's() stdin and if the resulting size is bigger then you want printf a
bounce message and exit with 100. else exit with 0 and it'll go on to
deliver to the other .qmail lines. your .qmail would look like this
| /var/qmail/bin/checksize
./Mailbox

Andi
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Andi Gutmans - Computer Science, Technion

Email: andi@vipe.technion.ac.il
andi@il.eu.org
PGP public key: finger andi@vipe.technion.ac.il
Re: limiting size and (body-less bounces possible?) [ In reply to ]
>Anyways, there is nothing built into qmail to allow this. I suggested to

Quite so.

>Dan to build in something like ALIAS_EMPTY which will be the first thing to
>execute on any delivered mail. But Dan hasn't even answered the mail so I
>guess he's not going to add it in or any general support for "pre-delivery"
>checks.

Another possibility is to put it into qmail-smtpd. It'd be pretty trivial.
Though that won't stop people if they have a Unix prompt and access to
qmail-inject.


Regards.
Re: limiting size and (body-less bounces possible?) [ In reply to ]
At 18:33 14/03/97 +1000, Mark Delany wrote:
>Another possibility is to put it into qmail-smtpd. It'd be pretty trivial.
>Though that won't stop people if they have a Unix prompt and access to
>qmail-inject.

I patched qmail-smtpd to close connection on mail which is larger than x
mb's. It is even more trivial to do then you think :)
But it's pretty useless and I'm not using the patch. I think most admins
don't mind receiving the large mail and then bouncing it. So something like
I suggested will work for both smtp and local UNIX shells

Andi
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Andi Gutmans - Computer Science, Technion

Email: andi@vipe.technion.ac.il
andi@il.eu.org
PGP public key: finger andi@vipe.technion.ac.il
Re: limiting size and (body-less bounces possible?) [ In reply to ]
On 14 Mar 97 at 10:55, Andi Gutmans wrote:
> I patched qmail-smtpd to close connection on mail which is larger than x
> mb's. It is even more trivial to do then you think :)
> But it's pretty useless and I'm not using the patch. I think most admins
> don't mind receiving the large mail and then bouncing it. So something like
> I suggested will work for both smtp and local UNIX shells

One customer recently had a 110Mb message sent to them, which they
accepted and then bounced back to us (maildir2smtp situation). Took a
little while to deliver and blocked all their incoming mail (it was a
cc:Mail machine I think), and then they returned it and it blocked
all their outgoing mail apparently.

Not a comment, incidently. It was just recent enough to point out!
C.