"Brett Randall" <[EMAIL PROTECTED]> wrote:
>Basically, I am using fastforward in conjunction with supervise, tcpserver,
>multilog, (qmail, in case there r some drongo's out there), the whole
>shabang. I want some users in the aliases file to be limited in the size of
>an e-mail that I send to them (I act virtually as an incoming relay for
>these users... Mail hits me from the Internet and I 'bounce' it to the
The proper term is "forward". A "bounce" is a nondelivery notification.
>appropriate user somewhere else on the net). I only have limited outgoing
>bandwidth (but virtually unlimited coming in), so I would much rather reject
>e-mails than send them to the user or bounce the entire e-mail back to the
>originator.
Rejection can only be done by qmail-smtpd. Out-of-the-box, the only
mechanism for rejecting based on size is databytes, via the
control/databytes system-wide setting or the DATABYTES session-wide
environment variable. DATABYTES+tcpserver can easily set per-sender-IP
size limits, but it won't help with per-recipient limits. What you
want will require patching qmail-smtpd.
>I know the databytes file can limit ALL e-mail, but I want to limit it for
>particular aliases (the $LOCAL part of the recipient). Remember that e-mails
>handled by fastforward are actually delivered to the alias user first, and
>piped in .qmail-default, so there may be some way of setting databytes on
>the fly, depending on the user that it appears to be delivered to and the
>'rule' set up for that user's e-mail limit. I don't know the best way of
>implementing this, or even in what stage of the delivery databytes is read,
>so any ideas from any of you smart people out there?
"man qmail-control | grep databytes" says:
databytes 0 qmail-smtpd
so databytes is applied in the qmail-smtpd stage.
-Dave