[Chicago-talk] Email processing in perl
richard at rushlogistics.com
richard at rushlogistics.com
Sun Nov 21 13:52:16 PST 2010
Actually, now that I think about it. I will be creating an alias on my hosting companies server. It gives me the option to automatically forward the emails to another email address. So I guess I just need to figure out what address can be used so that it goes to a linux machine where I have procmail and mime::lite set up to do what I need.
Watch our 3 minute movie: http://www.rushlogistics.com/movie
From: Alan Mead <amead at alanmead.org>
Sender: chicago-talk-bounces+richard=rushlogistics.com at pm.org
Date: Sun, 21 Nov 2010 15:22:02
To: Chicago.pm chatter<chicago-talk at pm.org>
Reply-To: "Chicago.pm chatter" <chicago-talk at pm.org>
Subject: Re: [Chicago-talk] Email processing in perl
On 11/21/2010 12:01 PM, richard at rushlogistics.com wrote:
> I will look into those modules and procmail. However, if I understand correctly the modules must be intsalled on the machine that is hosting muy domain? Is it correct to say that is the case? Or is it possible to set up a random domain somehow and create an email adress such as test at randomlikedomain.net and begin testing?
I think you need to know how email works with a mail client before you
try to make Perl do the same thing.
So, your answer is "That depends." If your Perl gets the mail through
POP/IMAP, your Perl code could be anywhere and work with any email
address (to which you have access). If you are making aliases on the
mailserver, then your code will either have to run on that server or
know how to transfer the mail to another machine. I think using POP or
IMAP would be a lot more flexible. (BTW, I also bet you want to use
IMAP because if you use POP or write Perl that pretends to be am MTA
then your client probably loses access to that email when your Perl code
stores the message somewhere local.)
For sending email, the location of your code may matter because your IP
address can be one way that your mail client is given permission to post
mail. (Open relays are strongly discouraged today, due to spammers.) At
my university, having an IP on campus is sufficient to post email. My
personal ISP uses some version of POP-before-SMTP so I can post email
from anywhere but I have to successfully POP the mailserver before I can
post email (and that privilege only lasts a short while, 15 minutes?).
My ISP at home, Comcast, is pretty draconian due to all the Windows
zombies they require that all email goes through their STMP at a port
like 463 (they block outgoing traffic on port 25).
BTW, I've always used MIME::Lite to send email and it's always been
sufficient (for me, YMMV) and it is fairly lightweight. It has methods
to post directly to Sendmail and also to STMP to a mail server.
Alan D. Mead, Ph.D. Assistant Professor, Institute of Psychology
Scientific Adviser, Center for Research and Service
Illinois Institute of Technology
3101 South Dearborn, 2nd floor
Chicago IL 60616
Money can't buy you happiness,
but it does bring you
a more pleasant form of misery.
Chicago-talk mailing list
Chicago-talk at pm.org
More information about the Chicago-talk