[Mimedefang] strip down mimedefang-filter to sub filter_recipient for md_check_against_smtp_server checks

Steffen Kaiser skmimedefang at smail.inf.fh-bonn-rhein-sieg.de
Tue Oct 11 02:44:31 EDT 2016


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Mon, 10 Oct 2016, Marcus Schopen wrote:
> Am Freitag, den 07.10.2016, 14:49 +0200 schrieb Marcus Schopen:
>>
>> I'd like to start a second mimedefang instance, which is called before
>> milter-greylist. This mimedefang should only check if recipients on
>> internal hosts exist, so incoming emails for non existing recipients
>> don't run into milter-greylist.
>>  I striped down the mimedefang-filter example to "sub filter_recipient"
>> where I run some "md_check_against_smtp_server"-checks against internals
>> host and removed all other subs (= filter_bad_filename, filter_begin,
>> filter, filter_multipart, defang_warning, filter_end). Seems to work,
>> but anything wrong about this?

I had been running two instances of mimeedefang on the same server for a 
different purpose for sevaral years without problems.

I wanted to reserve some slots of the filter for specific IP address 
ranges.

> I've started a second mimedefang instance, which mimedefang-filter is
> striped down to sub filter_recipient for md_check_against_smtp_server
> (nothing more). This works fine, but it's a complete second mimedefang
> with own spooldir, socket, pids just for recipient checking.
> Today read about SOCKETMAP option, what I didn't unterstand fully. Is
> there a way to call the same mimedefang by different socket names, but
> same socket and then check inside mimedefang by which socketname it is

SocketMap is a feature of sendmail to query a "key" not from hash maps or 
DNS or something like that, but via a socket.
So no, you cannot call the same mimedefang infrastucture via two sockets 
and differ between the origins in the filter.

Maybe you can offer a patch to roaringpenguin.com.

You would start at mimedefang.c to get two sockets and extend the protocol 
to pass the socket forth.
Or, think about adding a second socket to the multiplexor, then you would 
have two mimedefang interceptors, but just one multiplexor - scanner pair.

- -- 
Steffen Kaiser
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1

iQEVAwUBV/yKT1GgR0+MU/4GAQItyAf/bbLu4Bz8EEns6gvs0EET/S6rVc201Leq
9UV8Ytx2IqBdGu1p/0RI8SAS4asz04NbKnHhllOkFd5EJ/2ELw/1Rb3b7tSWI2kk
1jHfUwqlB8+3pUrJVOmf5vGzZeDOlk6ZpGuK/ADPkwVn9vHbFx3q5PSYzWp8oUSK
SQ8HX2dkl2fGeceUDMUDxqs8WyPoRh3xWbrD8gSQf6nEez1dbM9kvJLyaAzi0z3R
snwRr49BGi5clWv/Hvz9rSJ3zb+IPFI6qBc3nWik44aX+vHFw+3WwNmOlG9/rg86
nwTjPr1iaZ6O6wub/I6Jzmz8CvNn/OcB3LYRAEbxHa5Gl+vNYnDSmA==
=FveB
-----END PGP SIGNATURE-----


More information about the MIMEDefang mailing list