LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 12-20-2010, 05:36 PM   #1
taiwf
Member
 
Registered: Jun 2005
Distribution: debian, ubuntu, redhat,knoppix
Posts: 194

Rep: Reputation: 31
editing email message


I got an daily email outline the vulnerabilities of software/OS/hardware. I have a catalog listing some items of interests. Everyday i have to go through the email and manually look up item of interests and resend out the filtered email message.

What I try to do here is to have my daily vulnerabilities email arrive to my inbox and another copy with massaged content generate in my mailbox so i don't have to manually change the email message everyday.




## the email message look like below:
--------------------------------
Multiple Vendor ProFTPD 1.3.3c mod_sql "sql_prepare_where()" Buffer Overflow Vulnerability
Severity:High CVSS Score(V2):7.3 Version:1 ID#:630501

description:...
Sources: ...
Analysis: ...
Detection: version 4
Exploit: none




SAP Afaria 6.0 SP1 Unspecified Cross-Site Scripting (XSS) Vulnerability
iDefense Severity:High CVSS Score(V2):3.7 Version:1 ID#:630684

description:...
Sources: ...
Analysis: ...
Detection: version 6 only
Exploit: none


TIBCO Software Inc. ActiveMatrix Runtime Ccomponent JMX Connections Unspecified Vulnerability
iDefense Severity:High CVSS Score(V2):7.4 Version:1 ID#:630023

description:...
Sources: ...
Analysis: ...
Detection: All versions
Exploit: publicly available.

Last edited by taiwf; 12-21-2010 at 02:17 AM.
 
Old 12-20-2010, 06:53 PM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Quote:
Originally Posted by taiwf View Post
manually look up item of interests (..) content generate in my mailbox
Unless you attach an email example (plain text only please) and a list of items you're interested in, how do you expect people to help you with this?
 
Old 12-21-2010, 02:13 AM   #3
taiwf
Member
 
Registered: Jun 2005
Distribution: debian, ubuntu, redhat,knoppix
Posts: 194

Original Poster
Rep: Reputation: 31
my apology that didn't supply full information. The important item of email message was in the original post.

The look up database has field such as "software name" , "software version" , "vulnerability severity= medium or HIGH", "exploit public available" , "remote exploit", "0day".

So each item contain some of above mentioned, I would like the resultant email to have the text to become capital Or marked with * just to stand out.
For email item has none of above, either tag with a name or truncate off from the message.

eg. SAP on database mark as version 5. Then I wouldn't be interested on the rest of SAP item's details. Simply skip to next item in the email.


I can write some simple bash script but I am not sure what linux package to use to achieve email message editing( in batch fashion).

Last edited by taiwf; 12-21-2010 at 02:15 AM.
 
Old 12-21-2010, 10:01 AM   #4
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
No apologies necessary. When your email arrives at your MTA arrives often a local LDA like 'procmail' will be used to filter things before delivering. Procmail "recipes" can modify messages and can use any regular system tools like sed, grep etc to modify the body of the message. I wouldn't call that "editing" but it should be possible.
 
Old 12-21-2010, 04:45 PM   #5
taiwf
Member
 
Registered: Jun 2005
Distribution: debian, ubuntu, redhat,knoppix
Posts: 194

Original Poster
Rep: Reputation: 31
do i need to have system admin level privilege? is it possible to do it on only my user account or it has to be system wide configuration? Also, does that mean i can still retain the message format (html or whatever format email arrive)?
 
Old 12-22-2010, 05:09 PM   #6
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
You could filter for one unprivileged user account, yes and procmail can work on a copy of the message.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Message Rejected Error via Email carlosinfl Linux - Server 0 11-02-2007 07:54 AM
error message after editing config file kklim Linux - Newbie 6 01-10-2006 07:09 PM
Bounce back email with a message? tauras911 Linux - Newbie 3 02-10-2005 03:44 PM
Editing outgoing email content senthil Linux - Software 0 06-13-2003 07:46 PM
script to send email message meluser Programming 2 03-26-2003 12:35 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 05:14 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration