RE: [Exim] acl_check_content & MySQL

Kezdőlap
Üzenet törlése
Válasz az üzenetre
Szerző: Dougal McWhinney
Dátum:  
Címzett: Exim Users List
Tárgy: RE: [Exim] acl_check_content & MySQL
Hi Tom,

After some testing I have been able to get the follow command to work in
the filter section but it still doesn't appear to supply the colon
separated list correctly to the demime acl.

demime = ${sg {${lookup mysql {select extension from filetypes}}}
{\n}{:}}

In the filter section I used it as follows:

mail to dougalm@???
from postmaster@???
subject "MySQL Lookup"
text "${sg {${lookup mysql {select extension from filetypes}}} {\n}{:}}"

This would deliver a colon separated list of extensions from the MySQL
table.

Regards,
Dougal McWhinney
Acting IT/Control Systems Supervisor.
Queensland Magnesia Pty Ltd
246 Boundary Rd, Parkhurst Qld
Mail: PO Box 5798, Central Queensland Mail Centre. QLD 4702
e-mail: dmcwhinney@???
Phone: +61 7 4920 0236
Mobile: 0438 200 526
Fax: +61 7 4936 1380

"Never argue with an idiot. They drag you down to their level, then beat
you with experience."



-----Original Message-----
From: Tom Kistner [mailto:tom@duncanthrax.net]
Sent: Sunday, May 25, 2003 12:08 AM
To: dougal@???; exim-users@???
Subject: Re: [Exim] acl_check_content & MySQL

Dougal McWhinney wrote:

> What command do I use to return to "demime" a list of colon separated
> values from the table?


Depends on how they are stored in the table. If they are in separate
rows, exim will return them separated with \n, which you can replace
with ":" using the sg{} operator.

Untested example:

deny message = contains blacklisted file extension ($found_extension)
      demime = ${sg{${lookup mysql {select extension\
                                    from filetypes}}}{\\n}{:}}


regards,

/tom