4 releases

0.1.0 Sep 25, 2023
0.0.3 Jan 9, 2023
0.0.2 Dec 17, 2022
0.0.1 Nov 4, 2022

#384 in Email

Download history 12/week @ 2023-07-27 11/week @ 2023-08-03 14/week @ 2023-08-10 16/week @ 2023-08-17 17/week @ 2023-08-24 6/week @ 2023-08-31 21/week @ 2023-09-07 13/week @ 2023-09-14 34/week @ 2023-09-21 18/week @ 2023-09-28 15/week @ 2023-10-05 14/week @ 2023-10-12 18/week @ 2023-10-19 22/week @ 2023-10-26 15/week @ 2023-11-02 15/week @ 2023-11-09

71 downloads per month
Used in 3 crates


829 lines


The indymilter-test library provides facilities for testing milter programs. It can be used to simulate the MTA side of an MTA–milter conversation during integration testing.

This library was originally created for testing milters written using the indymilter library. However, it contains a general milter client implementation, and can be used for testing any milter at all. For example, it could be used as a replacement for the miltertest utility from the OpenDKIM project.

For now, this library is released as a ‘minimum viable product’. It is being used successfully in a number of projects, but the API is still lacking in good ergonomics, and diagnostics leave something to be desired. Consider it a sharp tool: you must be familiar with how SMTP client and server talk to each other and how that maps to an MTA–milter conversation, and use the library API accordingly.


Include indymilter-test in the [dev-dependencies] section of Cargo.toml as usual.

As mentioned above, using the library API requires some expertise in the milter protocol. The following are some helpful resources on indymilter-test usage:

  • API documentation
  • Example test
  • sendmail milter documentation: For a detailed description of the milter protocol, see the original sendmail milter documentation. It can be found in your distro’s sendmail package (for example, on Debian and Ubuntu at /usr/share/doc/sendmail-doc/libmilter/html/index.html).
  • indymilter trace logging: When testing a milter written using indymilter, install a tracing subscriber and enable logging at trace level for insights into milter operation.

The minimum supported Rust version is 1.65.0.


Copyright © 2022–2023 David Bürgin

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see https://www.gnu.org/licenses/.


~133K SLoC