ALT Linux Community general discussions
 help / color / mirror / Atom feed
* [Comm] procmail и рассылки
@ 2003-10-08  5:05 Alexey I. Froloff
  0 siblings, 0 replies; only message in thread
From: Alexey I. Froloff @ 2003-10-08  5:05 UTC (permalink / raw)
  To: community

[-- Attachment #1: Type: text/plain, Size: 1433 bytes --]

Помнится, как-то на irc Александр Боковой в ответ на мою фразу о
том, что меня ломает подписываться на ещё один maillist, потому
как ломает добавлять правило в .procmailrc, ответил, что у него
на все рассылки одно правило. Мне эта идея понравилась и я решил
его правило слегка пропатчить...

Смысл в следующем - все списки рассылки идут в mbox'ы в каталоге
$MAILDIR/lists в виде <prefix>-<list-name>, где prefix либо
определяется мной, либо берётся домен второго уровня.

.procmailrc:
===
...

:0:
* ^List-Id:.*<\/[^>]*>$
lists/`echo $MATCH | sed -f $MAILDIR/lists.sed`

...
===

$MAILDIR/lists.sed:
===
# Lowercate input...
y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/
# ALT Linux lists
s/^\([^\.]*\)\(\.www\)\?\.\(altlinux\.\(ru\|com\|org\|net\)\|linux\.iplabs\.ru\)>$/alt-\1/;
t end
# LRN lists
s/^\([^\.]*\)\(\.www\)\?\.\(lrn\.\(ru\|com\|org\|net\)\|linux\.ru\.net\)>$/lrn-\1/;
t end
# GNU/NonGNU
s/^\([^\.]*\)\.\(non\)\?gnu\.org>$/gnu-\1/;
t end
# SourceForge
s/^\([^\.]*\)\.lists\.sourceforge\.net>$/sf-\1/;
t end
# QuakeForge
s/^\([^\.]*\)\.lists\.quakeforge\.net>$/qf-\1/;
t end
# Insert more patterns here...
#s/^\([^\.]*\)\.blah\.bl.ah>$/blah-\1/;
#t end
# Default rule - prefix list with 2-level domain name
s/^\([^\.]*\)\.\([^\.]*\.\)*\([^\.]*\)\.[^\.]*>$/\3-\1/;
:end
===

-- 
Regards, Sir Raorn.
-------------------
Не думаю, что этот случай стоит специального официального заявления.
		-- ldv in sisyphus@

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2003-10-08  5:05 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-10-08  5:05 [Comm] procmail и рассылки Alexey I. Froloff

ALT Linux Community general discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://lore.altlinux.org/community/0 community/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 community community/ http://lore.altlinux.org/community \
		mandrake-russian@linuxteam.iplabs.ru community@lists.altlinux.org community@lists.altlinux.ru community@lists.altlinux.com
	public-inbox-index community

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://lore.altlinux.org/org.altlinux.lists.community


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git