Re: fidogate 5.2.2ds
- From
- Andrey Slusar (2:467/126)
- To
- Pavel Gaidai
- Date
- 2005-11-26T19:22:36Z
- Area
- RU.UNIX.FTN
Fri, 25 Nov 2005 17:12:26 +0200, Pavel Gaidai wrote to All:
PG> При ответе на мое письмо вместо имени отправителя вставляется дата и
PG> время в поле To:
PG> Как можно это исправить?
Это очень странно. Может силфида глючит. В общем посмотри какой
артикль силфида формирует,
PG> В Sylpheedе вставляю X-Comment-To: руками.
PG> Как автоматизировать?
Скриптом filter_nnrpd.pl. Вот таким:
--8<---------------cut here---------------start------------->8---
#!/usr/bin/perl -w
#use strict;
sub filter_post {
my $rval = "" ; # assume we'll accept.
my $grephistory = '/usr/local/news/bin/grephistory';
my $sm = '/usr/local/news/bin/sm';
if ( !(($hdr{"Comment-To"} ne "") || ($hdr{"X-Comment-To"} ne "") ||
($hdr{"X-FTN-To"} ne "") || ($hdr{"X-Fidonet-Comment-To"} ne "") ||
($hdr{"X-Apparently-To"} ne "")))
{
my $refs = $hdr{"References"};
if( $refs ne "" )
{
my @refs = split(/ /, $refs);
my $msgid = pop @refs;
$msgid =~ s/[<>|;\s'"]//g;
my $fn=`$grephistory \'$msgid\' 2>&1`;
if( (!($fn =~ /\/dev\/null/)) && (!($fn =~ /Not found/)) )
{
my $orig_from = `$sm $fn`;
my @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/"$//;
$hdr{"X-Comment-To"} = $orig_from;
$modify_headers = 1;
}
}
}
return $rval;
}
--8<---------------cut here---------------end--------------->8---
--
Regards,
Andrey.
--- Gnus/5.1007 (Gnus v5.10.7) XEmacs/21.5-b23 (daikon, i386--freebsd)
* Origin: http://sourceforge.net/projects/rusfidogate/ (2:467/126)
SEEN-BY: 46/50 50/12 400/814 450/1024 462/30 463/614 467/31 61 70 99 112 117
SEEN-BY: 467/126 127 129 469/125 550/357 4615/59 4621/18 4623/56 5000/5000
SEEN-BY: 5010/53 5011/13 5012/46 5015/10 28 5019/31 5020/545 715 2871 4441
SEEN-BY: 5021/29 5025/3 5027/16 5030/115 5035/38 5036/34 5053/16 5054/1 8 9 18
SEEN-BY: 5054/37 45 63 67 81 5059/9 5060/900 5062/10 5063/3 5069/7 5077/70
SEEN-BY: 5080/1003 5085/13 5095/20 5096/18 6000/12 254 6001/10
PATH: 467/126 70 46/50 5020/545 5054/1 37