I'm looking for guidance on the best practice when handling syntactically invalid message id's in FETCH ENVELOPE responses. One of my users has some messages that contain message-id fields like this:
This will make a lot of people protest, I guess.
If you bother to check the message-id's legality, then you might consider doing so at delivery time, and reject delivery. That'll block some mail, which is generally a bad thing. However, it's not as bad as it looks at first sight. As you say:
If I report this message-id to the user's copy of Outlook Express as-is (but properly quoted and escaped), it barfs and pretends that the message doesn't exist
If the server doesn't block it, the biggest client will, so the difference isn't very big.
If you refuse delivery of syntactically invalid message-ids, you can be sure you won't trigger client bugs, or, for that matter, your own bugs. And what mail will you block? I grepped in my mailbox for message-ids of the format you saw, here are the last few:
Subject: boost your Cellphone's signal for better reception Subject: new device eliminates Cellphone static and dropouts Subject: Re: Lenders Compete for your Business! Subject: 50% Increase In Cell Phone Reception Subject: Travel Accommodations Enclosed
Spam does make the case for rigid protocol adherence stronger.
--Arnt
