Re: [exim] Exim ACLs

Pàgina inicial
Delete this message
Reply to this message
Autor: Gaurav Pruthi
Data:  
A: exim-users
Assumpte: Re: [exim] Exim ACLs
Thanks for the gr8 help evans but i am unable to find ACL to restrict max
characters in message_body. Its about max lines and size only.


Thanks,
Gaurav


On Sat, Mar 1, 2008 at 4:31 PM, Dave Evans <exim-users-20071221@???>
wrote:

> On Sat, Mar 01, 2008 at 03:49:32PM +0530, Gaurav Pruthi wrote:
> > Hi,
> >
> > I want to create 3 ACL's as per requirement. Though i have created one
> but
> > is not working as per it should.
> >
> > The Requirement is:
> >
> > 1). Message body should not be more than 160 characters. Mail should
> fail in
> > case message_body is more than 160 characters.
>
> "deny" using an ACL which reads $message_body_size.
> http://www.exim.org/exim-html-current/doc/html/spec_html/ch40.html
>
> http://www.exim.org/exim-html-current/doc/html/spec_html/ch11.html#SECTexpvar
>
> You might also like to use a router which redirects to :fail: with an
> appropriate message.
>
> > 2). Special Characters are not allowed in message_body i.e. `,#,+,&
> >      I created one ACL but it isn't working i.e.

> >
> > deny   message        = Restricted characters in the message body
> >          domains        = +relay_to_domains
> >          condition      =  ${if match{${lc:$message_body}} \
> >                         {\N( \`|\#|\+|\&)$\N} \
> >                      {yes}{no}}

>
> Firstly, I suggest you negate that - have the condition check that the
> body
> only contains allowable characters. Secondly, your condition will be more
> readable if you use [...] in the regex instead of (...|...|...).
>
> For example, something based on:
>
> ${if match{$message_body}{\N\A[A-Za-z0-9 ,.-]\z\N} ...}
>
> but you'll probably want to allow more characters than that, and maybe
> you'll
> also want to automatically fold NL/CR/TAB to spaces. In which case, look
> for
> "${sg" in the documentation.
>
> > 3). Sender's local_part should not exceed 10 characters.
>
> And, let me guess, should contain only 0-9 ?
> Add something like "local_parts = \N^[0-9]{1,10}$\N" to your router.
>
>
>
> All untested. Testing, and fixing my errors, I leave as an exercise for
> you.
>
> --
> Dave Evans
> http://djce.org.uk/
> http://djce.org.uk/pgpkey
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.6 (GNU/Linux)
>
> iD8DBQFHyTeCnYOJTU6nkkkRAiIdAJ9ZWYLumO+C3yB/G+LmtWuWlY5FPQCfTYeY
> h/5V7dyu56rzNq7FUU1nd8I=
> =oPs5
> -----END PGP SIGNATURE-----
>
> --
> ## List details at http://lists.exim.org/mailman/listinfo/exim-users
> ## Exim details at http://www.exim.org/
> ## Please use the Wiki with this list - http://wiki.exim.org/
>




--
Gaurav Pruthi