Find the answer to your Linux question:
Results 1 to 5 of 5
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    Intelligent eval. of e-mail content (value extraction and comparison)


    Hi,

    I'm a Linux newbie and I wonder if there exists an e-mail client that solves my problem, or if I can solve it by pipelining the output from an e-mail client to some external applications(s) and/or script(s).

    You see, from time to time I receive a message that contains, among other things in its body, such a string:

    Length: xxx.xx meters

    Of course it's easy to configure an e-mail application to check all incoming messages for such a string and to play a sound when such a message arrives.

    However, what I need is playing a warning tone only when the value of length is higher than 100.00 meters.

    As a newbie, I have no idea how I could solve this problem quickly and easily, but I hope this is the right group on the forum to ask such a question.

    Could you help me?
    Last edited by MichalPL; 02-13-2018 at 09:30 PM.

  2. #2
    Trusted Penguin Irithori's Avatar
    Join Date
    May 2009
    Location
    Munich
    Posts
    4,031
    Email is the wrong tool.

    Look at monitoring tools like icinga.
    https://github.com/Icinga/icinga2

    Will it solve your problem quickly and easily as a self-proclaimed newbie?
    No, but a monitoring tool is the right direction to go.
    You must always face the curtain with a bow.

  3. #3
    Hi Irithori,

    I'm not sure whether your reply refers to the way of analyzing e-mail messages that I seek or to the very fact that I want to monitor length of somethig via e-mail. As for the latter one, I have no control over it as it's inflicted upon me by my client.

  4. $spacer_open
    $spacer_close
  5. #4
    Trusted Penguin Irithori's Avatar
    Join Date
    May 2009
    Location
    Munich
    Posts
    4,031
    Both.

    Email is primarily for humans.
    It is too complex and varying for a monitoring solution.
    Is parsing an email body possible? Yes.
    Will I advise this? No.

    Emails go through various email servers, blacklists, spam detection.
    They can be in html or text.
    Maybe there are attachments. Do they need to be parsed, too?
    Maybe there is more than one Length in the body. Which one is correct?

    I could go on and on, the point is: email is the wrong tool.
    Even if you get it working, you cannot rely on it.
    Which then defies the purpose of an alerting script.

    My advice is to work with your client to get this length metric queryable in a sane, machine readable format.
    Then you can monitor it with a tool of your choice or store the metric in a timeseries database.
    You must always face the curtain with a bow.

  6. #5
    Quote Originally Posted by MichalPL View Post
    Hi,
    I'm a Linux newbie and I wonder if there exists an e-mail client that solves my problem, or if I can solve it by pipelining the output from an e-mail client to some external applications(s) and/or script(s).

    You see, from time to time I receive a message that contains, among other things in its body, such a string:

    Length: xxx.xx meters

    Of course it's easy to configure an e-mail application to check all incoming messages for such a string and to play a sound when such a message arrives.However, what I need is playing a warning tone only when the value of length is higher than 100.00 meters. As a newbie, I have no idea how I could solve this problem quickly and easily, but I hope this is the right group on the forum to ask such a question.

    Could you help me?
    let me translate your request:

    'i am taking a linux class and my teacher told me to write a script to do this. i thought id not do it at all, but ask someone else to write it for me so i came here. write this script so i dont have to learn anything"

    is that close? because you can find lots of command-line tools to check email on linux with a 30 second google search and can also find bash script lessons too with samples on how to run commands and get variables. so since you have all the info you need it seems that you just want us to do it for you

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •