[Mimedefang] action_bounce html mail
-
kd6lvw at yahoo.com
Fri Jul 9 23:29:16 EDT 2010
--- On Fri, 7/9/10, tonj <tonj at freeuk.com> wrote:
> > However, I use a custom header rule in sendmail, not MD, to reject such.
>
> sounds good, would you kind enough to share it? I use sendmail too.
As requested:
# If one doesn't have the access table feature compiled in, then this
# rejects ALL html-mail.
define(`_NO_HTML_MSG_',`"554 HTML formatted mail not accepted here"')dnl
define(`_SPAMMER_MSG_',`"554 Spammer identified - Message killed."')dnl
HContent-Type: $>CheckContentType
LOCAL_RULESETS
SCheckContentType
R$@ $#error $@ 5.6.0 $: "554 MIME Content-Type is empty!"
Rtext $#error $@ 5.6.2 $: "554 MIME Content-Type is incomplete"
R$*/x-msword$* $#error $@ 5.6.1 $: "554 MIME type not supported here"
R$*/msdownload$* $#error $@ 5.6.1 $: "554 MIME type not supported here"
R$*/x-msdownload$* $#error $@ 5.6.1 $: "554 MIME type not supported here"
R$application/pdf$* $#error $@ 5.6.1 $: "554 MIME type not supported here"
ifdef(`_ACCESS_TABLE_',`dnl
R$*text/html$* $@ $>CheckContentHTML <?> <$&u>
SCheckContentHTML
R<?> <$+@$+> $: $>F <$1@$2> <?> <+ HTML> <$1@$2>
R<?> <$+@$+> $: $>U <$1@> <?> <+ HTML> <$1@$2>
R<?> <$+@$+> $: $>D <$2> <NO> <+ HTML> <$1@$2>
R<$={Accept}> <$*> $@ <$2>
R<ERROR:$+> <$*> $@ $>ProcessError $1
R<DISCARD> <$*> $#discard $: discard
R<QUARANTINE:$+> <$*> $#error $@ quarantine $: $1
R<?> <$*> $#error $@ 5.6.1 $: _NO_HTML_MSG_
R<NO> <$*> $#error $@ 5.6.1 $: _NO_HTML_MSG_
R<REJECT> <$*> $#error $@ 5.7.1 $: _SPAMMER_MSG_
R<<TMPF>> <$*> $#error $@ 4.3.0 $: "451 Temporary system failure"
R<TMPF> <$*> $#error $@ 4.3.0 $: "451 Temporary system failure"
R<$+> <$*> $@ $>ProcessError $1
R$* $#error $@ 5.6.1 $: _NO_HTML_MSG_ ',`dnl
R$*text/html$* $#error $@ 5.6.1 $: _NO_HTML_MSG_ ')dnl
# Changes any "550" in the access table to "554" for the SMTP DATA phase.
SProcessError
R$* 550 $* $: $1 554 $2
R$- $-.$-.$- $+ $#error $@ $2.$3.$4 $: $1 $5
R$-.$-.$-:$+ $#error $@ $1.$2.$3 $: $4
R$* $#error $: $1
---------------------------------------------------------------------
And yes, people have spammed me with PDF files as the main body!
More information about the MIMEDefang
mailing list