* [mlmmj] stripping HTML and attachments
@ 2010-09-28 14:17 Florian Effenberger
2010-09-29 6:38 ` Ben Schmidt
2010-09-30 14:29 ` Florian Effenberger
0 siblings, 2 replies; 3+ messages in thread
From: Florian Effenberger @ 2010-09-28 14:17 UTC (permalink / raw)
To: mlmmj
Hi,
is there an easy way of stripping HTML and attachments from incoming posts?
Thanks,
Florian
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [mlmmj] stripping HTML and attachments
2010-09-28 14:17 [mlmmj] stripping HTML and attachments Florian Effenberger
@ 2010-09-29 6:38 ` Ben Schmidt
2010-09-30 14:29 ` Florian Effenberger
1 sibling, 0 replies; 3+ messages in thread
From: Ben Schmidt @ 2010-09-29 6:38 UTC (permalink / raw)
To: mlmmj
Mlmmj doesn't directly support content filtering such as this, nor does it yet
have any dedicated way to 'plug in' an external content filter.
However, by piping the mail through a filter before it reaches Mlmmj, this kind of
thing can be done. Have a look at this:
http://mlmmj.org/archive/mlmmj/2010-01/1635.html
The patch made it into the 1.2.17.1 Mlmmj tarball, so you can easily download it
if you want to give it a try. It uses altermime to add a footer. I believe
altermime can also be used to do other MIME-related tasks such as stripping
html/attachments, so you can probably modify the script slightly to get it to do
what you want. If you manage it, please write back and let us know how you did it!
(Someone else may yet have a different/better solution, so perhaps it's worth
waiting a while before trying.)
Smiles,
Ben.
On 29/09/10 12:17 AM, Florian Effenberger wrote:
> Hi,
>
> is there an easy way of stripping HTML and attachments from incoming posts?
>
> Thanks,
> Florian
>
>
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [mlmmj] stripping HTML and attachments
2010-09-28 14:17 [mlmmj] stripping HTML and attachments Florian Effenberger
2010-09-29 6:38 ` Ben Schmidt
@ 2010-09-30 14:29 ` Florian Effenberger
1 sibling, 0 replies; 3+ messages in thread
From: Florian Effenberger @ 2010-09-30 14:29 UTC (permalink / raw)
To: mlmmj
Hi,
> However, by piping the mail through a filter before it reaches Mlmmj, this
> kind of thing can be done. Have a look at this:
>
> http://mlmmj.org/archive/mlmmj/2010-01/1635.html
thanks a lot! I hacked it a bit to make it work with stripmime.pl -
here is how it looks like:
=
#!/bin/bash
MLMMJRECIEVE=/usr/bin/mlmmj-recieve
ALTERMIME=/var/spool/mlmmj/stripmime.pl
# check executables
if ! [ -x $MLMMJRECIEVE ]; then
echo "can't find $MLMMJRECIEVE executable, aborting"
exit 1
fi
if ! [ -x $ALTERMIME ]; then
echo "can't find $ALTERMIME executable, aborting"
exit 1
fi
# read parameters
I=1
PARAM_L=0
while [ $I -le $# ] && [ $PARAM_L = 0 ]; do
if [ "${!I}" = "-L" ]; then
PARAM_L=1
fi
I=$[$I+1]
done
if [ $PARAM_L = 1 ] && [ $I -le $# ]; then
MLPATH="${!I}"
else
echo "parameter -L /path/to/listdir missing, aborting"
exit 1
fi
if ! [ -d "${MLPATH}" ]; then
echo "${MLPATH} is not existing or no directory, aborting"
exit 1
fi
CONTROLD="${MLPATH}/control"
if ! [ -d "${CONTROLD}" ]; then
echo "${CONTROLD} is not existing or no directory, aborting"
exit 1
fi
# go to a dir where altermime can write it's tmp-files safely
cd $MLPATH
# pipe the calls
$ALTERMIME | $MLMMJRECIEVE "$@"
=
Basically untested, but seems to work ATM.
Florian
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2010-09-30 14:29 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-09-28 14:17 [mlmmj] stripping HTML and attachments Florian Effenberger
2010-09-29 6:38 ` Ben Schmidt
2010-09-30 14:29 ` Florian Effenberger
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.