From 594d3ad3658e2fcb158f4da5c606e6fa8ab99e6d Mon Sep 17 00:00:00 2001 From: Stuart Gathman Date: Tue, 28 Aug 2012 06:02:36 +0000 Subject: [PATCH] Doc updates. --- Milter/__init__.py | 33 ++++++++++++++++++++++++++++++--- 1 file changed, 30 insertions(+), 3 deletions(-) diff --git a/Milter/__init__.py b/Milter/__init__.py index 8fed7ad..54b23cc 100755 --- a/Milter/__init__.py +++ b/Milter/__init__.py @@ -256,7 +256,9 @@ class Base(object): ## Defined by subclasses to write log messages. def log(self,*msg): pass - ## Called for each connection to the MTA. + ## Called for each connection to the MTA. Called by the + # + # xxfi_connect callback. # 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: @@ -269,6 +271,17 @@ class Base(object): #
socket.AF_UNIX #
A string with the socketname # + # To vary behavior based on what port the client connected to, + # for example skipping blacklist checks for port 587 (which must + # be authenticated), use @link #getsymval getsymval('{daemon_port}') @endlink. + # The {daemon_port} macro must be enabled in sendmail.cf + #
+  # O Milter.macros.connect=j, _, {daemon_name}, {daemon_port}, {if_name}, {if_addr}
+  # 
+ # or sendmail.mc + #
+  # define(`confMILTER_MACROS_CONNECT', ``j, _, {daemon_name}, {daemon_port}, {if_name}, {if_addr}'')dnl
+  # 
# @param hostname the PTR name or bracketed IP of the SMTP client # @param family socket.AF_INET, socket.AF_INET6, # or socket.AF_UNIX @@ -280,12 +293,26 @@ class Base(object): # this almost always results in terminating the connection. @nocallback def hello(self,hostname): return CONTINUE - ## Called when the SMTP client says MAIL FROM. + ## Called when the SMTP client says MAIL FROM. Called by the + # + # xxfi_envfrom callback. # Returning REJECT rejects the message, but not the connection. + # The sender is the "envelope" from as defined by + # RFC 5321. + # For the From: header (author) defined in + # RFC 5322, + # see @link #header the header callback @endlink. @nocallback def envfrom(self,f,*str): return CONTINUE - ## Called when the SMTP client says RCPT TO. + ## Called when the SMTP client says RCPT TO. Called by the + # + # xxfi_envrcpt callback. # Returning REJECT rejects the current recipient, not the entire message. + # The recipient is the "envelope" recipient as defined by + # RFC 5321. + # For recipients defined in + # RFC 5322, + # for example To: or Cc:, see @link #header the header callback @endlink. @nocallback def envrcpt(self,to,*str): return CONTINUE ## Called when the SMTP client says DATA.