\doxysection{Milter.\+Milter Class Reference}
\label{classMilter_1_1Milter}\index{Milter.Milter@{Milter.Milter}}


A logging but otherwise do nothing \doxyref{Milter}{p.}{classMilter_1_1Milter} base class.  


Inheritance diagram for Milter.\+Milter\+:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[height=3.000000cm]{classMilter_1_1Milter}
\end{center}
\end{figure}
\doxysubsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\mbox{\label{classMilter_1_1Milter_a3fbcbe392ac58d9af07ab87d47d990a9}} 
def \textbf{ log} (self, $\ast$msg)
\begin{DoxyCompactList}\small\item\em Provide simple logging to sys.\+stdout. \end{DoxyCompactList}\item 
def \textbf{ connect} (self, hostname, family, hostaddr)
\begin{DoxyCompactList}\small\item\em Called for each connection to the MTA. \end{DoxyCompactList}\item 
def \textbf{ hello} (self, hostname)
\begin{DoxyCompactList}\small\item\em Called when the SMTP client says HELO. \end{DoxyCompactList}\item 
def \textbf{ envfrom} (self, f, $\ast$str)
\item 
def \textbf{ envrcpt} (self, to, $\ast$str)
\begin{DoxyCompactList}\small\item\em Called when the SMTP client says RCPT TO. \end{DoxyCompactList}\item 
def \textbf{ header} (self, field, value)
\begin{DoxyCompactList}\small\item\em Called for each header field in the message body. \end{DoxyCompactList}\item 
\mbox{\label{classMilter_1_1Milter_a5f9e083949e90ca666294add4ebc1d6b}} 
def \textbf{ eoh} (self)
\begin{DoxyCompactList}\small\item\em Called at the blank line that terminates the header fields. \end{DoxyCompactList}\item 
def \textbf{ eom} (self)
\begin{DoxyCompactList}\small\item\em Called at the end of the message body. \end{DoxyCompactList}\item 
def \textbf{ abort} (self)
\begin{DoxyCompactList}\small\item\em Called when the connection is abnormally terminated. \end{DoxyCompactList}\item 
\mbox{\label{classMilter_1_1Milter_a39cdbd8cec04460b1ce0fe9f997c6496}} 
def \textbf{ close} (self)
\begin{DoxyCompactList}\small\item\em Called when the connection is closed. \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsection*{Additional Inherited Members}


\doxysubsection{Detailed Description}
A logging but otherwise do nothing \doxyref{Milter}{p.}{classMilter_1_1Milter} base class. 

This is included for compatibility with previous versions of pymilter. The logging callbacks are marked @noreply. 

\doxysubsection{Member Function Documentation}
\mbox{\label{classMilter_1_1Milter_a34f37d5fbc5d9408b6d5bed9d1c75997}} 
\index{Milter.Milter@{Milter.Milter}!abort@{abort}}
\index{abort@{abort}!Milter.Milter@{Milter.Milter}}
\doxysubsubsection{abort()}
{\footnotesize\ttfamily def Milter.\+Milter.\+abort (\begin{DoxyParamCaption}\item[{}]{self }\end{DoxyParamCaption})}



Called when the connection is abnormally terminated. 

The close callback is still called also. 

Reimplemented from \textbf{ Milter.\+Base} \doxyref{}{p.}{classMilter_1_1Base_aef01a2465e563ad1435030cfc9b30939}.



References Milter.\+Base.\+log(), Milter.\+Milter.\+log(), and Milter.\+test.\+Test\+Base.\+log().

\mbox{\label{classMilter_1_1Milter_a4de2609d8b878444747f61fe37e0ffd5}} 
\index{Milter.Milter@{Milter.Milter}!connect@{connect}}
\index{connect@{connect}!Milter.Milter@{Milter.Milter}}
\doxysubsubsection{connect()}
{\footnotesize\ttfamily def Milter.\+Milter.\+connect (\begin{DoxyParamCaption}\item[{}]{self,  }\item[{}]{hostname,  }\item[{}]{family,  }\item[{}]{hostaddr }\end{DoxyParamCaption})}



Called for each connection to the MTA. 

Called by the {\texttt{ xxfi\+\_\+connect}} callback. ~\newline
 The {\ttfamily hostname} provided by the local MTA is either the PTR name or the IP in the form \char`\"{}[1.\+2.\+3.\+4]\char`\"{} if no PTR is available. The format of hostaddr depends on the socket family\+: 
\begin{DoxyDescription}
\item[{\ttfamily socket.\+AF\+\_\+\+INET} ]A tuple of (IP as string in dotted quad form, integer port) 
\item[{\ttfamily socket.\+AF\+\_\+\+INET6} ]A tuple of (IP as a string in standard representation, integer port, integer flow info, integer scope id) 
\item[{\ttfamily socket.\+AF\+\_\+\+UNIX} ]A string with the socketname 
\end{DoxyDescription}To vary behavior based on what port the client connected to, for example skipping blacklist checks for port 587 (which must be authenticated), use \doxyref{getsymval(\textquotesingle{}\{daemon\+\_\+port\}\textquotesingle{}) }{p.}{classMilter_1_1Base_ac5b454b632d5fe6a5f1157e44ec70920}. The {\ttfamily \{daemon\+\_\+port\}} macro must be enabled in sendmail.\+cf 
\begin{DoxyPre}
 O Milter.macros.connect=j, \_, \{daemon\_name\}, \{daemon\_port\}, \{if\_name\}, \{if\_addr\}
 \end{DoxyPre}
 or sendmail.\+mc 
\begin{DoxyPre}
 define(`confMILTER\_MACROS\_CONNECT', ``j, \_, \{daemon\_name\}, \{daemon\_port\}, \{if\_name\}, \{if\_addr\}'')dnl
 \end{DoxyPre}
 
\begin{DoxyParams}{Parameters}
{\em hostname} & the PTR name or bracketed IP of the SMTP client \\
\hline
{\em family} & {\ttfamily socket.\+AF\+\_\+\+INET}, {\ttfamily socket.\+AF\+\_\+\+INET6}, or {\ttfamily socket.\+AF\+\_\+\+UNIX} \\
\hline
{\em hostaddr} & a tuple or string with peer IP or socketname \\
\hline
\end{DoxyParams}


Reimplemented from \textbf{ Milter.\+Base} \doxyref{}{p.}{classMilter_1_1Base_a6f851a653da04dde2a2f3bf115b8e279}.



References Milter.\+Base.\+log(), Milter.\+Milter.\+log(), and Milter.\+test.\+Test\+Base.\+log().

\mbox{\label{classMilter_1_1Milter_ab0eec02d1ffefbecc0d2455362e8f500}} 
\index{Milter.Milter@{Milter.Milter}!envfrom@{envfrom}}
\index{envfrom@{envfrom}!Milter.Milter@{Milter.Milter}}
\doxysubsubsection{envfrom()}
{\footnotesize\ttfamily def Milter.\+Milter.\+envfrom (\begin{DoxyParamCaption}\item[{}]{self,  }\item[{}]{f,  }\item[{$\ast$}]{str }\end{DoxyParamCaption})}

\begin{DoxyVerb}Called to begin each message.
f -> string             message sender
str -> tuple    additional ESMTP parameters
\end{DoxyVerb}
 

Reimplemented from \textbf{ Milter.\+Base} \doxyref{}{p.}{classMilter_1_1Base_a3d6e5676f4bc54069c996f404d474f41}.



References Milter.\+Base.\+log(), Milter.\+Milter.\+log(), and Milter.\+test.\+Test\+Base.\+log().



Referenced by Milter.\+Base.\+envfrom\+\_\+bytes(), and Milter.\+test.\+Test\+Base.\+feed\+File().

\mbox{\label{classMilter_1_1Milter_acb95c2adec7be908c5a8d8471ad4a66b}} 
\index{Milter.Milter@{Milter.Milter}!envrcpt@{envrcpt}}
\index{envrcpt@{envrcpt}!Milter.Milter@{Milter.Milter}}
\doxysubsubsection{envrcpt()}
{\footnotesize\ttfamily def Milter.\+Milter.\+envrcpt (\begin{DoxyParamCaption}\item[{}]{self,  }\item[{}]{to,  }\item[{$\ast$}]{str }\end{DoxyParamCaption})}



Called when the SMTP client says RCPT TO. 

Called by the {\texttt{ xxfi\+\_\+envrcpt}} callback. Returning REJECT rejects the current recipient, not the entire message. The recipient is the \char`\"{}envelope\char`\"{} recipient as defined by {\texttt{ RFC 5321}}. For recipients defined in {\texttt{ RFC 5322}}, for example To\+: or Cc\+:, see \doxyref{the header callback }{p.}{classMilter_1_1Milter_a3ef4af127a63a443f5d7397983bb2055}. 

Reimplemented from \textbf{ Milter.\+Base} \doxyref{}{p.}{classMilter_1_1Base_a16118f646296c8b2685077a18bdf4b3b}.



References Milter.\+Base.\+log(), Milter.\+Milter.\+log(), and Milter.\+test.\+Test\+Base.\+log().



Referenced by Milter.\+Base.\+envrcpt\+\_\+bytes(), and Milter.\+test.\+Test\+Base.\+feed\+File().

\mbox{\label{classMilter_1_1Milter_aa4d8694a29ce27828fa10f3633911099}} 
\index{Milter.Milter@{Milter.Milter}!eom@{eom}}
\index{eom@{eom}!Milter.Milter@{Milter.Milter}}
\doxysubsubsection{eom()}
{\footnotesize\ttfamily def Milter.\+Milter.\+eom (\begin{DoxyParamCaption}\item[{}]{self }\end{DoxyParamCaption})}



Called at the end of the message body. 

Most of the message manipulation actions can only take place from the eom callback. 

Reimplemented from \textbf{ Milter.\+Base} \doxyref{}{p.}{classMilter_1_1Base_a725f845830639b76f479dc6c0f7f8c00}.



References Milter.\+Base.\+log(), Milter.\+Milter.\+log(), and Milter.\+test.\+Test\+Base.\+log().



Referenced by Milter.\+test.\+Test\+Base.\+feed\+File().

\mbox{\label{classMilter_1_1Milter_a3ef4af127a63a443f5d7397983bb2055}} 
\index{Milter.Milter@{Milter.Milter}!header@{header}}
\index{header@{header}!Milter.Milter@{Milter.Milter}}
\doxysubsubsection{header()}
{\footnotesize\ttfamily def Milter.\+Milter.\+header (\begin{DoxyParamCaption}\item[{}]{self,  }\item[{}]{field,  }\item[{}]{value }\end{DoxyParamCaption})}



Called for each header field in the message body. 


\begin{DoxyParams}{Parameters}
{\em field} & name decoded as ascii \\
\hline
{\em value} & field value decoded as utf-\/8 on python3 \\
\hline
\end{DoxyParams}


Reimplemented from \textbf{ Milter.\+Base} \doxyref{}{p.}{classMilter_1_1Base_a22df44f0417b6a538c80e709b5dbd9bb}.



References Milter.\+Base.\+log(), Milter.\+Milter.\+log(), and Milter.\+test.\+Test\+Base.\+log().



Referenced by Milter.\+Base.\+header\+\_\+bytes().

\mbox{\label{classMilter_1_1Milter_a9df63efd8b44bd18246e337f693366a3}} 
\index{Milter.Milter@{Milter.Milter}!hello@{hello}}
\index{hello@{hello}!Milter.Milter@{Milter.Milter}}
\doxysubsubsection{hello()}
{\footnotesize\ttfamily def Milter.\+Milter.\+hello (\begin{DoxyParamCaption}\item[{}]{self,  }\item[{}]{hostname }\end{DoxyParamCaption})}



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 \textbf{ Milter.\+Base} \doxyref{}{p.}{classMilter_1_1Base_a5aa99b34a5b4a9cd220fd4d936bfb43b}.



References Milter.\+Base.\+log(), Milter.\+Milter.\+log(), and Milter.\+test.\+Test\+Base.\+log().



Referenced by Milter.\+test.\+Test\+Base.\+connect().



The documentation for this class was generated from the following file\+:\begin{DoxyCompactItemize}
\item 
Milter/\+\_\+\+\_\+init\+\_\+\+\_\+.\+py\end{DoxyCompactItemize}
