Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

INN, Ifmail и X-Comment-to ...?

5 views
Skip to first unread message

Alexander Gotlib

unread,
Jun 25, 2002, 6:45:45 PM6/25/02
to
-|- -|-
Hail there All!

Поделитесь кто-нибудь рецептом, как сию проблему решить
на стороне сервера ? Hасколько я в курсе, на ряде гейтов енто
уже успешно побороли...

--
WBR, Alexander B. Gotlib,
mailto:al...@cca.usart.ru / ICQ# 13043204.
-|- -|-

Sergey Vorobiev

unread,
Jun 25, 2002, 6:39:24 PM6/25/02
to
Hi!

Alexander Gotlib <Alexande...@f1003.n5080.z2.fidonet.org> wrote:

AG> Поделитесь кто-нибудь рецептом, как сию проблему решить
AG> на стороне сервера ? Hасколько я в курсе, на ряде гейтов енто
AG> уже успешно побороли...

Рассказываю, как это сделано на /400.

У нас все эхи - модерируемые, то есть сообщения пользователей попадают не в
базу, а на e-mail вида fido7-e...@fido7.ru, где скармливаются
автомодератору (скрипту на перле). Этот скрипт много чело делает, в том
числе и X-Comment-To проставляет.

Теперь собственно об алгоритме X-Comment-To:

if (!((&rfc822hdr("Comment-To", @header) ne "") ||
(&rfc822hdr("X-Comment-To", @header) ne "") ||
(&rfc822hdr("X-FTN-To", @header) ne "") ||
(&rfc822hdr("X-Fidonet-Comment-To", @header) ne "") ||
(&rfc822hdr("X-Apparently-To", @header) ne "") ) )
{
$refs=&rfc822hdr("References", @header);
if ($refs ne "")
{
@refs = split(/ /, $refs);
$msgid = pop @refs;
$msgid=~s/[<>|;\s'"]//g;
$fn=`$grephistory \'$msgid\' 2>&1`;
if ( (!($fn =~ /\/dev\/null/)) && (!($fn =~ /Not found/)) )
{
$orig_from = `$sm $fn`;
@orig_from = grep(/^From:/, split(/\n/, $orig_from));
$orig_from = shift @orig_from;
$orig_from=~s/^From:\s*//;
$orig_from=~s/^\s*(.+[^\s])\s*<[^\s><"\(\)\@]+\@[^\s><"\(\)\@]+>\s*$/$1/;
$orig_from=~s/^\s*<{0,1}[^\s><"\(\)\@]+\@[^\s><"\(\)\@]+>{0,1}\s*\((.+)\)\s*$/$1/;
$orig_from=~s/^"//;
$orig_from=~s/"$//;
@header=&rfc822addhdr("X-Comment-To:",$orig_from,@header);
}
}
}

Есть вопросы - задавай.


Regards,
Sergey Vorobiev.

0 new messages