~ubuntu-branches/debian/squeeze/sympa/squeeze

« back to all changes in this revision

Viewing changes to src/Archive.pm

  • Committer: Bazaar Package Importer
  • Author(s): Stefan Hornburg (Racke)
  • Date: 2005-04-09 23:33:35 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20050409233335-fm1lfafyokbq4bsx
Tags: 4.1.5-2

* added /etc/mail to directory list (Closes: #298404, thanks to Massimo
  Cetra <mcetra@navynet.it> for the report)
* fixed typo in package description (Closes: #300038, thanks to Florian
  Zumbiehl <florz@gmx.de> for the report) 

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
# Archive.pm - This module does the archiving job for a mailing lists.
2
 
# RCS Identication ; $Revision: 1.7 $ ; $Date: 2001/11/30 10:39:09 $ 
 
2
# RCS Identication ; $Revision: 1.9 $ ; $Date: 2004/03/17 10:53:04 $ 
3
3
#
4
4
# Sympa - SYsteme de Multi-Postage Automatique
5
5
# Copyright (c) 1997, 1998, 1999, 2000, 2001 Comite Reseau des Universites
26
26
use Log;
27
27
use strict;
28
28
 
 
29
my $serial_number = 0; # incremented on each archived mail
29
30
 
30
31
## RCS identification.
31
32
 
56
57
    my @now  = localtime(time);
57
58
#    my $prefix= sprintf("%04d-%02d-%02d-%02d-%02d-%02d",1900+$now[5],$now[4]+1,$now[3],$now[2],$now[1],$now[0]);
58
59
#    my $filename = "$dir"."/"."$prefix-$listname";
59
 
    my $filename = sprintf '%s/%s.%d.%d', $dir, $listname, time, $$;
 
60
    my $filename = sprintf '%s/%s.%d.%d.%d', $dir, $listname, time, $$, $serial_number;
 
61
    $serial_number = ($serial_number+1)%100000;
60
62
    unless ( open(OUT, "> $filename")) {
61
63
        do_log('info',"error unable open outgoing dir $dir for list $listname");
62
64
        return undef;