Package mireka.filter
Interface FilterBase
-
- All Known Subinterfaces:
DataRecipientFilter,Filter
- All Known Implementing Classes:
AbstractDataRecipientFilter,AbstractFilter,AcceptAllRecipient,AcceptDomainPostmaster,AcceptGlobalPostmaster,AcceptPostmaster,AcceptRecipient,DataRecipientFilterAdapter,ProhibitRelaying,RedirectPostmasterMail,RefuseUnknownRecipient,SavePostmasterMail,StatelessFilterType,StopLoop
public interface FilterBaseA filter processes mails, its functions are called in the different phases of the SMTP mail transaction.Note: Don't implement this interface directly, use the descendant interfaces and the implementing abstract classes
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidbegin()voiddata(MailData data)voiddone()it is always called, even if some other filter failed or no mail was delivered in this mail transactionvoidfrom(ReversePath from)voidrecipient(RecipientContext recipientContext)Processes an accepted recipient.FilterReplyverifyRecipient(RecipientContext recipientContext)Decides if a recipient should be accepted.
-
-
-
Method Detail
-
begin
void begin()
-
from
void from(ReversePath from) throws RejectExceptionExt
- Throws:
RejectExceptionExt
-
verifyRecipient
FilterReply verifyRecipient(RecipientContext recipientContext) throws RejectExceptionExt
Decides if a recipient should be accepted. The decision can be a final positive, a final negative, or a neutral answer. This function is not called if a previous filter has already accepted or rejected the recipient. In case of a neutral answer, other filters will decide. If all filters return the neutral answer, then the recipient will be accepted if a destination is assigned to it and the assigned destination is not anUnknownRecipientDestination; otherwise it will be rejected as an unknown user.- Throws:
org.subethamail.smtp.RejectException- if the recipient is not valid and it must be rejectedRejectExceptionExt
-
recipient
void recipient(RecipientContext recipientContext) throws RejectExceptionExt
Processes an accepted recipient. It is only called if one of the filters accepted the recipient inverifyRecipient(mireka.filter.RecipientContext).- Throws:
RejectExceptionExt
-
data
void data(MailData data) throws RejectExceptionExt, org.subethamail.smtp.TooMuchDataException, java.io.IOException
- Throws:
RejectExceptionExtorg.subethamail.smtp.TooMuchDataExceptionjava.io.IOException
-
done
void done()
it is always called, even if some other filter failed or no mail was delivered in this mail transaction
-
-