Our website would like to use cookies to store information on your computer. You may delete and block all cookies from this site, but parts of the site will not work as a result. Find out more about how we use cookies.

Login or Register

Powered by
Powered by Novacaster
 
Email to Rss
by Nic Jackson at 18:47 06/07/04 (Blogs::Nic)
After playing with EmailtoRss.com for a while i realised it is somewhat inadequate.

So i started to build one myself.

The problem with Email To Rss is that you can not use it to subscribe to mailing lists.

DOH ! the very reason i wanted to use it i want all that mono cruft out of my inbox and into my RSS reader.

So i started to build one, so far so good it supports multiple feeds, the interface is a bit crummy but ok for the time being. It will automatically filter a feed for number or messages and / or data size for collection of messages stored in the feed.

I finally managed to build the final bits this morning that alow me to reply to an email sent to the system thus activating the mailing list. I got the conformation to say the list was active great, let the messages roll.

Now here is my problem, the way the mail collection works at the moment is that all mail is dumped into a catch all account (feeds have individual address). I planned on using the address in the mail's to field i.e rss5@rss.pictureserv.com to identify its owining feed.

Yes i didnt take into account that mailing lists might just be sent to list@blahblah.com.

I dont know much about email, i've had a look at the specs but i cant find the header that would reliably give me the address to which the mail was intended.

Delivered-to looks promising but i believe this is not always going to be present. So then i thought maybe the Received headers ?

Im sure there has to be a reliable way of doing this doesn't there ?

Thanks in Advance,

|| | |||||| |||||||||| || ||||
Nic

<< Oops if only id know that befo... For all those Windows IPod Use... >>
View Comments (Threaded Mode) Printer Version
Email to Rss Nic Jackson - 18:47 06/07/04
Re: Email to Rss Gordon Hundley - 06:39 09/07/04
> Im sure there has to be a reliable way of doing this doesn't there ?

Nope. Welcome to the horror that is SMTP. It was adequate for its purpose in 1982 when Jon Postel specified it, but it's a little tired these days under the weight of the more varied uses it has since been tasked to.

Just as with a paper letter, the important delivery information is on the envelope. You can write two entirely different addresses on the envelope and the letter itself. The postal service will only ever look at the envelope address and attempt to deliver the letter to that address.

Unfortunately, in the world of SMTP, delivery to a post box is considered final. At this point, most mailers consider it acceptable to discard the envelope, and most post boxes do not support envelopes anyhow. You will regularly find that lists will contain a header "To:" field of the list address itself. And yet it is in your POP3/IMAP/local mailbox. What happened was that the mail transfer agent added two "envelope" lines a "To" and a "From" line. As the mail was passed from MTA to MTA, those lines were read and the mail routed. When it got to your mailbox, they were discarded, and only the body text was written. Although there are headers that say "To:" and "From:" - notice the colons - they are simply part of the body and were not parsed by the MTAs.

The solution to dealing with this is to modify the local delivery agent of your local MTA. A typical LDA used by the Sendmail MTA is Procmail. Note that modifying the LDA to preserve the envelope reciepient has potential privacy concerns due to exposure of BCC addresses.

Does that cover it?
--
DrGoon

Question Simon - 10:10 09/07/04
Sometimes the Received lines carry the To envelope address as in:

Received from (blah) by (blah) for <user@domain.com>

... and sometimes they don't.

I know it's governed by the Header Format .cf definition (in my sendmail.cf):

$?u for $u;

... but I'm not clear why the $u macro should be undefined in some cases, or whether I'd be better switching it to $: (or $h?) instead.
--
simon

Re: Question Nic Jackson - 10:32 09/07/04
Thanks,

A nice solution is out of my control as its cheapish shared hosting and i have no control of the mail server config : (

Last night i scanned all the headers in the mail from the mailing list server. Nothing of any use what-so ever.

As an interim fudge i got out the bandages and superglue. Adding an additional field ToAddress to the criteria this allows me to configure the system to sort the mail when a mailing list is addressed to mono-lists@ximian.org etc.

Its not perfect and removes some of the eligance, but after implementing a few checks based on recieved headers X-Delivered-To etc, the mail appears to be going where it should.

Its working ok for now, i might investigate the possibilities of creating some code that implements the SMTP protocol and bypass the pop3 server altogether.

More importantly i have to finish version two of UnFu"kWMA for decoding napster so i can burn them to my MP3 CD before i go on my hols : )

Thanks for your help

|| | |||||| |||||||||| || ||||
Nic

Re: Question Simon - 12:00 09/07/04
...i might investigate the possibilities of creating some code that implements the SMTP protocol...

You'll regret that :-)
--
simon