I've been looking at the mail to secretary@ that caused a problem recently.

I think the issue may be that the headers are not all ASCII, there are
a couple of o-umlauts.
If these are replaced with plain 'o's then the headers are parsed OK.

This causes message.rb to crash in the rescue block

@335: from = mail[:from].value.sub(/\s+<.*?>$/)

because mail[:from] is nil.

That could be avoided by using .to_s rather than .value, but that
causes the headers to be saved as a single blob with the key of the
first header.

A possible solution might be to trap all errors and set some dummy
values for the Yaml file
This would at least allow the user to be alerted to the issue.

But ideally the parser should be persuaded to handle non-ASCII header values.
They are not allowed, but they seem to be quite common.

Reply via email to