Demo Discussion
Forum Config Examples Contributions Vulnerabilities
  Contributions to ELOG  Not logged in ELOG logo
Message ID: 37     Entry time: Tue Aug 23 19:45:16 2011
Author: Stuart Wilkins 
Author Email: swilkins@bnl.gov 
Category: Script 
Subject: ELOG Mail Parser 
Status: Alpha 
Last Revision:  

 Hi!

I have attached a small script which can process an e-mail and submit this e-mail as a log entry. This is alpha at the moment but if you have suggestions or find bugs please let me know. 

The easiest way to process this is to use the ".forward" file in unix. If this file contains the line:

| "/usr/bin/python /home/tardis/elogmail/process.py --log /home/tardis/elogmail/mail.log -r -u http://localhost:8080/TARDIS -a Category=email -a Type=Log"

This will pipe the incoming mail to the e-log running on the localhost with the experiment TARDIS. Attributes can be set using the "-a" switch like in the elog command line utility. To get help with all the options please run the script with the command:

python process.py -h

which will give help.

Any questions, please don't hesitate to contact me, and I will do my best to help.

Thanks again to Stefan for a great application.

Best wishes,

Stuart

 

Attachment 1: process.py.gz  3 kB
Attachment 2: forward.gz  148 Bytes
ELOG V3.1.5-fe60aaf