View Single Post

  #2 (permalink)  
Old 09-28-2004
Justin Koivisto
 
Posts: n/a
Default Re: message_size_limit and return message

Justin Koivisto wrote:
> I am looking for input/documentation for exim4 regarding performing the
> following:
>
> 1. Setting message_size_limit on a per-domain basis
>
> 2. Setting the message text that is sent back to the sender of messages
> larger than message_size_limit - per domain of course.


OK, I think I have most of it figured out. I can now set the custom
message for messages larger than KOIVI_MSG_LIMIT by doing something like
this in the acl_check_data definition:

deny message = This is the koivi.com custom file too big message.
condition = ${if > {$message_size}{KOIVI_MSG_LIMIT}{yes}{no}}

OK, so this works for system-wide, so all domains use the same limit.

Therefore, I figured if I simply added a domain check to it, it would
work for that domain only. I tried using:

condition = ${if eq {$domain}{"koivi.com"}{yes}{no}}
condition = ${if > {$message_size}{KOIVI_MSG_LIMIT}{yes}{no}}

That didn't work, the message went through, so I tried this one:

condition = ${if and {{>{$message_size}{KOIVI_MSG_LIMIT}}
{eq{$domain}{"koivi.com"}}} {true}}

The same happened. Can anyone spot the problem here? Is the syntax
incorrect? Is the $domain variable not set until after the ACL stuff?

TIA

--
Justin Koivisto - spam@koivi.com
http://www.koivi.com
Reply With Quote