[Exim] Combining conditions . . .

Góra strony
Delete this message
Reply to this message
Autor: Konrad Michels
Data:  
Dla: exim-users
Temat: [Exim] Combining conditions . . .
Hi again folks
I've managed to sort out my routers for the mysql queries to give a 550
error: if anyone's interested I'll post it - just let me know.

What I'm attempting to do now, well, what I've actually done already is
setup an autoreply transport being called by a router to do vacation
replies. It all works quite neatly, but I've one thing that I've not
quite managed yet, all due, I suspect, to to many {{{{{}}}}}{{{}{}{{}'s
and me not being able to see the logic for the {}'s!

In my router that calls the autoreply transport, I've got a condition
statement which checks the database to check whether or not the router
must be run:

condition = ${if eq{} {${lookup mysql{SELECT autoresponder \
               FROM smtp WHERE autoresponder='yes' \
               AND username='$local_part@$domain' \
               }}}{no}{yes}}


So, quite simply, if there's a "yes" in table "smtp" and field
"autoresponder", it will run the router, which it does.

What I've got from a previous exim installation's vacation router though
is the following condition:

condition = "${if or {{match {$h_precedence:} {(?i)junk|bulk|list}} \
                {eq {$sender_address} {}}} {no} {yes}}"


which is also fairly straightforward in making sure we don't respond to
certain types of mail.

What I've been struggling with is combining the two conditions in the
router. Don't know if I'm on the right track here, but I would sure
appreciate some assistance in getting the two conditions combined.

Many thanks for your time and patience!

Konrad