Solved

looking for a unix program to handle email

Posted on 2001-07-20
4
160 Views
Last Modified: 2013-12-25
I am looking for a program, most likely in PERL that will retrieve the contents of an email pop box, parse the email messages and store them in a database.

The object is to capture incoming emails to a particular address and store the "from" address in a database driven list server. Next the original emails would be forwarded to any desired address.

This may sound a bit too customized for there to be a pre-existing solution. In that case any programming ideas or references would be appreciated.

Thanks for focusing your formidable mental powers in my direction.
0
Comment
Question by:takoau
4 Comments
 
LVL 84

Expert Comment

by:ozo
ID: 6304375
use Mail::POP3Client;  #or use Net::POP3
use Mail::Procmail;    #or use Mail::Audit;
0
 
LVL 3

Expert Comment

by:rag2000
ID: 6312115
< listening... >
0
 
LVL 2

Accepted Solution

by:
curri earned 75 total points
ID: 6320632
It seems there is an easy way (but maybe you want more).

1. If the e-mail account is a standard shell account, add a .forward file to it, with 2 lines. One will be the address you want the e-mails to be forwarded too, and the other one a pipe to a command (say get-addresses; so you'd write "| get-addresses", but with the complete path :)

This means you intercept the message as it comes, do not need to do pop3 download.

2. The get_addresses command gets the whole e-mail as its input. Then it needs to select just the from line, right ? something like:
 grep "^From:" >> addresses

Now all the e-mail addresses get added to the file called addresses.
0
 

Author Comment

by:takoau
ID: 6321338
Thanks Curry, I ended up finding a prewritten program for this, and this is the way they do it. Great call.

0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

In this tutorial I will aim to show you how simple is making a small application in WhizBase, how to add, remove and update data in the DB. I will make a small address book application where you can add, browse, update and remove addresses. I wi…
In this tutorial I will show you how to provide a dynamic RTF document on your website generated with data from your database. For this tutorial you will need Microsoft Word or WordPad, WhizBase and Microsoft Access. In this tutorial I will show …
Learn the basics of lists in Python. Lists, as their name suggests, are a means for ordering and storing values. : Lists are declared using brackets; for example: t = [1, 2, 3]: Lists may contain a mix of data types; for example: t = ['string', 1, T…
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …

758 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now