Sponsored Content
Full Discussion: Parse Unix Mail
Top Forums Shell Programming and Scripting Parse Unix Mail Post 302103220 by its-ashish on Wednesday 17th of January 2007 04:47:05 AM
Old 01-17-2007
Parse Unix Mail

Hi,

This is my first thread on this forum.

I have an urgent requirement where I have to write a shell script to
- scan through the mails one by one,
- pick up the time when that mail is received,
- parse through the contents of that mail and pick up relevant information and load it into the database, and finally
- copy this mail to some other location.

The time the mail in received in obtained from the 1st line

for e.g.
From abc@xyz.com Mon Jan 15 11:18:18 2007

I need to pick up the time - "Mon Jan 15 11:18:18 2007"

After parsing through the contents (subject of the mail), which I think I can manage, I need to copy the mail into a different location, so that this mail is not processed once again.

This process would need to run every night.

Can this be done using shell scripts ??

Alternately, is there any way the mails can be split into individual mails and copied into separate files? I would need the header information in this as well as I need to pick the timestamp of the mail-received time.

Any help would be appreciated. I am short of time.

Many Thanks.

Ashish
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

can not send mail from unix server to company/yahoo mail

hi, Gurus, I need some help with sending mail out from my UNIX server: It is running Solaris 2.6 and the sendmail version is 8.8. Output of :/usr/lib/sendmail -d0.1 -bt < /dev/null Version 8.8.8+Sun Compiled with: LOG MATCHGECOS MIME7TO8 MIME8TO7 NAMED_BIND NDBM NETINET ... (5 Replies)
Discussion started by: b5fnpct
5 Replies

2. UNIX for Dummies Questions & Answers

I am not able to send mail form unix to other mail accounts.

Using Mailx command i.e mailx -s "subject" chinni@hotmail.com < \tmp\chin this command executed sucessfully but not able to receive the mail in chinni@hotmail.com please help. (1 Reply)
Discussion started by: chinnigd
1 Replies

3. Shell Programming and Scripting

Unix Script to parse a CSV

I am writing a unix script that will parse a CSV and edit the values. My CSV looks like this 0,0,0,0,1,0,1,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0 10,11,7,0,4,12,2,3,7,0,11,3,12,4,0,5,5,4,5,0,8,6,12,0,9,3,3,0,2,7,8... (16 Replies)
Discussion started by: RJ17
16 Replies

4. Shell Programming and Scripting

Mail attachment with unix mail

Hi Could someone help me with the details on how to send an attachment through mail in unix. I have an html file in my unix machine and I want this to be send to some mail id, plese help with the steps. Regards Ajay (2 Replies)
Discussion started by: ajaykumarboyana
2 Replies

5. UNIX for Dummies Questions & Answers

Unix mail to personal mail, Strange behavour

Hi. I am running a script on solaris 10 and mailing it to my personal email. the script is ran as user xxx, And i have edited the crontab for user xxx to run the script and mail it to my email account. /network_check.sh | /usr/bin/mailx -s "Network Test" k454@hotmail.com the sript... (2 Replies)
Discussion started by: k00061804
2 Replies

6. Shell Programming and Scripting

how to parse this file in unix

Hi all, I need to parse a file which is having this format: Details: 1 Name{ first=james second=steven } Sibling{ first=2 second=3 } Age{ first=13 second=14 } Friend{ jessy } Details: 2 (8 Replies)
Discussion started by: natalie23
8 Replies

7. UNIX for Dummies Questions & Answers

Parse /var/mail

Hi all... We have a box that receives a lot of incoming emails. I have a .procmailrc file that in turn invokes a python script, which process each of these incoming email. All is nice and good. However, before the .procmailrc and python script were in place, we still were receiving emails and... (0 Replies)
Discussion started by: khader69
0 Replies

8. UNIX for Advanced & Expert Users

How to relay mail to mail server from Unix ?

Hi, I need to send email notifications from Unix/Linux box to users using mailx. In these Unix/Linux boxes mail is not configured however we are having mail server configured in our LAN. Could you please provide instructions to configure relay in these boxes so that we can relay our mails... (3 Replies)
Discussion started by: sourabhsharma
3 Replies

9. UNIX for Dummies Questions & Answers

How can i parse my Unix log files??

Hello, i would like to parse Unix log files and i would like to use a Unix syslog analyzer. I'm going to use Eucalyptus and i would like to parse its log files. Is there any open source/free syslog parser?? Thanks, in advance! (2 Replies)
Discussion started by: g_p
2 Replies

10. UNIX for Advanced & Expert Users

How can I send a mail from my outlook or other mail accounts to UNIX server?

Hi all, I want to send a mail for my business needs from outlook account to an unix server (HP-UX) but I don't send any mail. While I can send from the unix server to my outlook account, I can't send from outlook to unix. How can I achieve this ? How can I send a mail from my outlook or other... (2 Replies)
Discussion started by: igelegin
2 Replies
CLAWS-MAIL-PGPMIME(1)					     CLAWS-MAIL-PGPMIME Manual					     CLAWS-MAIL-PGPMIME(1)

NAME
claws-mail-pgpmime - Handling of PGP/MIME signed and/or encrypted mails. DESCRIPTION
This manual page documents briefly the claws-mail-pgpmime plugin. This manual page was written for the Debian distribution because the original program does not have a manual page. claws-mail-pgpmime is a plugin (loadable module) for the Claws Mail mailer. This plugin allows decrypting mails, verifying signatures and sign or encrypt your own mails using PGP/MIME. It requires GnuPG and GPGME. USAGE
Before using a plugin you must instruct Claws Mail to load it on startup. For this you must go "Configuration" menu on main window toolbar, open "Plugins..." dialog, click on the "Load plugin..." button and select the plugin file, named pgpmime.so, and press the "Open" button. FILES
/usr/lib/claws-mail/plugins/pgpmime.so The loadable module for claws-mail-pgpmime. ~/.gnupg/gpg.conf Configuration file for GnuPG, read man gpg for details. BUGS
Please use reportbug claws-mail-pgpmime for reporting Debian bugs for this package. The upstream BTS can be found at http://www.thewildbeast.co.uk/claws-mail/bugzilla/index.cgi. SEE ALSO
claws-mail(1), claws-mail-extra-plugins(1), gpg(1) AUTHORS
The Claws Mail Team <theteam@claws-mail.org> Wrote the claws-mail-pgpmime plugin. Ricardo Mones <mones@debian.org> Wrote this manpage for the Debian system. COPYRIGHT
Copyright (C) 2008 Ricardo Mones This manual page was written for the Debian system (but may be used by others). Permission is granted to copy, distribute and/or modify this document under the terms of the GNU General Public License, Version 3 or (at your option) any later version published by the Free Software Foundation. On Debian systems, the complete text of the GNU General Public License can be found in /usr/share/common-licenses/GPL. claws-mail-pgpmime September, 2008 CLAWS-MAIL-PGPMIME(1)
All times are GMT -4. The time now is 02:33 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy