public interface JilterHandler
Modifier and Type | Field and Description |
---|---|
static int |
PROCESS_BODY
Flag for
getSupportedProcesses to indicate
that body is supported. |
static int |
PROCESS_CONNECT
Flag for
getSupportedProcesses to indicate
that connect is supported. |
static int |
PROCESS_ENVFROM
Flag for
getSupportedProcesses to indicate
that envfrom is supported. |
static int |
PROCESS_ENVRCPT
Flag for
getSupportedProcesses to indicate
that envrcpt(java.lang.String[], java.util.Properties) is supported. |
static int |
PROCESS_HEADER
Flag for
getSupportedProcesses to indicate
that header is supported. |
static int |
PROCESS_HELO
Flag for
getSupportedProcesses to indicate
that helo is supported. |
static int |
SMFIF_ADDHDRS
Flag for
getRequiredModifications to
indicate that headers may be added. |
static int |
SMFIF_ADDRCPT
Flag for
getRequiredModifications to
indicate that recipients may be added. |
static int |
SMFIF_CHGBODY
Flag for
getRequiredModifications to
indicate that the body may be changed. |
static int |
SMFIF_CHGHDRS
Flag for
getRequiredModifications to
indicate that headers may be changed or deleted. |
static int |
SMFIF_DELRCPT
Flag for
getRequiredModifications to
indicate that recipients may be deleted. |
static int |
SMFIF_MODBODY
Flag for
getRequiredModifications to
indicate that headers may be added. |
static int |
SMFIF_NONE
Flag for
getRequiredModifications to
indicate that no modifications will be made. |
Modifier and Type | Method and Description |
---|---|
JilterStatus |
abort()
Handle the current message being aborted.
|
JilterStatus |
body(java.nio.ByteBuffer bodyp)
Handle a piece of a message's body.
|
JilterStatus |
close()
The current connection is being closed.
|
JilterStatus |
connect(java.lang.String hostname,
java.net.InetAddress hostaddr,
java.util.Properties properties)
Called once at the start of each SMTP connection.
|
JilterStatus |
envfrom(java.lang.String[] argv,
java.util.Properties properties)
Handle the envelope FROM command.
|
JilterStatus |
envrcpt(java.lang.String[] argv,
java.util.Properties properties)
Handle the envelope RCPT command.
|
JilterStatus |
eoh()
Handle the end of message headers.
|
JilterStatus |
eom(JilterEOMActions eomActions,
java.util.Properties properties)
End of a message.
|
int |
getRequiredModifications()
Get the list of required modifications needed by this handler.
|
int |
getSupportedProcesses()
Get the list of callbacks implemented by this handler.
|
JilterStatus |
header(java.lang.String headerf,
java.lang.String headerv)
Handle a message header.
|
JilterStatus |
helo(java.lang.String helohost,
java.util.Properties properties)
Handle the HELO/EHLO command.
|
static final int PROCESS_CONNECT
getSupportedProcesses
to indicate
that connect
is supported.static final int PROCESS_HELO
getSupportedProcesses
to indicate
that helo
is supported.static final int PROCESS_ENVFROM
getSupportedProcesses
to indicate
that envfrom
is supported.static final int PROCESS_ENVRCPT
getSupportedProcesses
to indicate
that envrcpt(java.lang.String[], java.util.Properties)
is supported.static final int PROCESS_HEADER
getSupportedProcesses
to indicate
that header
is supported.static final int PROCESS_BODY
getSupportedProcesses
to indicate
that body
is supported.static final int SMFIF_NONE
getRequiredModifications
to
indicate that no modifications will be made.static final int SMFIF_ADDHDRS
getRequiredModifications
to
indicate that headers may be added.static final int SMFIF_CHGBODY
getRequiredModifications
to
indicate that the body may be changed.static final int SMFIF_MODBODY
getRequiredModifications
to
indicate that headers may be added.static final int SMFIF_ADDRCPT
getRequiredModifications
to
indicate that recipients may be added.static final int SMFIF_DELRCPT
getRequiredModifications
to
indicate that recipients may be deleted.static final int SMFIF_CHGHDRS
getRequiredModifications
to
indicate that headers may be changed or deleted.JilterStatus connect(java.lang.String hostname, java.net.InetAddress hostaddr, java.util.Properties properties)
hostname
- The host name of the message sender, as determined by a
reverse lookup on the host address.hostaddr
- The host address, as determined by a
getpeername()
call on the SMTP socket.properties
- Any properties (macros) received from the MTA.SMFIS_
return codes from JilterStatus
.
NOTE: The MTA will currently ignore any custom values
(values other than SMFIS_
values). Specifically,
values created with JilterStatus.makeCustomStatus
will not be honored.JilterStatus helo(java.lang.String helohost, java.util.Properties properties)
helohost
- Value passed to HELO/EHLO command, which should be the domain
name of the sending host (but is, in practice, anything the
sending host wants to send).properties
- Any properties (macros) received from the MTA.SMFIS_
return codes from JilterStatus
.JilterStatus envfrom(java.lang.String[] argv, java.util.Properties properties)
envrcpt
.argv
- An array of SMTP command arguments. argv[0]
is
guaranteed to be the sender address. Later arguments are the
ESMTP arguments.properties
- Any properties (macros) received from the MTA.SMFIS_
return codes from JilterStatus
.JilterStatus envrcpt(java.lang.String[] argv, java.util.Properties properties)
envfrom
.argv
- An array of SMTP command arguments. argv[0]
is
guaranteed to be the recipient address. Later arguments are
the ESMTP arguments.properties
- Any properties (macros) received from the MTA.SMFIS_
return codes from JilterStatus
.JilterStatus header(java.lang.String headerf, java.lang.String headerv)
envrcpt
and eoh
, once per message header.headerf
- Header field name.headerv
- Header field value. The content of the header may include
folded white space (i.e. multiple lines with following white
space). The trailing line terminator (CR/LF) is removed.SMFIS_
return codes from JilterStatus
.JilterStatus eoh()
SMFIS_
return codes from JilterStatus
.JilterStatus body(java.nio.ByteBuffer bodyp)
bodyp
- This block of body data.SMFIS_
return codes from JilterStatus
.JilterStatus eom(JilterEOMActions eomActions, java.util.Properties properties)
body
for a
given message.eomActions
- Interface for effecting message changes.properties
- Any properties (macros) received from the MTA.SMFIS_
return codes from JilterStatus
.JilterStatus abort()
eom
).SMFIS_
return codes from JilterStatus
.JilterStatus close()
SMFIS_
return codes from JilterStatus
.int getSupportedProcesses()
PROCESS_
constants.int getRequiredModifications()
SMFIF_
constants.Copyright © 2021. All Rights Reserved.