Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    Mailreport filter syntax

    pfSense Packages
    2
    3
    2.9k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • S
      st4t1c
      last edited by

      Hello all,

      i've been trying to get some notifications sent out from my pfsense box, and installed "mailreport"

      it works fine, sending a daily email with System logs, and i can even narrow the results sent by using e.g "snort" so the message includes only relevant to snort rows.

      the question is, can i narrow down the results even further? for e.g i need the rows that both have:

      1. a certain IP, coming from snort
      2. current date, coming from snort
      etc.

      i tried filters like:

      snort && 192.168.1.1
      snort, 192.168.1.1
      snort, 'date +%b'
      etc etc.

      but if i put anything more than just "snort" the results are blank.

      Any ideas on the syntax i could potentially use for filtering the logs??

      1 Reply Last reply Reply Quote 0
      • jimpJ
        jimp Rebel Alliance Developer Netgate
        last edited by

        The current date wouldn't be possible but if you want to filter in a couple ways you can, update to the most recent version of the mailreport package and this should work:

        1. To do term1 and term2:  term1.*term2|term2.*term1
        2. To do term1 or term2: term1|term2

        Remember: Upvote with the 👍 button for any user/post you find to be helpful, informative, or deserving of recognition!

        Need help fast? Netgate Global Support!

        Do not Chat/PM for help!

        1 Reply Last reply Reply Quote 0
        • S
          st4t1c
          last edited by

          good stuff, thanks a lot!

          now i'll go find a way to get a pfblocker report in the mail too!

          1 Reply Last reply Reply Quote 0
          • First post
            Last post
          Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.