Ad Widget

Collapse

Monitoring mail messages

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • nickp
    Junior Member
    • May 2007
    • 28

    #1

    Monitoring mail messages

    Hi

    Is it possible to "monitor" a mailbox (through imap, pop3) to parse the messages.

    For example, from different backup solutions, everytime a backup has gone wrong it sends an email, Zabbix imports the mail and a trigger is fired when there's some kind of word in the subject: "failed", "not completed" etc..

    Would be very useful for us to focus more on the daily issues instead of reading mails..

    If Zabbix isn't the solution, maybe someone knows another approach?

    Regards
  • nickp
    Junior Member
    • May 2007
    • 28

    #2
    So nobody has a clue/hint here?

    Comment

    • jerrylenk
      Member
      Zabbix Certified Specialist
      • May 2010
      • 62

      #3
      What you could possibly try: (If a zabbix_agent is on the server, where the mailbox resides)

      Pretetend the mailbox file is a log file and monitor it via a 'logrt' item. Mail servers like postfix have users' mailboxes as plaintext files usually in /var/spool/mail, newly arriving e-mails are simply added to the end of the file.

      Of course, if your mail server is something different, or if you cannot grant zabbix agent read access to the mailbox in question, that won't work.

      Greetings, Jerry

      Comment

      • nickp
        Junior Member
        • May 2007
        • 28

        #4
        thx for the info.

        The mail is is flowing through an Exchange server, so perhaps we could import the mail through pop3/imap.

        Don't really know where the start, i can imagine there are lot's of users who have encountered the same problem where snmp is no option.

        Will update the progress here...

        Comment

        • jerrylenk
          Member
          Zabbix Certified Specialist
          • May 2010
          • 62

          #5
          I have no idea about the inner workings of Exchange server, but maybe there is anything helpful in windows system log which you can monitor? Maybe even the Subjects of incoming mails...

          Comment

          • heaje
            Senior Member
            Zabbix Certified Specialist
            • Sep 2009
            • 325

            #6
            Personally, this sounds like something that you'll need to write a custom check for. PHP provides plenty of libraries to connect to a mailbox via POP/IMAP.

            Comment

            • Gunsthall
              Junior Member
              Zabbix Certified Specialist
              • Jul 2011
              • 15

              #7
              In Exchange 2003 (I don't know 2008 but I presume it's also available) you can configure to Exchange 2003 Message Tracking and Logging, One of the options there is to enable Message Tracking and Subject Logging. With this, the subject of every message will be displayed in the Exchange Message Tracking Center.
              I am not sure but I think it will also appear in the .log file is created (you can configure the name and path of this file in those dialogue windows also).

              If you use this feature, along with the jeryylenk proposal of 'logrt' items, you most probably could reach your monitoring goal.

              Pay attention to a couple of things; the size of the logs (you better active 'Remove log files after X days' option) and your company security and privacy policy, because activating the logs of mail and specially the 'subject' could go against these policies or even the law, depending on the country.

              By the way, it would also be a good idea to plan in advance a good set of subjects depending on the backups issues/results, so it makes it easy for monitoring it later.

              I hope we gave you some ideas. Good luck!

              Comment

              • bradh
                Junior Member
                • Aug 2012
                • 14

                #8
                Another possibility would be to write a CMD which calls powershell script. The CMD can be called as a userparameter from agent

                Here's a quick example of retrieving email from Exchange mailbox:


                Have not done this yet, but may be doing the same thing soon.
                Last edited by bradh; 19-10-2012, 04:03.

                Comment

                • nickp
                  Junior Member
                  • May 2007
                  • 28

                  #9
                  Hmm thx, will check it out.
                  It's really a simple question, but as always to get what you want it's something else...

                  Comment

                  Working...