April 3rd, 2004, 11:50 PM
Programatically parse incoming emails?
I need to learn how to parse incoming emails that are sent a particular address on my system. Can anyone point me in the right direction? I would probably be using Perl. Would this be handled via Sendmail, procmail, etc? I don't know anything about mail "stuff" but my techie is out of town for a bit and I figure now is a good time to start learning.
April 5th, 2004, 03:23 PM
Install qmail and put a pipe to a program in the relevant dot-qmail file. This pipe should point to a Perl program, which will receive a copy of the mail on standard input for parsing.
If you don't understand much of that, then go install qmail, and come back for further, more detailed, instructions
April 6th, 2004, 12:59 AM
Thanks for the reply.
From what I read, it is not recommended to run Sendmail and qmail - so basically you are suggesting that I replace Sendmail with qmail? That sounds like a larger project than I should try to tackle myself, but I can get help with that. It's a pretty busy live application server and I don't want to risk messing something up.
I was under the impression that I could do what I want to do using procmail along with sendmail, which seems a lot simpler. I'm curious as to why you recommend qmail? Can I NOT do what I want to do using procmail??
Last edited by limitup; April 6th, 2004 at 01:09 AM.
April 7th, 2004, 03:41 PM
Yes. I did it yesterday on a fairly busy production server handling a lot of outgoing mail and a handful of incoming mail boxes, and it took a few hours with no downtime at all. It's relatively straightforward; I can give you more in-depth advice and assistance if you need.
This is always a risk. Providing you test everything immediately after the qmail upgrade, you will be OK, since you can just turn it off and bring sendmail back up until the problem is fixed. The way I handled yesterday's migration was to run qmail on an alternate port (say, 26) while it was in test mode, and manually deliver an email via telnet to port 26, and check that it arrived in the right mail box. This won't mess up any existing incoming mail, as that all comes in on port 25.
You probably can, but it is probably more hassle (though it might not sound like it!) to just replace the entire thing with qmail, which has this feature built in.
Sendmail and procmail are two complex pieces of software which have to be integrated together (Sendmail is also buggy and extremely complicated). qmail is one simple piece of software. You make the choice
August 7th, 2013, 05:46 AM
You can also use a third party solution
Just wanted to let you know that there is a service called mailparser.io which does exactly what you are looking for.