james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robert Burrell Donkin" <robertburrelldon...@gmail.com>
Subject Re: [jira] Commented: (JSIEVE-6) There is a bug while processing email addresses in Address class
Date Fri, 10 Aug 2007 15:28:02 GMT
On 8/10/07, Stefano Bagnara <apache@bago.org> wrote:
> Robert Burrell Donkin (JIRA) ha scritto:
> >     [ https://issues.apache.org/jira/browse/JSIEVE-6?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12518975
]
> >
> > Robert Burrell Donkin commented on JSIEVE-6:
> > --------------------------------------------
> >
> > There is also the design issue of where the address list parsing should be done.
> >
> > Adding a getAddresses(headerName) method to MailAdapter may allow the adapter to
perform the parsing. The adapter may be able to optimise this or may be able to perform more
intelligently parsing. However, this is at the cost of a wider API. Implementing in Address
would have the advantage that it would only need to be done correctly in one place.
>
> I'm slightly on the MailAdapter.getAddresses side.
>
> If I understand it correctly this way we don't have to add the parsing
> to the jSieve core and we could use mime4j on the james adapter side to
> support this feature. (maybe this also means that it would be better to
> move the james adapter to the james server source tree ?)

this does seem best

MimeMessage contains address parsing code for the common headers. IMHO
it would be acceptable for implementations to offer a service limited
to common address headers anyway. the implementations in jsieve have
access to a MimeMessage representation. the JAMES version could offer
a more comprehensive service using Mime4J.

but what to do when the address cannot be parsed? i favour logging and
returning an empty list.

- robert

---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org


Mime
View raw message