* @param recipient the recipient to check
*/
protected long getUsed(MailAddress recipient, Mail _) throws MessagingException {
long size = 0;
MailRepository userInbox = mailServer.getUserInbox(getPrimaryName(recipient.getUser()));
for (Iterator it = userInbox.list(); it.hasNext(); ) {
String key = (String) it.next();
MailImpl mc = userInbox.retrieve(key);
// Retrieve can return null if the mail is no longer in the store.
if (mc != null) try {
size += mc.getMessageSize();