is this possible ?
i know there is a maxMAILSIZE but that applies globbaly to all users.
but what about for each individual user.
say i want user X to be able to send 5 MB max
while user Y be able to send 1MB max
i am running sendmail and fetchmail.
* Make sure confMAX_MESSAGE_SIZE is undefined to avoid advertising a
maximum size before receiving sender information.
* Put a list of users whose maximum is 5 MB in /etc/mail/big-users, one
per line. If you need additional classes of users, duplicate each
{BigUsers} line below with a different class name, e.g. {HugeUsers}.
* Add the following to sendmail.mc. It assumes users are honest about
their return addresses; if not, you'll need to implement authentication
and check $&{auth_authen}.
LOCAL_CONFIG
F{BigUsers}/etc/mail/big-users
Kstorage macro
LOCAL_RULESETS
SLocal_check_mail
R$* $: <?> $>canonify $1
R<?> $={BigUsers} < @ $=w . > $: 5000000 privileged max size
R<?> $* $: 1000000 default max size
R$+ $: $1 $(storage {MaxMsgSize} $@ $1 $)
R$+ $: $(arith l $@ $&{msg_size} $@ $1 $)
RFALSE $#error $@ 5.2.3 $: "552 Message size exceeds " $&{MaxMsgSize}
Scheck_compat
R$* $: $(arith l $@ $&{msg_size} $@ $&{MaxMsgSize} $)
RFALSE $#error $@ 5.2.3 $: "552 Message size exceeds " $&{MaxMsgSize}
It also assumes that "they" (i.e. the SMTP clients that send their mail)
use the SMTP SIZE extension (and are honest about the value given).
--Per Hedeland
p...@hedeland.org
No, the second check sees the actual message size (as noted in op.txt):
>>Scheck_compat
>>R$* $: $(arith l $@ $&{msg_size} $@ $&{MaxMsgSize} $)
>>RFALSE $#error $@ 5.2.3 $: "552 Message size exceeds " $&{MaxMsgSize}
However, now that I've tested it again, I found {MaxMsgSize} gets
mysteriously unset between check_mail and check_compat, so *all*
messages bounce. :-( The following does work:
LOCAL_CONFIG
F{BigUsers}/etc/mail/big-users
Kstorage macro
LOCAL_RULESETS
SLocal_check_mail
R$* $: <?> $>canonify $1
R<?> $={BigUsers} < @ $=w . > $: 5000000 privileged max size
R<?> $* $: 1000000 default max size
R$+ $: $1 $| $(arith l $@ $&{msg_size} $@ $1 $)
R$+ $| FALSE $#error $@ 5.2.3 $: "552 Message size exceeds " $1
Scheck_compat
R$* $| $* $@ $>Local_check_mail $1
Sorry, missed that...
--Per Hedeland
p...@hedeland.org