Re: Receive, process and send email

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]





2009/9/21 Alan Hodgson <ahodgson@xxxxxxxxx>
On Sunday 20 September 2009, "CSB" <kjcsb@xxxxxxxxxx> 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
>
> I'm not sure where to start with this one so any suggestions would be
> appreciated.

If it's a minor amount of processing, you can just pipe it to a script from
procmail or even straight from the MTA. I don't really like that mechanism
though - too prone to produce bounces in the case of long processing times
or errors. It's better to dump them in a Maildir and use it as a queue for
a polling script.

Perl in particular has a bunch of libraries available to correctly parse
MIME messages and extract addresses and attachments and stuff. Don't write
your own parser.

talkin' about perl, i remember once i used something called milter for things like this .

--
"No animals were harmed in the recording of this episode. We tried but that
damn monkey was just too fast."
_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
http://lists.centos.org/mailman/listinfo/centos



--
Linux counter #213090
_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
http://lists.centos.org/mailman/listinfo/centos

[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux