[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

[offtopic] Filtering Multiple Copies of Mail (was Re: [MacPerl]use diagnostics, memory leak?)



-----BEGIN PGP SIGNED MESSAGE-----

At 12:55 +1100 on 5/12/97, Marcus Sen wrote:

>P.S. Off Topic list etiquette question:  I notice people generally
send
>messages both directly to people who've posted and to the list
address so I've
>done the same, but isn't it more of an annoyance to get two copies
of the same
>message one from the list and one direct?

The ettiquette I've learned - when I remember it - is to leave
personal addresses off if you know the person is in a list you're
sending the message to.

I often don't think about it, and many times I've found myself
hitting "send" when there are two people in the "To:" field and 5 in
the "Cc:" field, as well as the "Cc:" or "To:" containing a mailing
list.

At this point in time, I don't end up receiving multiple copies of
messages because I have my mail server filter out the duplicates
before it puts them in my mailbox.

If you receive your mail in a Unix mailbox, you should be able to
use procmail to filter your mail. Enter the following procmail rule
in your .procmailrc file:

	:0 Wh: msgid.lock
	| formail -D 8192 msgid.cache

[The first line starts with colon zero, not colon capital-oh]

This will build list of incoming message ID's (unique for a message
when it is sent, so if you receive multiple copies, they'll all have
the same message ID). The 'formail' program, called with the -D
option, will dump any mail that has the same message ID as one
you've already received. The 8192 means that the msgid.cache file is
approximately 8192 bytes long - it can get larger since a message ID
is a long string.

If you have multiple mail boxes, you can use fetchmail to collect
mail from all mailboxes to one central one, then have that procmail
script for the central mailbox - assuming, of course, you can get
shell access to your central mailbox.

I don't know of a way of filtering out duplicate mails using Eudora.
You could, perhaps, write a PERL script to use Eudora's AppleEvent
links... but this would be slow at best, and definately clunky.
Procmail is an UGLY tool, but it's the best one for the job (in this
instance, formail is actually the tool we're using... but that's
neither here nor there).

The string you're looking for, looks like this:
	Message-Id: <199712050151.KAA15352@jjctsn10.pnc.go.jp>

The stuff in angle-brackets has no standard format. Some systems use
a "Japanese Date" like "YYYYMMDDHHmm.randomnumber". The message ID
is always supposed to have "@host.domain" at the end of it.

I hope this message contains something of use to someone :)

Alex Satrapa
-----BEGIN PGP SIGNATURE-----
Version: 2.6.2, by FileCrypt 1.0

iQCVAwUBNIeQmGFCmlEesL8FAQHKAgP+KusW/ubR3Okr5g5X4EwvX0sHPIHDO5vN
r7nxlmB+hp0bVMZ/9bPztbMcgGfdK75HGzHJZfFvViHssoqHc/yf8PzQTzHRM1Ep
A+jK3oDwgVvBZJ8vaTKxoNWXQPDEn5XCTHfuBx+AMjNUay2+EpHYR6A3q8MWRiS5
nYK3y+na+6M=
=mlmD
-----END PGP SIGNATURE-----

Windows 95: n. 32 bit extensions and a graphical shell for a 16 bit patch
to an 8 bit operating system originally coded for a 4 bit microprocessor,
written by a 2 bit company.



***** Want to unsubscribe from this list?
***** Send mail with body "unsubscribe" to mac-perl-request@iis.ee.ethz.ch