Solved

looking for a unix program to handle email

Posted on 2001-07-20
4
175 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Tutorials alone can't teach real engineering

So we built better training tools.

-Hands-on Labs
-Instructor Mentoring
-Scenario-Based Tests
-Dedicated Cloud Servers

All at your fingertips. What are you waiting for?

Question has a verified solution.

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

This tutorial will discuss fancy secure registration forms, with AJAX technology support. In this article I assume you already know HTML and some JS. I will write the code using WhizBase Server Pages, so you need to know some basics in WBSP (you mig…
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 dynamically set the form action using jQuery.
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

687 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