FetchedFrom.javaAPI DocApache James 2.3.12244Fri Jan 12 12:56:32 GMT 2007org.apache.james.transport.matchers


public class FetchedFrom extends org.apache.mailet.GenericMatcher
Matches mail with a header set by Fetchpop X-fetched-from
fetchpop sets X-fetched-by to the "name" of the fetchpop fetch task.
This is used to match all mail fetched from a specific pop account. Once the condition is met the header is stripped from the message to prevent looping if the mail is re-inserted into the spool. $Id: 494012 2007-01-08 10:23:58Z norman $

Fields Summary
Constructors Summary
Methods Summary
public java.util.Collectionmatch(org.apache.mailet.Mail mail)

        MimeMessage message = mail.getMessage();
        String fetch = message.getHeader("X-fetched-from", null);
        if (fetch != null && fetch.equals(getCondition())) {
            return mail.getRecipients();
        return null;