|
pymilter
0.9.5
|
A logging but otherwise do nothing Milter base class. More...
Public Member Functions | |
| def | log |
| Provide simple logging to sys.stdout. | |
| def | connect |
| Called for each connection to the MTA. | |
| def | hello |
| Called when the SMTP client says HELO. | |
| def | envfrom |
| def | envrcpt |
| Called when the SMTP client says RCPT TO. | |
| def | header |
| Called for each header field in the message body. | |
| def | eoh |
| Called at the blank line that terminates the header fields. | |
| def | eom |
| Called at the end of the message body. | |
| def | abort |
| Called when the connection is abnormally terminated. | |
| def | close |
| Called when the connection is closed. | |
A logging but otherwise do nothing Milter base class.
This is included for compatibility with previous versions of pymilter. The logging callbacks are marked @noreply.
| def Milter.Milter.abort | ( | self | ) |
Called when the connection is abnormally terminated.
The close callback is still called also.
Reimplemented from Milter.Base.
| def Milter.Milter.close | ( | self | ) |
Called when the connection is closed.
Reimplemented from Milter.Base.
| def Milter.Milter.connect | ( | self, | |
| hostname, | |||
| family, | |||
| hostaddr | |||
| ) |
Called for each connection to the MTA.
The hostname provided by the local MTA is either the PTR name or the IP in the form "[1.2.3.4]" if no PTR is available. The format of hostaddr depends on the socket family:
socket.AF_INET socket.AF_INET6 socket.AF_UNIX | hostname | the PTR name or bracketed IP of the SMTP client |
| family | socket.AF_INET, socket.AF_INET6, or socket.AF_UNIX |
| hostaddr | a tuple or string with peer IP or socketname |
Reimplemented from Milter.Base.
| def Milter.Milter.envfrom | ( | self, | |
| f, | |||
| str | |||
| ) |
Called to begin each message. f -> string message sender str -> tuple additional ESMTP parameters
Reimplemented from Milter.Base.
| def Milter.Milter.envrcpt | ( | self, | |
| to, | |||
| str | |||
| ) |
Called when the SMTP client says RCPT TO.
Returning REJECT rejects the current recipient, not the entire message.
Reimplemented from Milter.Base.
| def Milter.Milter.eoh | ( | self | ) |
Called at the blank line that terminates the header fields.
Reimplemented from Milter.Base.
| def Milter.Milter.eom | ( | self | ) |
Called at the end of the message body.
Most of the message manipulation actions can only take place from the eom callback.
Reimplemented from Milter.Base.
| def Milter.Milter.header | ( | self, | |
| field, | |||
| value | |||
| ) |
Called for each header field in the message body.
Reimplemented from Milter.Base.
| def Milter.Milter.hello | ( | self, | |
| hostname | |||
| ) |
Called when the SMTP client says HELO.
Returning REJECT prevents progress until a valid HELO is provided; this almost always results in terminating the connection.
Reimplemented from Milter.Base.
1.7.6.1