Re: [exim] Per Domain Size Filtering

Kezdőlap
Üzenet törlése
Válasz az üzenetre
Szerző: isolderj
Dátum:  
Címzett: exim-users
Tárgy: Re: [exim] Per Domain Size Filtering

when I run the exim -d -be '${if <={$message_size}{${expand:${lookup{$domain}lsearch*@{text_file}}}}}' and I sub the data in the text file it works and gives me the right size Limits.

However as soon as I put it in the acl's it just returns the default. I started the mail server in debug mode. I think the bold portion is where the problem is.

73825 Data file written for message 1LaFMl-000JCj-7z
73825 >>Generated Received: header line
73825 P Received: from host ([ip_number]:4991 helo=hostname)
73825 by serve_name with smtp (Exim 4.69)
73825 id 1LaFMl-000JCj-7z
73825 for <test@???>; Thu, 19 Feb 2009 22:19:31 +0200
73825 using ACL "acl_check_data"
73825 processing "accept"
73825 search_open: lsearch "text_file"
73825 search_find: file="text_file"
73825 key="" partial=-1 affix=NULL starflags=2
73825 LRU list:
73825 ;/usr/local/etc/exim/config/domain_size_limits
73825 End
73825 internal_search_find: file="text_file"
73825 type=lsearch key=""
73825 trying to match *
73825 internal_search_find: file="text_file"
73825 type=lsearch key="*"
73825 file lookup required for *
73825 in text_file
73825 lookup yielded: 5M


In other words I do not think it is getting the right keythen is just defaults to the "*" for default. Can some please suggest what I maybe doing wrong.

Date: Fri, 20 Feb 2009 10:31:07 +0300
Subject: Re: [exim] Per Domain Size Filtering
From: odhiambo@???
To: isolderj@???


On Thu, Feb 19, 2009 at 7:25 PM, <isolderj@???> wrote:





I wanted to know if i can do something like this for recipient domains.



create a text file



sample.com: 50M

test.com: 35M

*: 15M



then in the ACL's add



# Per Domain Size limiting

        accept


        condition = ${if <={$message_size}{${expand:${lookup{$domain}lsearch*@{text_file}}}} {yes}{no}}


        message = This message is accepted for $domain due to the per domain Size limit.




        deny


        condition = ${if <={$message_size}{${expand:${lookup{$domain}lsearch*@{text_file}}}} {yes}{no}}


        message = this message is too large for the $domain domain




then it would allow me to send mail up to 50M to sample.com, mail up to 35M to test.com and apply a default rule for eveything else.




Would this work and if not can someone maybe help me with a similar config. also where in the ACL's is the best place to put this I want it obviously to make the decision as early as possible.


I think it should world in acl_smtp_data.
Just run exim -be '${if <={$message_size}{${expand:${ \
lookup{$domain}lsearch*@{text_file}}}}'
... with the right substitutions (domain name and text_file) and see what you get.



--
Best regards,
Odhiambo WASHINGTON,
Nairobi,KE
+254733744121/+254722743223
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
"The only time a woman really succeeds in changing a man is when he is a baby."

                              - Natalie Wood


_________________________________________________________________
Windows Live™: E-mail. Chat. Share. Get more ways to connect.
http://windowslive.com/explore?ocid=TXT_TAGLM_WL_t2_allup_explore_022009