Re: received header field
am 16.05.2005 09:41:21 von susan barnesDavid McDivitt wrote:
> I wrote some mailing list / discussion forum software which works pretty
> well. It goes out to a web domain via POP3 every minute or so and checks for
> email. If found, email is downloaded, interrogated, and processed.
>
> I have been examining the TO, CC, and X-ORIGINAL-TO header fields for list
> address and list command info. Early on I had a problem if the same email
> was addressed to three lists on the server at the same time, the server
> would distribute nine emails. This happened because the same email is
> received three times at the domain, once for each address, but for each
> email there were three addresses in the TO field. This was resolved by
> caching the message ID field and only processing it one time per email.
>
> A problem I just resolved is when an email is sent to a list BCC. When that
> happens the list address will not appear in either the TO or CC fields, and
> may appear in the X-ORIGINAL-TO field, which is not reliable.
The X-ORIGINAL-TO header is most likely meant to carry the real
envelope-sender and this is all you should care about. Forget about To
and CC-Headers, they should not be considered when routing mail.
Make your provider make that header a reliable feature. If you want a
pop2smtp solution, you have to store the envelope-recepient in an extra
header, everything else will lead to problems and ugly hacks.
> Upon looking through the headers I noticed the intended address seems always
> present in one of the RECEIVED fields. There may be multiple RECEIVED
> fields, but the one containing the intended address appears to be created by
> the POP3 server. What I did was look through all the RECEIVED fields for all
> occurrences of "<" and ">", and if what was found between them was a valid
> email address, I would add that address to the list of addresses found at TO
> and CC. This is relatively safe and seems doubtful I will ever miss a list
> address.
This would also reflect the original envelope recepient. However can you
be sure that your ISP will never change their setup, so that
Received-Headers will look differently one day?
Regards
sue
(Nothing to do with sendmail, back to cml-as)