Re: [evolution-patches] Patch for the receipt bounty (#127534)



On Thu, 2004-08-12 at 06:33, ERDI Gergo wrote:
> Hi,
> 
> On Wed, 11 Aug 2004, Jeffrey Stedfast wrote:
> 
> > I think that there should probably be a default per-account setting for
> > whether or not the composer should default to requesting a receipt.
> > other than that, I think the composer code looks ok so far.
> 
> From the bounty description (emphasis mine):
> "Add an option to the composer for "Request a Read Receipt for this 
> Message" (or something like that). *This would always default to being 
> off*. Make the composer generate proper MDN request headers if the option 
> is turned on."

if the other settings are going to be per-account, then so should this.

it's like 5 lines of code... seriously.

> 
> 
> > I think I'd put NEVER as the first item in the enum (0 makes a good
> > NEVER value, plus NEVER should be default anyway)
> 
> Umm... but surely the best default behaviour is to ask the user so he can 
> decide?

no. dialog popups are annoying and most people will not want this
feature, hence it should default to off.

the people who want it will know to look for it.

> 
> 
> > I'm not sure I'd use the values gotten from medium_get_header() here...
> >
> > using camel_mime_message_get_message_id() might be a better way to go as
> > it has been canonicalised.
> >
> > along the same lines, might be better to use camel_mime_message_get_date
> > () and then either use camel_header_format_date() (from camel-mime-
> > utils.h) to format the time_t/offset to an rfc822 date, or, perhaps,
> > format that time_t into a more human friendly form?
> >
> > not sure what the preferred date format would be... perhaps rfc822
> > format is fine.
> 
> OK, I'll use these specific accessors (I just didn't bother looking for 
> them)

notzed disagreed with me and had some good points, so don't worry about
this I guess.

unless you want to change the date format or something. I honestly don't
care one way or the other.

> 
> 
> >> +       /* Collect information for the receipt */
> >> +       gethostname (hostname, MAXHOSTNAMELEN);
> >
> > probably should check the return code from gethostname as it may fail.
> >
> > also, the hostname may not include the domain. not sure we care?
> 
> RFC 2298 says:
> 
> "For Internet Mail user agents, it is recommended that this field contain 
> both the DNS name of the particular instance of the UA that generated the 
> MDN and the name of the product.  For example,
> 
>       Reporting-UA:  rogers-mac.dcrt.nih.gov; Foomail 97.1"
> 
> so gethostname() should be close enough, this is not information used to 
> somehow connect to the machine so it shouldn't cause any problmes if it's 
> not an FQDN.

DNS name is an FQDN. but whatever.

> 
> >> +       /* Create the machine-readable receipt */
> >> +       receipt_data = camel_data_wrapper_new ();
> >> +       type = camel_content_type_new ("message", "disposition-notification");
> >> +       camel_data_wrapper_set_mime_type_field (receipt_data, type);
> >> +       camel_content_type_unref (type);
> >> +       stream = camel_stream_mem_new ();
> >> +       camel_stream_printf (stream,
> >> +                            "Reporting-UA: %s; %s\n"
> >> +                            "Final-Recipient: rfc822; %s\n"
> >> +                            "Original-Message-ID:%s\n"
> >> +                            "Disposition: manual-action/MDN-sent-manually; displayed",
> >> +                            hostname, "Evolution " VERSION SUB_VERSION " " VERSION_COMMENT,
> >> +                            self_address, message_id);
> 
> > From rom a quick scan of the rfc, it appears you've missed bits - like
> > setting the Original-Message-Id, Original-Recipient, Final-Recipient,
> > the different disposition modes, etc (tho I will admit to not having
> > read the whole rfc yet).
> 
> Maybe you just missed it, but it's in the code above.

I meant as far as handling the incoming MDN messages.

> 
> 
> > perhaps don't quote the original subject? might look funny if the
> > original message's subject had quotes in it...
> 
> Good point.
> 
> >> +       camel_medium_set_header (CAMEL_MEDIUM (receipt), "Return-
> >> Path", "<>");
> >
> > afaict, this is an illegal header.
> 
> So how do you propose I do this (quoting the RFC again):
> 
>     The From field of the message header of the MDN MUST contain the
>     address of the person for whom the message disposition notification
>     is being issued.
> 
>     The envelope sender address (i.e., SMTP MAIL FROM) of the MDN MUST be
>     null (<>), specifying that no Delivery Status Notification messages
>     or other messages indicating successful or unsuccessful delivery are
>     to be sent in response to an MDN.

I missed this in the rfc, so n/m.

Jeff




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]