[CentOS] Receive, process and send email

Frank Cox theatre at sasktel.net
Sun Sep 20 18:25:09 UTC 2009


On Mon, 21 Sep 2009 05:49:29 +1200
CSB wrote:

> We wish to do the following:
> 1. receive an email with an attachment
> 2. process the email body to get some information from it
> 3. send an outbound email to an email address based on the information
> derived from step 2. The email will include the attachment received in step
> 1

You should be able to string a few commands together in a script to get what you
want, part of which depends on how you pick up and send out your email.  Do you
have your own mailserver?

If you don't have your own mailserver (or even if you do), this is one solution:

Step 1:  fetchmail or getmail.  I personally prefer getmail but that's just me.

Step 2:
http://www.codealias.info/technotes/extracting_attachment_from_e-mail_using_uudecode

Step 3:  http://www.cleancode.org/projects/email

If you have your own mailserver, you can do steps 1 and 3 in a more "direct"
manner, if you wish.

-- 
MELVILLE THEATRE ~ Melville Sask ~ http://www.melvilletheatre.com



More information about the CentOS mailing list