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


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


Inheritance diagram for Milter.\+Milter\+:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[height=3.000000cm]{classMilter_1_1Milter}
\end{center}
\end{figure}
\doxysubsubsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\textbf{ log} (self, $\ast$msg)
\begin{DoxyCompactList}\small\item\em Provide simple logging to sys.\+stdout. \end{DoxyCompactList}\item 
\textbf{ connect} (self, hostname, family, hostaddr)
\begin{DoxyCompactList}\small\item\em Called for each connection to the MTA. \end{DoxyCompactList}\item 
\textbf{ hello} (self, hostname)
\begin{DoxyCompactList}\small\item\em Called when the SMTP client says HELO. \end{DoxyCompactList}\item 
\textbf{ envfrom} (self, f, $\ast$str)
\item 
\textbf{ envrcpt} (self, to, $\ast$str)
\begin{DoxyCompactList}\small\item\em Called when the SMTP client says RCPT TO. \end{DoxyCompactList}\item 
\textbf{ header} (self, field, value)
\begin{DoxyCompactList}\small\item\em Called for each header field in the message body. \end{DoxyCompactList}\item 
\textbf{ eoh} (self)
\begin{DoxyCompactList}\small\item\em Called at the blank line that terminates the header fields. \end{DoxyCompactList}\item 
\textbf{ eom} (self)
\begin{DoxyCompactList}\small\item\em Called at the end of the message body. \end{DoxyCompactList}\item 
\textbf{ abort} (self)
\begin{DoxyCompactList}\small\item\em Called when the connection is abnormally terminated. \end{DoxyCompactList}\item 
\textbf{ close} (self)
\begin{DoxyCompactList}\small\item\em Called when the connection is closed. \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsection*{Public Member Functions inherited from \textbf{ Milter.\+Base}}
\begin{DoxyCompactItemize}
\item 
\textbf{ envfrom\+\_\+bytes} (self, $\ast$b)
\begin{DoxyCompactList}\small\item\em Called with bytes by default global envfrom callback. \end{DoxyCompactList}\item 
\textbf{ envrcpt\+\_\+bytes} (self, $\ast$b)
\begin{DoxyCompactList}\small\item\em Called with bytes by default global envrcpt callback. \end{DoxyCompactList}\item 
\textbf{ data} (self)
\begin{DoxyCompactList}\small\item\em Called when the SMTP client says DATA. \end{DoxyCompactList}\item 
\textbf{ header\+\_\+bytes} (self, fld, val)
\begin{DoxyCompactList}\small\item\em Called with bytes by default global header callback. \end{DoxyCompactList}\item 
\textbf{ body} (self, blk)
\begin{DoxyCompactList}\small\item\em Called to supply the body of the message to the \doxyref{Milter}{p.}{namespaceMilter} by chunks. \end{DoxyCompactList}\item 
\textbf{ unknown} (self, cmd)
\begin{DoxyCompactList}\small\item\em Called when the SMTP client issues an unknown command. \end{DoxyCompactList}\item 
\textbf{ protocol\+\_\+mask} (klass)
\begin{DoxyCompactList}\small\item\em Return mask of SMFIP\+\_\+\+N$\ast$ protocol option bits to clear for this class The @nocallback and @noreply decorators set the {\ttfamily milter\+\_\+protocol} function attribute to the protocol mask bit to pass to libmilter, causing that callback or its reply to be skipped. \end{DoxyCompactList}\item 
\textbf{ negotiate} (self, opts)
\begin{DoxyCompactList}\small\item\em Negotiate milter protocol options. \end{DoxyCompactList}\item 
\textbf{ getsymval} (self, sym)
\begin{DoxyCompactList}\small\item\em Return the value of an MTA macro. \end{DoxyCompactList}\item 
\textbf{ setreply} (self, rcode, xcode=None, msg=None, $\ast$ml)
\begin{DoxyCompactList}\small\item\em Set the SMTP reply code and message. \end{DoxyCompactList}\item 
\textbf{ setsymlist} (self, stage, $\ast$macros)
\begin{DoxyCompactList}\small\item\em Tell the MTA which macro names will be used. \end{DoxyCompactList}\item 
\textbf{ addheader} (self, field, value, idx=-\/1)
\begin{DoxyCompactList}\small\item\em Add a mail header field. \end{DoxyCompactList}\item 
\textbf{ chgheader} (self, field, idx, value)
\begin{DoxyCompactList}\small\item\em Change the value of a mail header field. \end{DoxyCompactList}\item 
\textbf{ addrcpt} (self, rcpt, params=None)
\begin{DoxyCompactList}\small\item\em Add a recipient to the message. \end{DoxyCompactList}\item 
\textbf{ delrcpt} (self, rcpt)
\begin{DoxyCompactList}\small\item\em Delete a recipient from the message. \end{DoxyCompactList}\item 
\textbf{ replacebody} (self, \textbf{ body})
\begin{DoxyCompactList}\small\item\em Replace the message body. \end{DoxyCompactList}\item 
\textbf{ chgfrom} (self, sender, params=None)
\begin{DoxyCompactList}\small\item\em Change the SMTP envelope sender address. \end{DoxyCompactList}\item 
\textbf{ quarantine} (self, reason)
\begin{DoxyCompactList}\small\item\em Quarantine the message. \end{DoxyCompactList}\item 
\textbf{ progress} (self)
\begin{DoxyCompactList}\small\item\em Tell the MTA to wait a bit longer. \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsubsection*{Additional Inherited Members}
\doxysubsection*{Public Attributes inherited from \textbf{ Milter.\+Base}}
\begin{DoxyCompactItemize}
\item 
{\bfseries header\+\_\+bytes}
\end{DoxyCompactItemize}
\doxysubsection*{Protected Member Functions inherited from \textbf{ Milter.\+Base}}
\begin{DoxyCompactItemize}
\item 
{\bfseries \+\_\+setctx} (self, ctx)
\begin{DoxyCompactList}\small\item\em Attach this \doxyref{Milter}{p.}{namespaceMilter} to the low level \doxyref{milter.\+milter\+Context}{p.}{classmilter_1_1milterContext} object. \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsection*{Protected Attributes inherited from \textbf{ Milter.\+Base}}
\begin{DoxyCompactItemize}
\item 
{\bfseries \+\_\+ctx}
\begin{DoxyCompactList}\small\item\em The low level \doxyref{milter.\+milter\+Context}{p.}{classmilter_1_1milterContext} object. \end{DoxyCompactList}\item 
\textbf{ \+\_\+actions}
\begin{DoxyCompactList}\small\item\em A bitmask of actions this connection has negotiated to use. \end{DoxyCompactList}\item 
\textbf{ \+\_\+protocol}
\begin{DoxyCompactList}\small\item\em A bitmask of protocol options this connection has negotiated. \end{DoxyCompactList}\end{DoxyCompactItemize}


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

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

\doxysubsection{Member Function Documentation}
\label{classMilter_1_1Milter_a3e79621ce95c568d96b2d0a2f069a7dc} 
\index{Milter.Milter@{Milter.Milter}!abort@{abort}}
\index{abort@{abort}!Milter.Milter@{Milter.Milter}}
\doxysubsubsection{abort()}
{\footnotesize\ttfamily 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_aab89532d73c7885543bd45dccc986f6e}.



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

\label{classMilter_1_1Milter_a3dc0fcc9714f70f08c9aad9ce3a5641d} 
\index{Milter.Milter@{Milter.Milter}!close@{close}}
\index{close@{close}!Milter.Milter@{Milter.Milter}}
\doxysubsubsection{close()}
{\footnotesize\ttfamily Milter.\+Milter.\+close (\begin{DoxyParamCaption}\item[{}]{self }\end{DoxyParamCaption})}



Called when the connection is closed. 



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



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



Referenced by \textbf{ Milter.\+test.\+Test\+Base.\+connect()}, and \textbf{ Milter.\+test.\+Test\+Base.\+feed\+File()}.

\label{classMilter_1_1Milter_a3cc2e8d93c9a588a884f4cbe9a484511} 
\index{Milter.Milter@{Milter.Milter}!connect@{connect}}
\index{connect@{connect}!Milter.Milter@{Milter.Milter}}
\doxysubsubsection{connect()}
{\footnotesize\ttfamily 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 "{}[1.\+2.\+3.\+4]"{} 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.}{}. 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_aaf80d7ebbb7b303cba11b65c24107ab8}.



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

\label{classMilter_1_1Milter_a5038ba891e9192a29466c18157cfcb07} 
\index{Milter.Milter@{Milter.Milter}!envfrom@{envfrom}}
\index{envfrom@{envfrom}!Milter.Milter@{Milter.Milter}}
\doxysubsubsection{envfrom()}
{\footnotesize\ttfamily 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_abf3a0558e5717751bec412e051509e59}.



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



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

\label{classMilter_1_1Milter_ac087e282180591448ff33fef4dd8837e} 
\index{Milter.Milter@{Milter.Milter}!envrcpt@{envrcpt}}
\index{envrcpt@{envrcpt}!Milter.Milter@{Milter.Milter}}
\doxysubsubsection{envrcpt()}
{\footnotesize\ttfamily 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 "{}envelope"{} 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.}{}. 

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



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



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

\label{classMilter_1_1Milter_aba25c009eb20d40f33e28a30cdb26a44} 
\index{Milter.Milter@{Milter.Milter}!eoh@{eoh}}
\index{eoh@{eoh}!Milter.Milter@{Milter.Milter}}
\doxysubsubsection{eoh()}
{\footnotesize\ttfamily Milter.\+Milter.\+eoh (\begin{DoxyParamCaption}\item[{}]{self }\end{DoxyParamCaption})}



Called at the blank line that terminates the header fields. 



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



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



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

\label{classMilter_1_1Milter_a9c377e92223578e59462c36701525568} 
\index{Milter.Milter@{Milter.Milter}!eom@{eom}}
\index{eom@{eom}!Milter.Milter@{Milter.Milter}}
\doxysubsubsection{eom()}
{\footnotesize\ttfamily 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_a833dd03e53009283470cd19081a1dff7}.



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



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

\label{classMilter_1_1Milter_a6cef34387599e7575c0f59d5dbf18ee5} 
\index{Milter.Milter@{Milter.Milter}!header@{header}}
\index{header@{header}!Milter.Milter@{Milter.Milter}}
\doxysubsubsection{header()}
{\footnotesize\ttfamily 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_a4f2fab2af71f80cd2b6241a74929bb4d}.



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



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

\label{classMilter_1_1Milter_a37a60cb18cb4beb640e8343473745582} 
\index{Milter.Milter@{Milter.Milter}!hello@{hello}}
\index{hello@{hello}!Milter.Milter@{Milter.Milter}}
\doxysubsubsection{hello()}
{\footnotesize\ttfamily 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_add1549d448dca956dcfbb66214a55252}.



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



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

\label{classMilter_1_1Milter_a7267e75f0bc34a3f32a451156fd2fd2e} 
\index{Milter.Milter@{Milter.Milter}!log@{log}}
\index{log@{log}!Milter.Milter@{Milter.Milter}}
\doxysubsubsection{log()}
{\footnotesize\ttfamily Milter.\+Milter.\+log (\begin{DoxyParamCaption}\item[{}]{self,  }\item[{$\ast$}]{msg }\end{DoxyParamCaption})}



Provide simple logging to sys.\+stdout. 



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



Referenced by \textbf{ Milter.\+Milter.\+abort()}, \textbf{ Milter.\+Milter.\+close()}, \textbf{ Milter.\+Milter.\+connect()}, \textbf{ Milter.\+Milter.\+envfrom()}, \textbf{ Milter.\+Milter.\+envrcpt()}, \textbf{ Milter.\+Milter.\+eoh()}, \textbf{ Milter.\+Milter.\+eom()}, \textbf{ Milter.\+Milter.\+header()}, \textbf{ Milter.\+Milter.\+hello()}, and \textbf{ Milter.\+test.\+Test\+Base.\+setsymval()}.



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