[Chicago-talk] Email processing in perl
amead at alanmead.org
Sun Nov 21 13:22:02 PST 2010
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.
More information about the Chicago-talk