public class Srs
extends Object
Note: sender rewriting is not necessary if the reverse path is local.
Modifier and Type | Field and Description |
---|---|
static java.util.regex.Pattern |
SRS0_PREFIX |
static java.util.regex.Pattern |
SRS1_PREFIX |
Constructor and Description |
---|
Srs() |
Modifier and Type | Method and Description |
---|---|
ReversePath |
forward(ReversePath reversePath,
Recipient originalRecipient)
Returns a reverse path which can be used in the forwarded mail.
|
RemotePart |
getDefaultRemotePart() |
RemotePartSpecification |
getLocalDomains() |
int |
getMaximumAge() |
String |
getSecretKey() |
Recipient |
reverse(Recipient srsRecipient) |
void |
setDefaultRemotePart(RemotePart defaultRemotePart)
Sets the remote part used in the rewritten reverse path for those
recipients whose domain does not appear in the
localDomains
field, but for some reason mails to those domains are accepted. |
void |
setDefaultRemotePart(String defaultRemotePart) |
void |
setLocalDomains(RemotePartSpecification localDomains)
Sets the domains which authorize this server to send mail in their name
using the SPF DNS record.
|
void |
setMaximumAge(int maximumAge) |
void |
setSecretKey(String secretKey)
Sets the secret key as a HEX string.
|
void |
setSecretKeyString(String secretKey)
Sets the secret key by encoding the supplied String with UTF-8 to get the
key bytes.
|
public static final java.util.regex.Pattern SRS0_PREFIX
public static final java.util.regex.Pattern SRS1_PREFIX
public ReversePath forward(ReversePath reversePath, Recipient originalRecipient)
reversePath
- the reversePath which with our server received the mail to be
forwardedoriginalRecipient
- the mail was received for this recipient, which recipient
address is configured to forward mail to another address.public Recipient reverse(Recipient srsRecipient) throws InvalidSrsException
InvalidSrsException
public RemotePartSpecification getLocalDomains()
public void setLocalDomains(RemotePartSpecification localDomains)
public RemotePart getDefaultRemotePart()
public void setDefaultRemotePart(RemotePart defaultRemotePart)
localDomains
field, but for some reason mails to those domains are accepted. For
example mail sent to the global Postmaster address has no domain at all.public void setDefaultRemotePart(String defaultRemotePart)
public String getSecretKey()
public void setSecretKey(String secretKey)
public void setSecretKeyString(String secretKey)
public void setMaximumAge(int maximumAge)
public int getMaximumAge()