_DATE_ function in archive
Alex Neuman
alex at nkpanama.com
Wed Jun 13 18:12:41 IST 2007
IANAPP (in fact, I have *zero* knowledge of Perl), but...
From "message.pm" I see a few lines that say the following:
$date = sprintf("%04d%02d%02d", $year+1900, $month+1, $day);
and
if ($archiveplaces =~ /_DATE_/) {
# Only do the work for the date substitution if we really have to
$archiveplaces =~ s/_DATE_/$date/g;
#print STDERR "Archive location is $archiveplaces\n";
}
Could I add something like:
$shortdate = sprintf("%04d%02d%02d", $year+1900, $month+1);
if ($archiveplaces =~ /_SHORTDATE_/) {
# Only do the work for the short date substitution if we really have to
$archiveplaces =~ s/_DATE_/$shortdate/g;
#print STDERR "Archive location is $archiveplaces\n";
}
... so I could use year+month instead of year+month+date and then
rotate/backup my archive once a month if I used the magic string
_SHORTDATE_ instead of _DATE_ ?
Thanks in advance...
More information about the MailScanner
mailing list