public abstract class AbstractFilter extends Object implements Filter
Modifier and Type | Field and Description |
---|---|
protected FilterChain |
chain |
protected MailTransaction |
mailTransaction |
Constructor and Description |
---|
AbstractFilter(MailTransaction mailTransaction) |
Modifier and Type | Method and Description |
---|---|
void |
begin() |
void |
data(MailData data) |
void |
done()
it is always called, even if some other filter failed or no mail was
delivered in this mail transaction
|
void |
from(ReversePath from) |
void |
recipient(RecipientContext recipientContext)
Processes an accepted recipient.
|
void |
setChain(FilterChain chain)
an implementation must store the supplied view to the next filter in the
chain.
|
FilterReply |
verifyRecipient(RecipientContext recipientContext)
Decides if a recipient should be accepted.
|
protected final MailTransaction mailTransaction
protected FilterChain chain
public AbstractFilter(MailTransaction mailTransaction)
public void setChain(FilterChain chain)
Filter
FilterChain
must call the latter method.public void begin()
begin
in interface FilterBase
public void from(ReversePath from) throws RejectExceptionExt
from
in interface FilterBase
RejectExceptionExt
public FilterReply verifyRecipient(RecipientContext recipientContext) throws RejectExceptionExt
FilterBase
UnknownRecipientDestination
; otherwise it will be rejected as an
unknown user.verifyRecipient
in interface FilterBase
RejectExceptionExt
public void recipient(RecipientContext recipientContext) throws RejectExceptionExt
FilterBase
FilterBase.verifyRecipient(mireka.filter.RecipientContext)
.recipient
in interface FilterBase
RejectExceptionExt
public void data(MailData data) throws RejectExceptionExt, org.subethamail.smtp.TooMuchDataException, java.io.IOException
data
in interface FilterBase
RejectExceptionExt
org.subethamail.smtp.TooMuchDataException
java.io.IOException
public void done()
FilterBase
done
in interface FilterBase