Class ProhibitRelaying

  • All Implemented Interfaces:
    DataRecipientFilter, FilterBase, FilterType

    public class ProhibitRelaying
    extends StatelessFilterType
    This filter rejects recipient addresses of which remote part is not a local domain (or address literal). It does not rejects the special, global postmaster address.
    • Constructor Detail

      • ProhibitRelaying

        public ProhibitRelaying()
    • Method Detail

      • verifyRecipient

        public FilterReply verifyRecipient​(RecipientContext recipientContext)
                                    throws org.subethamail.smtp.RejectException
        Description copied from interface: FilterBase
        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 an UnknownRecipientDestination; otherwise it will be rejected as an unknown user.
        Specified by:
        verifyRecipient in interface FilterBase
        Overrides:
        verifyRecipient in class StatelessFilterType
        Throws:
        org.subethamail.smtp.RejectException - if the recipient is not valid and it must be rejected
      • addLocalDomainSpecification

        public void addLocalDomainSpecification​(RemotePartSpecification remotePartSpecification)
      • setLocalDomainSpecifications

        public void setLocalDomainSpecifications​(java.util.List<RemotePartSpecification> specifications)