Class ServerRcpt
java.lang.Object
com.mimecast.robin.smtp.extension.server.ServerProcessor
com.mimecast.robin.smtp.extension.server.ServerMail
com.mimecast.robin.smtp.extension.server.ServerRcpt
RCPT extension processor.
-
Field Summary
FieldsFields inherited from class com.mimecast.robin.smtp.extension.server.ServerMail
addressFields inherited from class com.mimecast.robin.smtp.extension.server.ServerProcessor
connection, log, verb -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate voidcheckBotAddress(Connection connection) Checks if the recipient address matches any bot patterns and records matches.private ProxyEmailDeliveryestablishProxyConnection(Connection connection, ProxyRule rule) Establishes a new proxy connection.javax.mail.internet.InternetAddressGets RCPT TO address.private StringgetMailFrom(Connection connection) Gets MAIL FROM address from the current envelope.private booleanhandleProxyRecipient(Connection connection, ProxyRule rule) Handles a recipient that matches a proxy rule.booleanprocess(Connection connection, Verb verb) RCPT processor.setRecipientsLimit(int limit) Sets recipients limit.Methods inherited from class com.mimecast.robin.smtp.extension.server.ServerMail
getAdvert, getBody, getEnvId, getNotify, getORcpt, getRet, getSize, setEnvelopeLimit
-
Field Details
-
recipientsLimit
private int recipientsLimitRecipients limit.
-
-
Constructor Details
-
ServerRcpt
public ServerRcpt()
-
-
Method Details
-
process
RCPT processor.- Overrides:
processin classServerMail- Parameters:
connection- Connection instance.verb- Verb instance.- Returns:
- Boolean.
- Throws:
IOException- Unable to communicate.
-
getMailFrom
Gets MAIL FROM address from the current envelope.Helper method to avoid code duplication in proxy and blackhole checks.
- Parameters:
connection- Connection instance.- Returns:
- MAIL FROM address or null if no envelope exists.
-
handleProxyRecipient
Handles a recipient that matches a proxy rule.- Parameters:
connection- Connection instance.rule- Proxy rule that matched.- Returns:
- Boolean indicating success.
- Throws:
IOException- Unable to communicate.
-
establishProxyConnection
Establishes a new proxy connection.- Parameters:
connection- Connection instance.rule- Proxy rule.- Returns:
- ProxyEmailDelivery instance.
-
setRecipientsLimit
Sets recipients limit.- Parameters:
limit- Limit value.- Returns:
- ServerMail instance.
-
checkBotAddress
Checks if the recipient address matches any bot patterns and records matches.Bot addresses are matched against configured patterns with domain and IP restrictions.
If a match is found, the bot address and bot name are recorded in the envelope.
- Parameters:
connection- Connection instance.- Throws:
IOException- RCPT address parsing problem.
-
getAddress
Gets RCPT TO address.- Overrides:
getAddressin classServerMail- Returns:
- Address instance.
- Throws:
IOException- RCPT address parsing problem.
-