You are viewing a plain text version of this content. The canonical link for it is here.
Posted to mime4j-dev@james.apache.org by "Ioan Eugen Stan (JIRA)" <mi...@james.apache.org> on 2014/09/01 10:53:21 UTC

[jira] [Closed] (MIME4J-242) Patch MboxIterator to support From Lines without '@'

     [ https://issues.apache.org/jira/browse/MIME4J-242?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ioan Eugen Stan closed MIME4J-242.
----------------------------------
    Resolution: Fixed

I added the second From line matcher with name DEFAULT2

> Patch MboxIterator to support From Lines without '@'
> ----------------------------------------------------
>
>                 Key: MIME4J-242
>                 URL: https://issues.apache.org/jira/browse/MIME4J-242
>             Project: James Mime4j
>          Issue Type: Improvement
>    Affects Versions: 0.8.0
>            Reporter: Ioan Eugen Stan
>            Assignee: Ioan Eugen Stan
>             Fix For: 0.8.0
>
>         Attachments: mime4j-from-line-patch.txt
>
>
> Submitted  via email by Wolfgang Fahl:
> http://markmail.org/message/frtqsotb2vsc7sfl?q=mime4j+patch+included
> please find attached a patch.
> it uses the following fromline pattern:
> static final String DEFAULT = "^From \\S+.*\\d{4}$";
> so that it matches more lines.
> 1. From ieugen@apache.org Fri Sep 09 14:04:52 2011
> 2. From MAILER-DAEMON Wed Oct 05 21:54:09 2011
> 3. From - Wed Apr 02 06:51:08 2014
> so looking for an "@" sign is not enforced any more.
> The patch fixes a typo:
> -    private Matcher fromLineMathcer;
> +    private Matcher fromLineMatcher;
> in many places of the source code.
> It adds a reference to the original mbox File so that the error message:
> +                 if (mbox!=null)
> +                       path=mbox.getPath();
> +            throw new IllegalArgumentException("File "+path+" does not
> contain From_ lines that match the pattern
> '"+MESSAGE_START.pattern()+"'! Maybe not be a valid Mbox.");
> can be improved.
> Who is going to check this patch and what needs to be done to get it
> into the official repo?
> I would also like to add more test cases and especially include some
> dummy mboxes. And as mentioned I'd like to check the iterator against
> all my Thunderbird mboxes to check
> whether it will successfully parse them all. Also I am offering to write
> a few "tutorial lines". Where would I have to put these?



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)