ACL conditons +mysql lookup

This is a discussion on ACL conditons +mysql lookup within the alt.comp.mail.exim forums, part of the Mail Servers and Related category; MYSQL_Q_ALLOWFILES=select domain from MYSQL_ALLOWFILES \ where domain='${quote_mysql:$domain}' \ AND local_part='${quote_mysql:$local_part} \ AND opt_allowfiles = 1 ( 1 - allow files ) condition = {!${...


Go Back   Usenet Forums > Mail Servers and Related > alt.comp.mail.exim

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 05-04-2005
Ugly_Duck
 
Posts: n/a
Default ACL conditons +mysql lookup

MYSQL_Q_ALLOWFILES=select domain from MYSQL_ALLOWFILES \
where
domain='${quote_mysql:$domain}' \
AND
local_part='${quote_mysql:$local_part} \
AND opt_allowfiles = 1 ( 1 - allow
files )

condition = {!${lookup mysql{MYSQL_Q_ALLOWFILES}{1}{0}} \
${if match
{${lc:$mime_filename}}{\N(\.bat|\.com|\.exe|\.pif| \.prf|\.scr|\.vbs|\.gif|\.jpg|\.png|\.tif)$\N}{1}{ 0}}}

i am running a mail server at home for my nieces and nephews, as they are
young i am trying to stop 99% of the spam getting to them, as more and more
spam is coming in the way of image files, i am trying to stop image and
other files from being recieved by the user is they are not allowed to
recieve them

this will be control by admin section on the website adminitered by the
parents.. they decide if the user is allow or not allow to recieve files..


so i am trying to lookup whether users are allow files or not content of the
"opt_allowfiles " in the database is 1 = allowed or 0 - which is not
allowed, once it does a checkup on the database it then matches any incoming
files and rejects the email if the are not allowed..

this is the result of the sql statement..

MYSQL.LOG: SELECT domain FROM mailaccounts WHERE domain='' AND local_part=''
AND opt_allowfiles = 1


this is what the exim/mainlog sayd

MAINLOG: 2005-05-04 16:12:57 1DTXjN-0004WJ-6f H=(ugly) [192.168.1.2]
F=<ugly_duck@hotpop.com> temporarily rejected after DATA: MYSQL: no data
found

any help would be greatly recieved..

ps: yea, i'm a bit of a newbie


Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 12:11 PM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0