Subject: The mailing list for listmasters using Sympa
List archive
[sympa-users] Preventing dupes, or better, safeguarding from users... ;-)))
- From: Marco Gaiarin <address@concealed>
- To: address@concealed
- Subject: [sympa-users] Preventing dupes, or better, safeguarding from users... ;-)))
- Date: Fri, 9 May 2014 14:00:16 +0200
We have a sympa instance that own an announcement list, that have some
thounsand subscribers, and is used by a not-so-skilled user to send some
sort of newsletter.
Last week the user sent a message, the server itself or the SMTP servers on
the back was busy, so the message does not come back instantly, and the user
resend it. And resend it. 5 times. ;(
Clearly, does not ''bounce'' the message, but compose a new message (so,
different msgid) with the exact same content. ;(
Before sympa we used smartlist, and on smartlist we do something like that:
# where the md5 checksums go
md5sums=md5sum.cache
# scan only the body and compute md5sum on the body,
# after first removing all newlines and non-alphabetic chars
# and making everything lowercase
:0 b
MD5SUM=| /usr/bin/sed -e 's/^--.*//g' \
| /usr/bin/tr -d '\n' \
| /usr/bin/tr '[:upper:]' '[:lower:]' \
| /usr/bin/sed -e 's/[^a-zA-Z]//g' \
| /usr/bin/md5sum
# lock $md5sums
LOCKFILE=$md5sums.lock
# see if this is a duplicate message
# if fgrep succeeds, we've tossed the mail
:0 aWhi
| /bin/fgrep -s "$MD5SUM" $md5sums
# Hurray! The mail is not a duplicate!
# add the new checksum to the file and keep the last 1000 md5sums
:0 echi
| ( /usr/bin/tail -1000 $md5sums; /bin/echo "$MD5SUM" ) > $md5sums.new; \
/bin/mv $md5sums.new $md5sums
# unlock $md5sums
rm -f $LOCKFILE
it was a crude hack, but works.
There's something similar in sympa, or what is the best way to implement
that hack?
Thanks.
--
tutti chiusi in tante celle fanno a chi parla piu' forte
per non dir che stelle e morte fan paura (F. Guccini)
-
[sympa-users] Preventing dupes, or better, safeguarding from users... ;-))),
Marco Gaiarin, 05/09/2014
-
RE: [sympa-users] Preventing dupes, or better, safeguarding from users... ;-))),
Steve Shipway, 05/09/2014
- Re: [sympa-users] Preventing dupes, or better, safeguarding from users... ;-))), Marco Gaiarin, 05/12/2014
-
RE: [sympa-users] Preventing dupes, or better, safeguarding from users... ;-))),
Steve Shipway, 05/09/2014
Archive powered by MHonArc 2.6.19+.