Skip to Content.
Sympa Menu

en - Re: [sympa-users] _include_users_remote_file deprecated in 6.2.45.b2

Subject: The mailing list for listmasters using Sympa

List archive

Chronological Thread  
  • From: IKEDA Soji <address@concealed>
  • To: DSI Gestionnaire de Listes <address@concealed>
  • Cc: "address@concealed" <address@concealed>
  • Subject: Re: [sympa-users] _include_users_remote_file deprecated in 6.2.45.b2
  • Date: Fri, 20 Sep 2019 18:31:55 +0900

Hi Jean,

> On SYMPA 6.2.22 we used to modify the function _include_users_remote_file
> in List.pm to force some DataSource to use a proxy, here is the code :

I submitted a new feature request to GH site:
https://github.com/sympa-community/sympa/issues/756

Please feel free to add comments.

Regards,
-- Soji

On Fri, 20 Sep 2019 08:47:44 +0000
DSI Gestionnaire de Listes <address@concealed> wrote:

> Hi Ikeda,
>
> On SYMPA 6.2.22 we used to modify the function _include_users_remote_file
> in List.pm to force some DataSource to use a proxy, here is the code :
>
> sub _include_users_remote_file {
> my ($users, $param, $default_user_options, $tied) = @_;
>
> my $url = $param->{'url'};
>
> $log->syslog('debug', '(%s)', $url);
>
> my $total = 0;
> my $id = Sympa::Datasource::_get_datasource_id($param);
>
> my $fetch =
> LWP::UserAgent->new(agent => 'Sympa/' . Sympa::Constants::VERSION);
>
> #if ($url =~ /sympa\.core-admins\.net/) {
> # $fetch->proxy('http', 'http://t3hpsquid.users.interne:3128');
> #}
> if ($url =~ /neuro-psi\.cnrs\.fr/) {
> $fetch->proxy('http', 'http://t3hpsquid.users.interne:3128');
> }
> if ($url =~ /somlit-db\.epoc\.u-bordeaux1\.fr/) {
> $fetch->proxy('http', 'http://t3hpsquid.users.interne:3128');
> }
> if ($url =~ /dev\.eai\.webcontrat\.cnrs\.fr/) {
> $fetch->proxy('http', 'http://t3hpsquid.users.interne:3128');
> }
>
> my $req = HTTP::Request->new(GET => $url);
>
> if (defined $param->{'user'} && defined $param->{'passwd'}) {
> $req->authorization_basic($param->{'user'}, $param->{'passwd'});
> }
>
> my $res = $fetch->request($req);
>
> # check the outcome
> if ($res->is_success) {
> my @remote_file = split(/\n/, $res->content);
> my $lines = 0;
> my $emails_found = 0;
> my $email_regexp = Sympa::Regexps::email();
> .../...
>
> This function is deprecated in 6.2.45.b2 and the synchronization does not
> work anymore since we cannot modify List.pm.
> How can we do to force the use of a proxy for http (and only http)
> Datasource in 6.2.45.b2 ?
>
> Cordialement,
> Jean THOMAS
> Listmaster
> CNRS / DSI
> address@concealed
>


--
株式会社 コンバージョン
ITソリューション部 システムソリューション1グループ 池田荘児
〒140-0014 東京都品川区大井1-49-15 アクセス大井町ビル4F
e-mail address@concealed TEL 03-6429-2880
https://www.conversion.co.jp/



Archive powered by MHonArc 2.6.19+.

Top of Page