/usr/share/doc/python-milter-doc/html/namespacemilter.html is in python-milter-doc 1.0-2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.9.1"/>
<title>pymilter: milter Namespace Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td style="padding-left: 0.5em;">
<div id="projectname">pymilter
 <span id="projectnumber">0.9.8</span>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.9.1 -->
<div id="navrow1" class="tabs">
<ul class="tablist">
<li><a href="index.html"><span>Main Page</span></a></li>
<li><a href="pages.html"><span>Related Pages</span></a></li>
<li class="current"><a href="namespaces.html"><span>Packages</span></a></li>
<li><a href="annotated.html"><span>Classes</span></a></li>
<li><a href="examples.html"><span>Examples</span></a></li>
</ul>
</div>
<div id="navrow2" class="tabs2">
<ul class="tablist">
<li><a href="namespaces.html"><span>Packages</span></a></li>
<li><a href="namespacemembers.html"><span>Package Functions</span></a></li>
</ul>
</div>
</div><!-- top -->
<div class="header">
<div class="summary">
<a href="#nested-classes">Classes</a> |
<a href="#func-members">Functions</a> |
<a href="#var-members">Variables</a> </div>
<div class="headertitle">
<div class="title">milter Namespace Reference</div> </div>
</div><!--header-->
<div class="contents">
<p>A thin wrapper around libmilter.
<a href="#details">More...</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
Classes</h2></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="classmilter_1_1error.html">error</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="classmilter_1_1milterContext.html">milterContext</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft"> </td><td class="mdescRight">Hold context for a milter connection. <a href="classmilter_1_1milterContext.html#details">More...</a><br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:afe0230448acb391b264e8b5c28d45c3c"><td class="memItemLeft" align="right" valign="top">def </td><td class="memItemRight" valign="bottom"><a class="el" href="namespacemilter.html#afe0230448acb391b264e8b5c28d45c3c">set_flags</a> (flags)</td></tr>
<tr class="memdesc:afe0230448acb391b264e8b5c28d45c3c"><td class="mdescLeft"> </td><td class="mdescRight">Enable optional milter actions. <a href="#afe0230448acb391b264e8b5c28d45c3c">More...</a><br /></td></tr>
<tr class="separator:afe0230448acb391b264e8b5c28d45c3c"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a718661a3a66a80bbd81ecdc6558aa6f9"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a718661a3a66a80bbd81ecdc6558aa6f9"></a>
def </td><td class="memItemRight" valign="bottom"><b>set_connect_callback</b> (cb)</td></tr>
<tr class="separator:a718661a3a66a80bbd81ecdc6558aa6f9"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a89ea5090ec85d7b2b61b555680533b03"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a89ea5090ec85d7b2b61b555680533b03"></a>
def </td><td class="memItemRight" valign="bottom"><b>set_helo_callback</b> (cb)</td></tr>
<tr class="separator:a89ea5090ec85d7b2b61b555680533b03"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ae072291fc2acb0975dea551df7ff3a9b"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ae072291fc2acb0975dea551df7ff3a9b"></a>
def </td><td class="memItemRight" valign="bottom"><b>set_envfrom_callback</b> (cb)</td></tr>
<tr class="separator:ae072291fc2acb0975dea551df7ff3a9b"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a8cfd7045b7e928e9f627506d9fd6fd66"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a8cfd7045b7e928e9f627506d9fd6fd66"></a>
def </td><td class="memItemRight" valign="bottom"><b>set_envrcpt_callback</b> (cb)</td></tr>
<tr class="separator:a8cfd7045b7e928e9f627506d9fd6fd66"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a2d90d9e897a4b85aefb7af321ddc33ae"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a2d90d9e897a4b85aefb7af321ddc33ae"></a>
def </td><td class="memItemRight" valign="bottom"><b>set_header_callback</b> (cb)</td></tr>
<tr class="separator:a2d90d9e897a4b85aefb7af321ddc33ae"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:afdd3580853559c6e5300ba8d4247dcfc"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="afdd3580853559c6e5300ba8d4247dcfc"></a>
def </td><td class="memItemRight" valign="bottom"><b>set_eoh_callback</b> (cb)</td></tr>
<tr class="separator:afdd3580853559c6e5300ba8d4247dcfc"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a4aea12633c4a40dba28814f6e8fa2737"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a4aea12633c4a40dba28814f6e8fa2737"></a>
def </td><td class="memItemRight" valign="bottom"><b>set_body_callback</b> (cb)</td></tr>
<tr class="separator:a4aea12633c4a40dba28814f6e8fa2737"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a3c6256d8034903ccfa6dc6445231a855"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a3c6256d8034903ccfa6dc6445231a855"></a>
def </td><td class="memItemRight" valign="bottom"><b>set_abort_callback</b> (cb)</td></tr>
<tr class="separator:a3c6256d8034903ccfa6dc6445231a855"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a139e902748678df095210028d6082d80"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a139e902748678df095210028d6082d80"></a>
def </td><td class="memItemRight" valign="bottom"><b>set_close_callback</b> (cb)</td></tr>
<tr class="separator:a139e902748678df095210028d6082d80"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:aa82af42e2b608726a0f7e6d45da5efaa"><td class="memItemLeft" align="right" valign="top">def </td><td class="memItemRight" valign="bottom"><a class="el" href="namespacemilter.html#aa82af42e2b608726a0f7e6d45da5efaa">set_exception_policy</a> (code)</td></tr>
<tr class="memdesc:aa82af42e2b608726a0f7e6d45da5efaa"><td class="mdescLeft"> </td><td class="mdescRight">Sets the return code for untrapped Python exceptions during a callback. <a href="#aa82af42e2b608726a0f7e6d45da5efaa">More...</a><br /></td></tr>
<tr class="separator:aa82af42e2b608726a0f7e6d45da5efaa"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:aa940d270cd3e1d7072be6f41d29936df"><td class="memItemLeft" align="right" valign="top">def </td><td class="memItemRight" valign="bottom"><a class="el" href="namespacemilter.html#aa940d270cd3e1d7072be6f41d29936df">register</a></td></tr>
<tr class="memdesc:aa940d270cd3e1d7072be6f41d29936df"><td class="mdescLeft"> </td><td class="mdescRight">Register python milter with libmilter. <a href="#aa940d270cd3e1d7072be6f41d29936df">More...</a><br /></td></tr>
<tr class="separator:aa940d270cd3e1d7072be6f41d29936df"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a25c4b69c2520b1935a816734041db77d"><td class="memItemLeft" align="right" valign="top">def </td><td class="memItemRight" valign="bottom"><a class="el" href="namespacemilter.html#a25c4b69c2520b1935a816734041db77d">opensocket</a> (rmsock)</td></tr>
<tr class="memdesc:a25c4b69c2520b1935a816734041db77d"><td class="mdescLeft"> </td><td class="mdescRight">Attempt to create the socket used to communicate with the MTA. <a href="#a25c4b69c2520b1935a816734041db77d">More...</a><br /></td></tr>
<tr class="separator:a25c4b69c2520b1935a816734041db77d"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a505352a1ee405fa0bc08c97ed094fb21"><td class="memItemLeft" align="right" valign="top">def </td><td class="memItemRight" valign="bottom"><a class="el" href="namespacemilter.html#a505352a1ee405fa0bc08c97ed094fb21">main</a> ()</td></tr>
<tr class="memdesc:a505352a1ee405fa0bc08c97ed094fb21"><td class="mdescLeft"> </td><td class="mdescRight">Transfer control to libmilter. <a href="#a505352a1ee405fa0bc08c97ed094fb21">More...</a><br /></td></tr>
<tr class="separator:a505352a1ee405fa0bc08c97ed094fb21"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a7c4b4f083988abb9c174a152dc0c8fcf"><td class="memItemLeft" align="right" valign="top">def </td><td class="memItemRight" valign="bottom"><a class="el" href="namespacemilter.html#a7c4b4f083988abb9c174a152dc0c8fcf">setdbg</a> (lev)</td></tr>
<tr class="memdesc:a7c4b4f083988abb9c174a152dc0c8fcf"><td class="mdescLeft"> </td><td class="mdescRight">Set the libmilter debugging level. <a href="#a7c4b4f083988abb9c174a152dc0c8fcf">More...</a><br /></td></tr>
<tr class="separator:a7c4b4f083988abb9c174a152dc0c8fcf"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a560ae93b2946e6405d4e317461db8b4d"><td class="memItemLeft" align="right" valign="top">def </td><td class="memItemRight" valign="bottom"><a class="el" href="namespacemilter.html#a560ae93b2946e6405d4e317461db8b4d">settimeout</a> (secs)</td></tr>
<tr class="memdesc:a560ae93b2946e6405d4e317461db8b4d"><td class="mdescLeft"> </td><td class="mdescRight">Set timeout for MTA communication. <a href="#a560ae93b2946e6405d4e317461db8b4d">More...</a><br /></td></tr>
<tr class="separator:a560ae93b2946e6405d4e317461db8b4d"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a54ec699d5822b59094c351be70276110"><td class="memItemLeft" align="right" valign="top">def </td><td class="memItemRight" valign="bottom"><a class="el" href="namespacemilter.html#a54ec699d5822b59094c351be70276110">setbacklog</a> (n)</td></tr>
<tr class="memdesc:a54ec699d5822b59094c351be70276110"><td class="mdescLeft"> </td><td class="mdescRight">Set socket backlog. <a href="#a54ec699d5822b59094c351be70276110">More...</a><br /></td></tr>
<tr class="separator:a54ec699d5822b59094c351be70276110"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a47dedd3e5972a865bcfaa5163eb481cb"><td class="memItemLeft" align="right" valign="top">def </td><td class="memItemRight" valign="bottom"><a class="el" href="namespacemilter.html#a47dedd3e5972a865bcfaa5163eb481cb">setconn</a> (s)</td></tr>
<tr class="memdesc:a47dedd3e5972a865bcfaa5163eb481cb"><td class="mdescLeft"> </td><td class="mdescRight">Set the socket used to communicate with the MTA. <a href="#a47dedd3e5972a865bcfaa5163eb481cb">More...</a><br /></td></tr>
<tr class="separator:a47dedd3e5972a865bcfaa5163eb481cb"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:acd4b12aff996916919045f0d9be4d4d8"><td class="memItemLeft" align="right" valign="top">def </td><td class="memItemRight" valign="bottom"><a class="el" href="namespacemilter.html#acd4b12aff996916919045f0d9be4d4d8">stop</a> ()</td></tr>
<tr class="memdesc:acd4b12aff996916919045f0d9be4d4d8"><td class="mdescLeft"> </td><td class="mdescRight">Stop the milter gracefully. <a href="#acd4b12aff996916919045f0d9be4d4d8">More...</a><br /></td></tr>
<tr class="separator:acd4b12aff996916919045f0d9be4d4d8"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a03013ef1adc45729ac2ebeccc1afd47d"><td class="memItemLeft" align="right" valign="top">def </td><td class="memItemRight" valign="bottom"><a class="el" href="namespacemilter.html#a03013ef1adc45729ac2ebeccc1afd47d">getdiag</a> ()</td></tr>
<tr class="memdesc:a03013ef1adc45729ac2ebeccc1afd47d"><td class="mdescLeft"> </td><td class="mdescRight">Retrieve diagnostic info. <a href="#a03013ef1adc45729ac2ebeccc1afd47d">More...</a><br /></td></tr>
<tr class="separator:a03013ef1adc45729ac2ebeccc1afd47d"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a87fde36f3baa77e209fbed7ca2c89796"><td class="memItemLeft" align="right" valign="top">def </td><td class="memItemRight" valign="bottom"><a class="el" href="namespacemilter.html#a87fde36f3baa77e209fbed7ca2c89796">getversion</a> ()</td></tr>
<tr class="memdesc:a87fde36f3baa77e209fbed7ca2c89796"><td class="mdescLeft"> </td><td class="mdescRight">Retrieve the runtime libmilter version. <a href="#a87fde36f3baa77e209fbed7ca2c89796">More...</a><br /></td></tr>
<tr class="separator:a87fde36f3baa77e209fbed7ca2c89796"><td class="memSeparator" colspan="2"> </td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="var-members"></a>
Variables</h2></td></tr>
<tr class="memitem:a590b7ab395513af007869ad83e332c14"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="namespacemilter.html#a590b7ab395513af007869ad83e332c14">CONTINUE</a> = 0</td></tr>
<tr class="memdesc:a590b7ab395513af007869ad83e332c14"><td class="mdescLeft"> </td><td class="mdescRight">Continue processing the current connection, message, or recipient. <a href="#a590b7ab395513af007869ad83e332c14">More...</a><br /></td></tr>
<tr class="separator:a590b7ab395513af007869ad83e332c14"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a2345250030581a1639ecf905e1668b0a"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="namespacemilter.html#a2345250030581a1639ecf905e1668b0a">REJECT</a> = 1</td></tr>
<tr class="memdesc:a2345250030581a1639ecf905e1668b0a"><td class="mdescLeft"> </td><td class="mdescRight">For a connection-oriented routine, reject this connection; call <a class="el" href="classMilter_1_1Base.html#a2644dc855f49da0a9810e8d390c93906" title="Called when the connection is closed. ">Milter.Base.close()</a>. <a href="#a2345250030581a1639ecf905e1668b0a">More...</a><br /></td></tr>
<tr class="separator:a2345250030581a1639ecf905e1668b0a"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a4c8bad190cb7f54cea87f1182732ce83"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="namespacemilter.html#a4c8bad190cb7f54cea87f1182732ce83">DISCARD</a> = 2</td></tr>
<tr class="memdesc:a4c8bad190cb7f54cea87f1182732ce83"><td class="mdescLeft"> </td><td class="mdescRight">For a message- or recipient-oriented routine, accept this message, but silently discard it. <a href="#a4c8bad190cb7f54cea87f1182732ce83">More...</a><br /></td></tr>
<tr class="separator:a4c8bad190cb7f54cea87f1182732ce83"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ae40b8bfbb6828233115c61490998f7f4"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="namespacemilter.html#ae40b8bfbb6828233115c61490998f7f4">ACCEPT</a> = 3</td></tr>
<tr class="memdesc:ae40b8bfbb6828233115c61490998f7f4"><td class="mdescLeft"> </td><td class="mdescRight">For a connection-oriented routine, accept this connection without further filter processing; call <a class="el" href="classMilter_1_1Base.html#a2644dc855f49da0a9810e8d390c93906" title="Called when the connection is closed. ">Milter.Base.close()</a>. <a href="#ae40b8bfbb6828233115c61490998f7f4">More...</a><br /></td></tr>
<tr class="separator:ae40b8bfbb6828233115c61490998f7f4"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a1b4940e90c267a81cba6be20aa782e85"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="namespacemilter.html#a1b4940e90c267a81cba6be20aa782e85">TEMPFAIL</a> = 4</td></tr>
<tr class="memdesc:a1b4940e90c267a81cba6be20aa782e85"><td class="mdescLeft"> </td><td class="mdescRight">Return a temporary failure, i.e., the corresponding SMTP command will return an appropriate 4xx status code. <a href="#a1b4940e90c267a81cba6be20aa782e85">More...</a><br /></td></tr>
<tr class="separator:a1b4940e90c267a81cba6be20aa782e85"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:aa2fa23a83f9bbc204eb14313a6efd4cc"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="namespacemilter.html#aa2fa23a83f9bbc204eb14313a6efd4cc">SKIP</a> = 5</td></tr>
<tr class="memdesc:aa2fa23a83f9bbc204eb14313a6efd4cc"><td class="mdescLeft"> </td><td class="mdescRight">Skip further callbacks of the same type in this transaction. <a href="#aa2fa23a83f9bbc204eb14313a6efd4cc">More...</a><br /></td></tr>
<tr class="separator:aa2fa23a83f9bbc204eb14313a6efd4cc"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a45378e0b42f76927adaf504b6082fc7d"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="namespacemilter.html#a45378e0b42f76927adaf504b6082fc7d">NOREPLY</a> = 6</td></tr>
<tr class="memdesc:a45378e0b42f76927adaf504b6082fc7d"><td class="mdescLeft"> </td><td class="mdescRight">Do not send a reply back to the MTA. <a href="#a45378e0b42f76927adaf504b6082fc7d">More...</a><br /></td></tr>
<tr class="separator:a45378e0b42f76927adaf504b6082fc7d"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ab678787ccf06b2417a07e7057f7bace4"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="namespacemilter.html#ab678787ccf06b2417a07e7057f7bace4">VERSION</a> = 0x1000001</td></tr>
<tr class="memdesc:ab678787ccf06b2417a07e7057f7bace4"><td class="mdescLeft"> </td><td class="mdescRight">The compile time libmilter version. <a href="#ab678787ccf06b2417a07e7057f7bace4">More...</a><br /></td></tr>
<tr class="separator:ab678787ccf06b2417a07e7057f7bace4"><td class="memSeparator" colspan="2"> </td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>A thin wrapper around libmilter. </p>
<p>Most users will not import milter directly, but will instead import <a class="el" href="namespaceMilter.html" title="A thin OO wrapper for the milter module. ">Milter</a> and subclass <a class="el" href="classMilter_1_1Base.html" title="A do "nothing" Milter base class representing an SMTP connection. ">Milter.Base</a>. This module gives you ultimate low level control from python. </p>
</div><h2 class="groupheader">Function Documentation</h2>
<a class="anchor" id="a03013ef1adc45729ac2ebeccc1afd47d"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">def milter.getdiag </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Retrieve diagnostic info. </p>
<p>Return a tuple with diagnostic info gathered by the milter module. The first two fields are counts of <a class="el" href="classmilter_1_1milterContext.html" title="Hold context for a milter connection. ">milterContext</a> objects created and deleted. Additional fields may be added later. </p><dl class="section return"><dt>Returns</dt><dd>a tuple of diagnostic data </dd></dl>
</div>
</div>
<a class="anchor" id="a87fde36f3baa77e209fbed7ca2c89796"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">def milter.getversion </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Retrieve the runtime libmilter version. </p>
<p>Return the runtime libmilter version. This can be different from the compile time version when sendmail or libmilter is upgraded after pymilter is compiled. </p><dl class="section return"><dt>Returns</dt><dd>a tuple of <code>(major,minor,patchlevel)</code> </dd></dl>
<p>Referenced by <a class="el" href="namespaceMilter.html#a8ae61554a7e4dc83916f5325024a53f0">Milter.runmilter()</a>.</p>
</div>
</div>
<a class="anchor" id="a505352a1ee405fa0bc08c97ed094fb21"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">def milter.main </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Transfer control to libmilter. </p>
<p>Calls <a href="https://www.milter.org/developers/api/smfi_main">smfi_main</a>. </p>
<p>Referenced by <a class="el" href="namespaceMilter.html#a8ae61554a7e4dc83916f5325024a53f0">Milter.runmilter()</a>.</p>
</div>
</div>
<a class="anchor" id="a25c4b69c2520b1935a816734041db77d"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">def milter.opensocket </td>
<td>(</td>
<td class="paramtype"> </td>
<td class="paramname"><em>rmsock</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Attempt to create the socket used to communicate with the MTA. </p>
<p><a class="el" href="namespacemilter.html#a25c4b69c2520b1935a816734041db77d" title="Attempt to create the socket used to communicate with the MTA. ">milter.opensocket()</a> attempts to create the socket specified previously by a call to <a class="el" href="namespacemilter.html#a47dedd3e5972a865bcfaa5163eb481cb" title="Set the socket used to communicate with the MTA. ">milter.setconn()</a> which will be the interface between MTAs and the milter. This allows the calling application to ensure that the socket can be created. If this is not called, <a class="el" href="namespacemilter.html#a505352a1ee405fa0bc08c97ed094fb21" title="Transfer control to libmilter. ">milter.main()</a> will do so implicitly. Calls <a href="https://www.milter.org/developers/api/smfi_opensocket">smfi_opensocket</a>. While not documented for libmilter, my experiments indicate that you must call <a class="el" href="namespacemilter.html#aa940d270cd3e1d7072be6f41d29936df" title="Register python milter with libmilter. ">register()</a> before calling <a class="el" href="namespacemilter.html#a25c4b69c2520b1935a816734041db77d" title="Attempt to create the socket used to communicate with the MTA. ">opensocket()</a>. </p><dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">rmsock</td><td>Try to remove an existing unix domain socket if true. </td></tr>
</table>
</dd>
</dl>
<p>Referenced by <a class="el" href="namespaceMilter.html#a8ae61554a7e4dc83916f5325024a53f0">Milter.runmilter()</a>.</p>
</div>
</div>
<a class="anchor" id="aa940d270cd3e1d7072be6f41d29936df"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">def milter.register </td>
<td>(</td>
<td class="paramtype"> </td>
<td class="paramname"><em>name</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"> </td>
<td class="paramname"><em>negotiate</em> = <code>None</code>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"> </td>
<td class="paramname"><em>unknown</em> = <code>None</code>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"> </td>
<td class="paramname"><em>data</em> = <code>None</code> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Register python milter with libmilter. </p>
<p>The name we pass is used to identify the milter in the MTA configuration. Callback functions must be set using the set_*_callback() functions before registering the milter. Three additional callbacks are specified as keyword parameters. These were added by recent versions of libmilter. The keyword parameters is a nicer way to do it, I think, since it makes clear that you have to do it before registering. I may move all the callbacks in the future (perhaps keeping the set functions for compatibility). Note that <a class="el" href="classMilter_1_1Base.html" title="A do "nothing" Milter base class representing an SMTP connection. ">Milter.Base</a> automatically maps all callbacks to member functions, and negotiates which member functions are actually overridden by an application class. </p><dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">name</td><td>the milter name by which the MTA finds us </td></tr>
<tr><td class="paramname">negotiate</td><td>the <a href="https://www.milter.org/developers/api/xxfi_negotiate">xxfi_negotiate</a> callback, called to negotiate supported actions, callbacks, and protocol steps. </td></tr>
<tr><td class="paramname">unknown</td><td>the <a href="https://www.milter.org/developers/api/xxfi_unknown">xxfi_unknown</a> callback, called when for SMTP commands not recognized by the MTA. (Extend SMTP in your milter!) </td></tr>
<tr><td class="paramname">data</td><td>the <a href="https://www.milter.org/developers/api/xxfi_data">xxfi_data</a> callback, called when the DATA SMTP command is received. </td></tr>
</table>
</dd>
</dl>
<p>Referenced by <a class="el" href="namespaceMilter.html#a8ae61554a7e4dc83916f5325024a53f0">Milter.runmilter()</a>.</p>
</div>
</div>
<a class="anchor" id="aa82af42e2b608726a0f7e6d45da5efaa"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">def milter.set_exception_policy </td>
<td>(</td>
<td class="paramtype"> </td>
<td class="paramname"><em>code</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Sets the return code for untrapped Python exceptions during a callback. </p>
<p>The default is TEMPFAIL. You should not depend on this handler. Your application should have its own top level exception handler for each callback. You can then choose your own reply message, log the stack track were you please, and so on. However, if you miss one, this last ditch handler will print a standard stack trace to sys.stderr, and return to sendmail. </p><dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">code</td><td>one of <a class="el" href="namespacemilter.html#a1b4940e90c267a81cba6be20aa782e85" title="Return a temporary failure, i.e., the corresponding SMTP command will return an appropriate 4xx statu...">TEMPFAIL</a>,<a class="el" href="namespacemilter.html#a2345250030581a1639ecf905e1668b0a" title="For a connection-oriented routine, reject this connection; call Milter.Base.close(). ">REJECT</a>,<a class="el" href="namespacemilter.html#a590b7ab395513af007869ad83e332c14" title="Continue processing the current connection, message, or recipient. ">CONTINUE</a>, or since 1.0, <a class="el" href="namespacemilter.html#ae40b8bfbb6828233115c61490998f7f4" title="For a connection-oriented routine, accept this connection without further filter processing; call Mil...">ACCEPT</a> </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a class="anchor" id="afe0230448acb391b264e8b5c28d45c3c"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">def milter.set_flags </td>
<td>(</td>
<td class="paramtype"> </td>
<td class="paramname"><em>flags</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Enable optional milter actions. </p>
<p>Certain milter actions need to be enabled before calling <a class="el" href="namespacemilter.html#a505352a1ee405fa0bc08c97ed094fb21" title="Transfer control to libmilter. ">main()</a> or they throw an exception. Pymilter enables them all by default (since 0.9.2), but you may wish to disable unneeded actions as an optimization. </p><dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">flags</td><td>Bit or mask of optional actions to enable </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a class="anchor" id="a54ec699d5822b59094c351be70276110"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">def milter.setbacklog </td>
<td>(</td>
<td class="paramtype"> </td>
<td class="paramname"><em>n</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Set socket backlog. </p>
<p>Calls <a href="https://www.milter.org/developers/api/smfi_setbacklog">smfi_setbacklog</a>. Must be called before calling <a class="el" href="namespacemilter.html#a505352a1ee405fa0bc08c97ed094fb21" title="Transfer control to libmilter. ">main()</a>. </p>
</div>
</div>
<a class="anchor" id="a47dedd3e5972a865bcfaa5163eb481cb"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">def milter.setconn </td>
<td>(</td>
<td class="paramtype"> </td>
<td class="paramname"><em>s</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Set the socket used to communicate with the MTA. </p>
<p>The MTA can communicate with the milter by means of a unix, inet, or inet6 socket. By default, a unix domain socket is used. It must not exist, and sendmail will throw warnings if, eg, the file is under a group or world writable directory. <a class="el" href="namespacemilter.html#a47dedd3e5972a865bcfaa5163eb481cb" title="Set the socket used to communicate with the MTA. ">milter.setconn()</a> will not fail with an invalid socket - this will be detected only when calling <a class="el" href="namespacemilter.html#a505352a1ee405fa0bc08c97ed094fb21" title="Transfer control to libmilter. ">milter.main()</a> or <a class="el" href="namespacemilter.html#a25c4b69c2520b1935a816734041db77d" title="Attempt to create the socket used to communicate with the MTA. ">milter.opensocket()</a>. </p><dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">s</td><td>the socket address in proto:address format <pre>
<a class="el" href="namespacemilter.html#a47dedd3e5972a865bcfaa5163eb481cb" title="Set the socket used to communicate with the MTA. ">milter.setconn</a>('unix:/var/run/pythonfilter') # a named pipe
<a class="el" href="namespacemilter.html#a47dedd3e5972a865bcfaa5163eb481cb" title="Set the socket used to communicate with the MTA. ">milter.setconn</a>('local:/var/run/pythonfilter') # a named pipe
<a class="el" href="namespacemilter.html#a47dedd3e5972a865bcfaa5163eb481cb" title="Set the socket used to communicate with the MTA. ">milter.setconn</a>('inet:8800') # listen on ANY interface
<a class="el" href="namespacemilter.html#a47dedd3e5972a865bcfaa5163eb481cb" title="Set the socket used to communicate with the MTA. ">milter.setconn</a>('inet:7871@publichost') # listen on a specific interface
<a class="el" href="namespacemilter.html#a47dedd3e5972a865bcfaa5163eb481cb" title="Set the socket used to communicate with the MTA. ">milter.setconn</a>('inet6:8020')
<a class="el" href="namespacemilter.html#a47dedd3e5972a865bcfaa5163eb481cb" title="Set the socket used to communicate with the MTA. ">milter.setconn</a>('inet6:8020@[2001:db8:1234::1]') # listen on specific IP
</pre> </td></tr>
</table>
</dd>
</dl>
<p>Referenced by <a class="el" href="namespaceMilter.html#a8ae61554a7e4dc83916f5325024a53f0">Milter.runmilter()</a>.</p>
</div>
</div>
<a class="anchor" id="a7c4b4f083988abb9c174a152dc0c8fcf"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">def milter.setdbg </td>
<td>(</td>
<td class="paramtype"> </td>
<td class="paramname"><em>lev</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Set the libmilter debugging level. </p>
<p><a href="https://www.milter.org/developers/api/smfi_setdbg">smfi_setdbg</a> sets the milter library's internal debugging level to a new level so that code details may be traced. A level of zero turns off debugging. The greater (more positive) the level the more detailed the debugging. Six is the current, highest, useful value. Must be called before calling <a class="el" href="namespacemilter.html#a505352a1ee405fa0bc08c97ed094fb21" title="Transfer control to libmilter. ">main()</a>. </p>
</div>
</div>
<a class="anchor" id="a560ae93b2946e6405d4e317461db8b4d"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">def milter.settimeout </td>
<td>(</td>
<td class="paramtype"> </td>
<td class="paramname"><em>secs</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Set timeout for MTA communication. </p>
<p>Calls <a href="https://www.milter.org/developers/api/smfi_settimeout">smfi_settimeout</a>. Must be called before calling <a class="el" href="namespacemilter.html#a505352a1ee405fa0bc08c97ed094fb21" title="Transfer control to libmilter. ">main()</a>. </p>
<p>Referenced by <a class="el" href="namespaceMilter.html#a8ae61554a7e4dc83916f5325024a53f0">Milter.runmilter()</a>.</p>
</div>
</div>
<a class="anchor" id="acd4b12aff996916919045f0d9be4d4d8"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">def milter.stop </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Stop the milter gracefully. </p>
</div>
</div>
<h2 class="groupheader">Variable Documentation</h2>
<a class="anchor" id="ae40b8bfbb6828233115c61490998f7f4"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int milter.ACCEPT = 3</td>
</tr>
</table>
</div><div class="memdoc">
<p>For a connection-oriented routine, accept this connection without further filter processing; call <a class="el" href="classMilter_1_1Base.html#a2644dc855f49da0a9810e8d390c93906" title="Called when the connection is closed. ">Milter.Base.close()</a>. </p>
<p>For a message- or recipient-oriented routine, accept this message without further filtering. </p>
</div>
</div>
<a class="anchor" id="a590b7ab395513af007869ad83e332c14"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int milter.CONTINUE = 0</td>
</tr>
</table>
</div><div class="memdoc">
<p>Continue processing the current connection, message, or recipient. </p>
</div>
</div>
<a class="anchor" id="a4c8bad190cb7f54cea87f1182732ce83"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int milter.DISCARD = 2</td>
</tr>
</table>
</div><div class="memdoc">
<p>For a message- or recipient-oriented routine, accept this message, but silently discard it. </p>
<p>SMFIS_DISCARD should not be returned by a connection-oriented routine. </p>
</div>
</div>
<a class="anchor" id="a45378e0b42f76927adaf504b6082fc7d"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int milter.NOREPLY = 6</td>
</tr>
</table>
</div><div class="memdoc">
<p>Do not send a reply back to the MTA. </p>
<p>The milter must negotiate this behavior with the MTA, i.e., it must check whether the appropriate protocol action P_NR_* is available and if so, the milter must request it. If you set the P_NR_* protocol action for a callback, that callback must always reply with NOREPLY. Using any other reply code is a violation of the API. If in some cases your callback may return another value (e.g., due to some resource shortages), then you must not set P_NR_* and you must use CONTINUE as the default return code. (Alternatively you can try to delay reporting the problem to a later callback for which P_NR_* is not set.)</p>
<p>This is negotiated and returned automatically by the <a class="el" href="namespaceMilter.html#a5bc0cfa03c567347b622acda6f6b6d42" title="Function decorator to disable callback reply. ">Milter.noreply</a> function decorator. </p>
</div>
</div>
<a class="anchor" id="a2345250030581a1639ecf905e1668b0a"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int milter.REJECT = 1</td>
</tr>
</table>
</div><div class="memdoc">
<p>For a connection-oriented routine, reject this connection; call <a class="el" href="classMilter_1_1Base.html#a2644dc855f49da0a9810e8d390c93906" title="Called when the connection is closed. ">Milter.Base.close()</a>. </p>
<p>For a message-oriented routine, except <a class="el" href="classMilter_1_1Base.html#a725f845830639b76f479dc6c0f7f8c00" title="Called at the end of the message body. ">Milter.Base.eom()</a> or <a class="el" href="classMilter_1_1Base.html#aef01a2465e563ad1435030cfc9b30939" title="Called when the connection is abnormally terminated. ">Milter.Base.abort()</a>, reject this message. For a recipient-oriented routine, reject the current recipient (but continue processing the current message). </p>
</div>
</div>
<a class="anchor" id="aa2fa23a83f9bbc204eb14313a6efd4cc"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int milter.SKIP = 5</td>
</tr>
</table>
</div><div class="memdoc">
<p>Skip further callbacks of the same type in this transaction. </p>
<p>Currently this return value is only allowed in <a class="el" href="classMilter_1_1Base.html#a963e42c7fcf7bb1a967af48c878b00c7" title="Called to supply the body of the message to the Milter by chunks. ">Milter.Base.body()</a>. It can be used if a milter has received sufficiently many body chunks to make a decision, but still wants to invoke message modification functions that are only allowed to be called from <a class="el" href="classMilter_1_1Base.html#a725f845830639b76f479dc6c0f7f8c00" title="Called at the end of the message body. ">Milter.Base.eom()</a>. Note: the milter must negotiate this behavior with the MTA, i.e., it must check whether the protocol action SMFIP_SKIP is available and if so, the milter must request it. </p>
</div>
</div>
<a class="anchor" id="a1b4940e90c267a81cba6be20aa782e85"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int milter.TEMPFAIL = 4</td>
</tr>
</table>
</div><div class="memdoc">
<p>Return a temporary failure, i.e., the corresponding SMTP command will return an appropriate 4xx status code. </p>
<p>For a message-oriented routine, except <a class="el" href="classMilter_1_1Base.html#ac8f026580efbc83c4901693828a362f5" title="Called when the SMTP client says MAIL FROM. ">Milter.Base.envfrom()</a>, fail for this message. For a connection-oriented routine, fail for this connection; call <a class="el" href="classMilter_1_1Base.html#a2644dc855f49da0a9810e8d390c93906" title="Called when the connection is closed. ">Milter.Base.close()</a>. For a recipient-oriented routine, only fail for the current recipient; continue message processing. </p>
</div>
</div>
<a class="anchor" id="ab678787ccf06b2417a07e7057f7bace4"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int milter.VERSION = 0x1000001</td>
</tr>
</table>
</div><div class="memdoc">
<p>The compile time libmilter version. </p>
<p>Python code might need to deal with pymilter compiled against various versions of libmilter. This module constant contains the contents of the <code>SMFI_VERSION</code> macro when the milter module was compiled. </p>
</div>
</div>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by  <a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.9.1
</small></address>
</body>
</html>
|