Культурный офтопик
 help / color / mirror / Atom feed
From: Pavel Sergeev <old_bibigon@mail.ru>
To: "культурный офтопик" <smoke-room@altlinux.ru>
Subject: Re: [room] Re: рассылки
Date: Mon, 10 Oct 2005 19:50:14 +0400
Message-ID: <434A8DB6.3000303@mail.ru> (raw)
In-Reply-To: <433BC049.4040902@altlinux.org>

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

Konnichiwa, Alexey Rusakov, вы писали:

> On 29.09.2005 14:08, Arioch wrote:
>
>> Alexey Rusakov пишет:
>>
>>> Неужели так сложно пихать в каждое письмо линк неважно куда,
>>
>> На Гугл? На Яндекс? На Луну?
>> Толку от линка неважно-куда ?
>
> Я о технической реализуемости. Просто, имхо, не должно быть сложно 
> состряпать линк из некоторого шаблона, подставив туда MessageID.
>
>>> не зная о существовании этого линка?
>>
>> Я не уверен, что почтовый сервер может надежно угадать, под каким 
>> номером позже совсем другая прога его в архив положит.
>
> Здрасте, а MessageID совсем другая прога зачитать не в состоянии? И 
> использовать его в качестве первичного ключа.
>
Подобный костыль подойдет?
Для каждого письма из html архива(по абсолютному пути) создается симлинк 
в /%(archive_list)s/msgid/%(Message-ID этого письма)s.html.
Также добавляет переменые msgid (Message-ID текущего письма) и 
web_archive (url архива списка) в словарь для подписей mailman'a.
Т.е. если добавить в подпись 'Адрес этого сообщения в Web: 
%(web_archive)smsgid%(cgiext)s/%(msgid)s.html' то все будет нормально :-\
Правда не знаю в каком виде это в дайджесах писать :\

[-- Attachment #2: mailman.path --]
[-- Type: text/plain, Size: 2136 bytes --]

diff -ur /tmp/mailman/Mailman/Archiver/HyperArch.py /usr/share/mailman/Mailman/Archiver/HyperArch.py
--- /tmp/mailman/Mailman/Archiver/HyperArch.py	2005-05-13 15:35:37 +0400
+++ /usr/share/mailman/Mailman/Archiver/HyperArch.py	2005-10-10 16:48:56 +0400
@@ -1087,6 +1087,12 @@
         f.write(article.as_html())
         f.close()
 
+	if not os.path.exists(self.basedir + '/msgid/'):
+	    os.makedirs(self.basedir + '/msgid/', mode=0775)
+	path_symlink = '%s/msgid/%s.html' % (self.basedir, article.msgid)
+	if not os.path.exists(path_symlink):
+	    os.symlink(path, path_symlink)
+
         # Write the text article to the text archive.
         path = os.path.join(self.basedir, "%s.txt" % index)
         omask = os.umask(002)
diff -ur /tmp/mailman/Mailman/Gui/Digest.py /usr/share/mailman/Mailman/Gui/Digest.py
--- /tmp/mailman/Mailman/Gui/Digest.py	2002-02-27 03:04:51 +0300
+++ /usr/share/mailman/Mailman/Gui/Digest.py	2005-10-10 19:24:51 +0400
@@ -27,6 +27,7 @@
 # to this.
 ALLOWEDS = ('real_name', 'list_name', 'host_name', 'web_page_url',
             'description', 'info', 'cgiext', '_internal_name',
+	    'msgid', 'web_archive',
             )
 
 
diff -ur /tmp/mailman/Mailman/Handlers/Decorate.py /usr/share/mailman/Mailman/Handlers/Decorate.py
--- /tmp/mailman/Mailman/Handlers/Decorate.py	2005-05-13 06:38:17 +0400
+++ /usr/share/mailman/Mailman/Handlers/Decorate.py	2005-10-10 19:38:52 +0400
@@ -39,7 +39,7 @@
     # Digests and Mailman-craft messages should not get additional headers
     if msgdata.get('isdigest') or msgdata.get('nodecorate'):
         return
-    d = {}
+    d = {'msgid': msg.get('Message-Id', '<01231@local>').strip()[1:-1]}
     if msgdata.get('personalize'):
         # Calculate the extra personalization dictionary.  Note that the
         # length of the recips list better be exactly 1.
@@ -203,6 +203,7 @@
                   'description'   : mlist.description,
                   'info'          : mlist.info,
                   'cgiext'        : mm_cfg.CGIEXT,
+		  'web_archive'   : mlist.GetBaseArchiveURL(),
                   })
     d.update(extradict)
     # Using $-strings?

  parent reply	other threads:[~2005-10-10 15:50 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-09-23 15:05 [room] рассылки Vasily Kolomeets
2005-09-23 15:28 ` Andrey Rahmatullin
2005-09-26 19:02 ` Michael Shigorin
2005-09-27 10:22   ` Genix
2005-09-27 11:48     ` Michael Shigorin
2005-09-27 16:24       ` Andrey Rahmatullin
2005-09-28 11:03     ` [room] Установка asplinux10 Alexander
2005-09-28 11:37       ` Michael Shigorin
2005-09-28 17:58 ` [room] рассылки Vasily Kolomeets
2005-09-28 22:10   ` Alexey Rusakov
2005-09-29  2:02     ` Arioch
2005-09-29  6:43       ` Alexey Rusakov
2005-09-29  8:21         ` [room] рассылки Arioch
2005-09-29  9:33           ` Alexey Rusakov
2005-09-29 10:08             ` Arioch
2005-09-29 10:22               ` Alexey Rusakov
2005-09-29 11:37                 ` Arioch
2005-09-29 12:32                   ` Alexey Rusakov
2005-09-30 10:47                     ` Arioch
2005-09-30 13:12                       ` Andrey Rahmatullin
2005-09-30 14:05                         ` Arioch
2005-10-04  9:36                           ` Michael Shigorin
2005-10-10 15:50                 ` Pavel Sergeev [this message]
2005-09-29 16:25             ` Michael Shigorin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=434A8DB6.3000303@mail.ru \
    --to=old_bibigon@mail.ru \
    --cc=smoke-room@altlinux.ru \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Культурный офтопик

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://lore.altlinux.org/smoke-room/0 smoke-room/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 smoke-room smoke-room/ http://lore.altlinux.org/smoke-room \
		smoke-room@lists.altlinux.org smoke-room@lists.altlinux.ru smoke-room@lists.altlinux.com smoke-room@altlinux.ru smoke-room@altlinux.org smoke-room@altlinux.com
	public-inbox-index smoke-room

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


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