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@???> temporarily rejected after DATA: MYSQL: no data found
any help would be greatly recieved..
ps: yea, i'm a bit of a newbie