[no subject]



> 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?


> 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)


>> +       /* 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.

>> +       /* 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.


> 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.

?

Bye,
 	Gergo

-- 
    .--= ULLA! =---------------------.   `We are not here to give users what
    \     http://cactus.rulez.org     \   they want'  -- RMS, at GUADEC 2001
     `---= cactus cactus rulez org =---'
Ha kvantum-titkositast hasznalsz, nem ismerheted egyszerre a felhasznaloi nevedet es a jelszavadat.



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