Re: [exim] Making A Compound Condition - With Or + And

Αρχική Σελίδα
Delete this message
Reply to this message
Συντάκτης: Brian Spraker
Ημερομηνία:  
Προς: Todd Lyons
Υ/ο: exim-users
Αντικείμενο: Re: [exim] Making A Compound Condition - With Or + And
Thank you Todd. Was going to set it up like this but wanted to be sure it was going to work before making it live.

This is in the Routers section of the config.

Brian S.

--- On Mon, 6/3/13, Todd Lyons <tlyons@???> wrote:

> From: Todd Lyons <tlyons@???>
> Subject: Re: [exim] Making A Compound Condition - With Or + And
> To: "Brian Spraker" <spraker@???>
> Cc: "exim-users" <exim-users@???>
> Date: Monday, June 3, 2013, 11:48 AM
> I can't remember if that's a
> transport or a router, but in either
> case, you can use multiple "condition =" lines.  Since
> all of the
> conditions you specify would all have to be true, that's
> effectively
> an AND test.  So just add the second line.
>
> condition = ${if whatever_your_test_would_look_like}
>
> ...Todd
>
>
> On Mon, Jun 3, 2013 at 9:23 AM, Brian Spraker <spraker@???>
> wrote:
> > Hello all,
> >
> > I am needing to make a compound condition for a
> vacation checking system.
> >
> > I am using the information from this page:
> >
> > https://github.com/Exim/exim/wiki/EximAutoReply
> >
> > Further down on that page, there is a lot of condition
> checks that are done before sending out a message.
> >
> > Trouble is - this is an "OR" condition.  I also
> need to include an "AND" to this as well.  There is a
> column in the database that contains whether the user's
> vacation auto reply should be turned on or off.
> >
> > Here is that condition:
> >
> > condition = ${if eq{${lookup mysql{SELECT
> vacation_enabled FROM horde_users WHERE
> user_uid="${quote_mysql:${local_part}}"}}}{y}}
> >
> > Then, the condition from the Exim site above:
> >
> > condition = ${if or { \
> >     { match {$h_precedence:}
> {(?i)junk|bulk|list} } \
> >     { eq {$sender_address} {} } \
> >     { def:header_X-Cron-Env: } \
> >     { def:header_Auto-Submitted: }
> \
> >     { def:header_List-Id: } \
> >     { def:header_List-Help: } \
> >     { def:header_List-Unsubscribe:}
> \
> >     { def:header_List-Subscribe: }
> \
> >     { def:header_List-Owner: } \
> >     { def:header_List-Post: } \
> >     { def:header_List-Archive: } \
> >     { def:header_Autorespond: } \
> >     { def:header_X-Autoresponse: }
> \
> >     { def:header_X-Autoreply-From:
> } \
> >     {
> def:header_X-eBay-MailTracker: } \
> >     {
> def:header_X-MaxCode-Template: } \
> >     { match
> {$h_X-Auto-Response-Suppress: } {OOF} } \
> >     { match {$h_X-OS:} {HP Onboard
> Administrator} } \
> >     { match {$h_X-MimeOLE:}
> {\N^Produced By phpBB2$\N} } \
> >     { match {$h_Subject:}
> {\N^Yahoo! Auto Response$\N} } \
> >     { match {$h_Subject:} {\N^ezmlm
> warning$\N} } \
> >     { match
> {$h_X-FC-MachineGenerated:} {true} } \
> >     { match {$message_body}
> {\N^Your \"cron\" job on\N} } \
> >     { match {$h_Subject:} {\N^Out
> of Office\N} } \
> >     { match {$h_Subject:}
> {\N^Auto-Reply:\N} } \
> >     { match {$h_Subject:}
> {\N^Autoresponse:\N} } \
> >     { match {$h_Subject:} {\N(Auto
> Reply)$\N} } \
> >     { match {$h_Subject:} {\N(Out
> of Office)$\N} } \
> >     { match {$h_Subject:} {\Nis out
> of the office.$\N} } \
> >     { match {$h_From:} {\N(via the
> vacation program)\N } } \
> >     } \
> >               
>         } {no} {yes} \
> >               
> }
> >
> > How can one go about making this a compound condition
> that allows both the use of OR as well as AND?
> >
> > Also - the condition from the Exim site looks like it
> has an extra close bracket in it.  Surprised that
> hasn't been updated on the Exim site.
> >
> > Thank you!
> >
> > Brian S.
> >
> > --
> > ## List details at https://lists.exim.org/mailman/listinfo/exim-users
> > ## Exim details at http://www.exim.org/
> > ## Please use the Wiki with this list - http://wiki.exim.org/
>
>
>
> --
> The total budget at all receivers for solving senders'
> problems is $0.
> If you want them to accept your mail and manage it the way
> you want,
> send it the way the spec says to. --John Levine
>
> --
> ## List details at https://lists.exim.org/mailman/listinfo/exim-users
> ## Exim details at http://www.exim.org/
> ## Please use the Wiki with this list - http://wiki.exim.org/
>