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
Resolved.

A few of the matching lines required that the subject start with those words. So those that were doing a reply would have "Re" in front of it.

Changed it so that it just needed to match it in the subject line and that took care of it.

Brian S.

--- On Mon, 6/3/13, Brian Spraker <spraker@???> wrote:

> From: Brian Spraker <spraker@???>
> Subject: Re: [exim] Making A Compound Condition - With Or + And
> To: "Todd Lyons" <tlyons@???>
> Cc: "exim-users" <exim-users@???>
> Date: Monday, June 3, 2013, 12:10 PM
> This doesn't appear that it works
> properly.
>
> Just added it to the config and restarted the Exim service.
>
> The first part about checking to see if auto reply is turned
> on - is functioning.
>
> Sent a test message to a user with their out of office reply
> turned on.  I then replied back to it - that had "Out
> of Office" in the subject - and still got a auto-reply
> back.
>
> In the conditions, there is one that matches "Out of Office"
> but it seems like it was ignored.  Maybe Exim is only
> parsing the first condition statement and doesn't parse any
> others?
>
> I used the "exim -bh <ip address>" command line to
> watch the sequence of everything that happens - but I didn't
> see where that condition was being checked.
>
> Brian S.
>
> --- On Mon, 6/3/13, Brian Spraker <spraker@???>
> wrote:
>
> > From: Brian Spraker <spraker@???>
> > Subject: Re: [exim] Making A Compound Condition - With
> Or + And
> > To: "Todd Lyons" <tlyons@???>
> > Cc: "exim-users" <exim-users@???>
> > Date: Monday, June 3, 2013, 11:56 AM
> > 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/
> > >
> >
> > --
> > ## 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/
> >
>
> --
> ## 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/
>