Ad Widget

Collapse

Mailbox Monitoring.

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • bcsx123
    Junior Member
    • Sep 2014
    • 14

    #1

    Mailbox Monitoring.

    Hi.

    I have to monitor a mailbox using Zabbix and create specifics triggers for some received messages checking the object or the body of the email.
    How can I do this? Any ideas?

    Thanks.
  • vaportrail123
    Junior Member
    • Aug 2014
    • 5

    #2
    Is this doable? this would make a project of mine much easier

    Comment

    • bcsx123
      Junior Member
      • Sep 2014
      • 14

      #3
      Originally posted by vaportrail123
      Is this doable? this would make a project of mine much easier
      Yes, I think this can be done without too much problems, but my solution is a bit tricky. I don't know if you need the same thing or something similar.

      Unfortunately at the moment the project is stationary, but I was working on it and it was giving good results.

      I used an external check that consists of an sh script that call a php using php cli that checks a mailbox using IMAP.

      As I said it's a bit tricky but it seems to work. If you have any other idea feel free to share!

      Bye!

      Comment

      • rhyse
        Junior Member
        • Nov 2014
        • 5

        #4
        Hi

        I am trying to do something similar (perl via an external check).

        basic idea is.
        1) Send email via SMTP
        2) Wait 5 seconds
        3)Confirm Email was recieved via IMAP.

        Now this all works via the CLI (also tested using su zabbix -c '....'). But I cannot for the life of me get it to work "automatically". I keep getting it going into unsupported state due to a timeout. I have updated the zabbix server (zabbix_server.conf) timeout to be 30sec's. Total script duration is around 10-15 sec's. A debug of the log looks to be showing the correct macros beeing passed through

        Any ideas ? Any help is appreciated !

        Thanks in advanced

        Comment

        • bcsx123
          Junior Member
          • Sep 2014
          • 14

          #5
          Originally posted by rhyse
          Hi

          I am trying to do something similar (perl via an external check).

          basic idea is.
          1) Send email via SMTP
          2) Wait 5 seconds
          3)Confirm Email was recieved via IMAP.

          Now this all works via the CLI (also tested using su zabbix -c '....'). But I cannot for the life of me get it to work "automatically". I keep getting it going into unsupported state due to a timeout. I have updated the zabbix server (zabbix_server.conf) timeout to be 30sec's. Total script duration is around 10-15 sec's. A debug of the log looks to be showing the correct macros beeing passed through

          Any ideas ? Any help is appreciated !

          Thanks in advanced
          Hi.

          According to documentation (https://www.zabbix.com/documentation...types/external):
          In case the requested script is not found or Zabbix server has no permissions to execute it, item will become unsupported and corresponding error message will be set.
          Have you put script in the correct folder '/usr/lib/zabbix/externalscripts'?
          Have you set the correct permission? I have set 755, zabbix:zabbix and it's working.

          Comment

          • rhyse
            Junior Member
            • Nov 2014
            • 5

            #6
            Hi

            Yep, all of that is correct and the script was running just not completing

            I have however resolved the issue, for some reason when runnign automatcally I was not able to access /dev/urandom (used to create a random subject string), I could run this as the service account and it did work, I have change the "random" key to be `date` and this seems to be working now. Took me 2 days to figure that out !

            thanks for your help

            Comment

            • ZMS
              Junior Member
              • Nov 2020
              • 19

              #7
              hello,
              i know its been a while since this forum was opened but how do i monitor a mailbox? i didn't understand from what u wrote

              Comment

              Working...