NAME
filter-mimedefang.pl - an OpenSMTPD filter for MIMEDefang
DESCRIPTION
MIMEDefang-smtpd-filter is an OpenSMTPD filter to integrate MIMEDefang and OpenSMTPD.
To enable the filter just add the following lines into your smtpd.conf:
filter "mimedefang" proc-exec "filter-mimedefang.pl" user _mdefang group _mdefang
listen on all filter "mimedefang"
The filter is installed in /usr/local/libexec/smtpd, where smtpd(8) looks up a relative proc-exec path. If it was installed somewhere else, give the full path.
USAGE
The program has some parameters to modify its behavior.
-d enable debug mode, when debug mode is enabled, logs will be more verbose and temporary files under /var/spool/MIMEDefang will not be removed.
-r performs a relay check by calling filter_relay sub in mimedefang-filter(5)
-H performs a HELO check by calling filter_helo sub in mimedefang-filter(5)
-s calls filter_sender sub in mimedefang-filter(5) for every MAIL FROM
-t calls filter_recipient sub in mimedefang-filter(5) for every RCPT TO, each recipient is accepted or rejected on its own
-X Do not add an X-Scanned-By: header.
-m socket path of the mimedefang-multiplexor(8) socket, default /var/spool/MIMEDefang/mimedefang-multiplexor.sock
-z dir MIMEDefang spool directory, default /var/spool/MIMEDefang
-T secs timeout for the multiplexor, default 30 seconds. If it cannot be reached or does not answer, mail is tempfailed with a 451.
WHAT THE FILTER PASSES TO MIMEDEFANG
Besides the sender, the accepted recipients (in angle brackets, like Sendmail) and the client address, the filter sets the tls_version, cipher and cipher_bits macros for TLS sessions and auth_authen for authenticated ones, so they can be read from %SendmailMacros. The queue ID is the smtpd(8) envelope id, or its message id before the envelope exists (during filter_sender and filter_recipient).
BUGS AND LIMITATIONS
Some features that are available in MIMEDefang are not implemented because smtpd-filters(7) cannot express them once the message has been accepted: add_recipient(), delete_recipient() and change_sender() are not available, nor is quarantining a message in the MTA queue (action_sm_quarantine()), and the tarpit delay returned by filter_relay() and friends is ignored. Requests for them are logged at "warning" level and mail is delivered. action_discard() is ignored.
SEE ALSO
mimedefang(8), mimedefang-filter(5), mimedefang-protocol(7), smtpd.conf(5), smtpd-filters(7), Mail::MIMEDefang::OpenSMTPD