hi,
two month ago i pathed qmail-1.03 (many thanks to david harris) the way
i got a new environment variable called SIZE. now i can route mails
depending on their size - that's cool!
eg:
| condredirect [EMAIL PROTECTED] /var/qmail/mbin/sizecheck "$SIZE"
$DEFAULT" "$SENDER"
the shell script sizecheck exits 1 when the mail should get to the
recipient (depending on $SENDER, $DEFAULT, $SIZE)
if $DEFAULT is not allowed to get the mail (oversize) vieadmin will get
it!
the patch looks like this:
in qmail-local.c, line 70
/* patch for MESSAGESIZE */
struct stat filesize_stat;
char filesize_str[30];
/* end patch */
in qmail-local.c, line 497 (the line before: if (!env_put2("HOST",host))
temp_nomem(); )
/* patch MESSAGESIZE */
if ( !fstat(0, &filesize_stat) && filesize_stat.st_size != 0 )
if ( sprintf(filesize_str, "%i", filesize_stat.st_size) )
env_put2("SIZE", filesize_str);
/* end patch */
works great and maybe dan can insert this in qmail-2.0?
jodok
application/ms-tnef