> Talking of this, here's a little thing which you can use in conf-unusual.h
> to bounce large mail. (Of course it'll only work if the user doesn't have a
> .qmail file. Of course it'd be much more resource friendly if this would be
> built into qmail)
It'd only be more "resource friendly" for people that actually want to
use it. For those that don't, it's unnecessary code bloat.
By the way, your program reads the file to find out how large it is.
This isn't necessary: a command run out of a .qmail file will always
have a real file as its stdin, so you can simply stat() it, as in my
version. I called this program `smallerthan', and it can be called from
a .qmail file (or ALIAS_EMPTY) like this.
|/path/to/smallerthan 12345 || { echo Message size limit of 12345 octets to "$RECIPIENT"; exit 100; }
... rest of delivery instructions
Tim.
> to bounce large mail. (Of course it'll only work if the user doesn't have a
> .qmail file. Of course it'd be much more resource friendly if this would be
> built into qmail)
It'd only be more "resource friendly" for people that actually want to
use it. For those that don't, it's unnecessary code bloat.
By the way, your program reads the file to find out how large it is.
This isn't necessary: a command run out of a .qmail file will always
have a real file as its stdin, so you can simply stat() it, as in my
version. I called this program `smallerthan', and it can be called from
a .qmail file (or ALIAS_EMPTY) like this.
|/path/to/smallerthan 12345 || { echo Message size limit of 12345 octets to "$RECIPIENT"; exit 100; }
... rest of delivery instructions
Tim.