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

Marcus Schopen lists at localguru.de
Mon Oct 10 11:26:51 EDT 2016


Hi,

Am Freitag, den 07.10.2016, 14:49 +0200 schrieb Marcus Schopen:
> Hi,
> 
> 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'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
called? At the moment two mimedefang instances on the internal scan host
are listening on different ports and are connected from the relay host.
If I change both calls to the same inet port how do I figure out inside
mimedefang-filter, which socketname is used? The idea is to check
recipients in sub filter_recipient only if the socketname is set to
"mimedefang-beforegreylist" and exclude all other subs from further
filtering.

-----
INPUT_MAIL_FILTER(`mimedefang-beforegreylist', `S=inet:60000 at scanner,
F=T, T=S:5m;R:5m;E:10m')dnl

milter-greylist

INPUT_MAIL_FILTER(`mimedefang', `S=inet:60000 at scanner, F=T,
T=S:5m;R:5m;E:10m')dnl
-----

Ciao
Marcus




More information about the MIMEDefang mailing list