gnarwl vacation queryfilter with vacationStart and vacationEnd times checked

We are using gnarwl for vacation notification and I would like gnarwl to only reply if the current time is in the vacationStart vacationEnd window.

Here is the queryfilter to do that using the following information:

<br />
$recepient           - receiver of the message<br />
$time                - current time in seconds since the epoch<br />
vacationActive       - attribute for start time of the vacation in seconds since the epoch<br />
vacationEnd          - attribute for end time of the vacation in seconds since the epoch<br />
mail<br />
mailAlternateAddress - attribute for email address of an account<br />


queryfilter (&(|(mail=$recepient@*)(mailAlternateAddress=$recepient@*))(vacationActive=TRUE)(|(!(vacationStart=*))(&(vacationStart<=$time)(vacationEnd>=$time))))

Broken down this does the following:


There's a few things going on here.

Check that all these conditions are met (that is the outer and (&).

  • Match either mail or mailAternateAddress on the recepient address
  • Make sure vacationActive is TRUE
  • Check that either vacationStart is not present or
    • vacationStart is less than the current time and
    • vacationEnd is greater than the current time.


Add new comment

This question is for testing whether or not you are a human visitor and to prevent automated spam submissions.

About the Author...

I published a Thing on @thingiverse! #thingalert Fri Jun 12 17:08:46 +0000 2020

Slides from LISA 2019 Linux systems troubleshooting #LISA2019 Tue Oct 29 05:59:30 +0000 2019 configuring grub2 with EFI Fri Sep 13 05:20:01 +0000 2019

I published a Thing on @thingiverse! #thingalert Tue Jul 23 19:27:57 +0000 2019

Nokogiri install on MacOSX Fri Jul 12 15:06:49 +0000 2019