Solved

looking for a unix program to handle email

Posted on 2001-07-20
4
165 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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This tutorial will discuss the log-in process using WhizBase. In this article I assume you already know HTML. I will write the code using WhizBase Server Pages, so you need to know some basics in WBSP (you might look at some of my other articles abo…
Recently I have been answering a lot of questions like this in IT forums that I frequent. The question posed is usually something along the lines of "We have software X installed and need to uninstall it for reason Y" or some other variant of the sa…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

828 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