Re: [exim] Condition problem.

Inizio della pagina
Delete this message
Reply to this message
Autore: Max Lock
Data:  
To: exim users
Oggetto: Re: [exim] Condition problem.
http://www.datanet.co.uk/default.aspx http://www.datanet.co.uk/default.aspx

--------------------------------------------------------------------------
Hi Folks,

Thanks for the pointers so far. I'll try and answer your questions, as
you may have guessed I'm new to Exim.

W B Hacker <wbh@???>
> Aside from wanting to do it the hardest way possible [1], are you
> also asking a boolean result of a boolean field (I can only guess what
> your field types are..) then also wanting to compare it (again) when
> not required? [2]


Bill, The general idea is that I'm doing spam checking for specific
domains at smtp time. Some choose to their spam mails flagged and
delivered and others choose to simply deny it. This router will
blackhole mails for domains where the spam flag is present and a boolean
value is present for that domain in a database. I'll take a look at
passing the $domain variable to the mysql query. it's already present in
the macro so I don't yet understand why it's needed here. I'll RTFM a
little more.

Ian Eiloart <iane@???>
> Please repost a prettified version, and tell us what the macros are


MYSQL_Q_DROPSPAM = SELECT DISTINCT domain FROM mail.virusscreen WHERE
domain = '$domain' AND dumpspam = '1'

${if and{
            {eq{$h_X-spam_flag:}{YES}{1}{0}}   <<<<-- what's this?*
you've 
given four arguments to eq, haven't you?
            {
                ${lookup
                mysql{MYSQL_Q_DROPSPAM}{1}{0}
                }
            }
        }
   }


(* I've used this in another router, exim spec says its valid and seems
to work fine?
http://www.exim.org/exim-html-current/doc/html/spec_html/ch11.html#SECTexpansionitems
)

Dan_Mitton@???
> try dropping the {1}{0} after the eq{}{}


Tried that Dan, it fails with the same error.

Thankyou everyone for your time so far :)

-Max

--------------------------------------------------------------------------
Max Lock - Senior Systems Administrator
Datanet - Hosting & Connectivity
0845 130 6010
0845 130 6020
mailto:Max.Lock@datanet.co.uk
http://www.datanet.co.uk/
Registered Office: DATANET.CO.UK Limited, Aspen House, Barley Way, Ancells Business Park, Fleet, Hampshire, GU51 2UT Registered in England - No. 3214053
Providing Internet Solutions for Business since 1996, Datanet, over 12 years of excellence in service, support and IP solutions
http://www.datanet.co.uk/awards_and_affiliates.aspx
http://www.datanet.co.uk/datacentre_diary.aspx