// Check if we can index the the address in the right manner
if (field != null) {
try {
// not sure if we really should reparse it. It maybe be better to check just for the right type.
// But this impl was easier in the first place
AddressList aList = AddressList.parse(MimeUtil.unfold(f.getBody()));
for (int i = 0; i < aList.size(); i++) {
Address address = aList.get(i);
if (address instanceof org.apache.james.mime4j.field.address.Mailbox) {
org.apache.james.mime4j.field.address.Mailbox mailbox = (org.apache.james.mime4j.field.address.Mailbox) address;
String value = mailbox.getEncodedString().toUpperCase(Locale.ENGLISH);
doc.add(new Field(field, value, Store.NO, Index.ANALYZED));
if (i == 0) {