Add: MID-Format may now contain %t for a Unix timestamp.
%t will be replaced by the number of seconds since the epoch. Signed-off-by: Thomas Hochstein <thh@inter.net>
This commit is contained in:
parent
605916ef61
commit
13ce8c26a3
|
@ -269,6 +269,7 @@ sub postfaq {
|
||||||
#Prepare MID:
|
#Prepare MID:
|
||||||
$$TDM = ($$TDM < 10 && $$TDM !~ /^0/) ? "0" . $$TDM : $$TDM;
|
$$TDM = ($$TDM < 10 && $$TDM !~ /^0/) ? "0" . $$TDM : $$TDM;
|
||||||
$$TDD = ($$TDD < 10 && $$TDD !~ /^0/) ? "0" . $$TDD : $$TDD;
|
$$TDD = ($$TDD < 10 && $$TDD !~ /^0/) ? "0" . $$TDD : $$TDD;
|
||||||
|
my $Timestamp = time;
|
||||||
|
|
||||||
$MID = $$MIDF;
|
$MID = $$MIDF;
|
||||||
$MID = '<%n-%d.%m.%y@'.hostfqdn.'>' if !defined($MID); # set to default if unset
|
$MID = '<%n-%d.%m.%y@'.hostfqdn.'>' if !defined($MID); # set to default if unset
|
||||||
|
@ -276,6 +277,7 @@ sub postfaq {
|
||||||
$MID =~ s/\%d/$$TDD/g;
|
$MID =~ s/\%d/$$TDD/g;
|
||||||
$MID =~ s/\%m/$$TDM/g;
|
$MID =~ s/\%m/$$TDM/g;
|
||||||
$MID =~ s/\%y/$$TDY/g;
|
$MID =~ s/\%y/$$TDY/g;
|
||||||
|
$MID =~ s/\%t/$Timestamp/g;
|
||||||
|
|
||||||
#Now get the body:
|
#Now get the body:
|
||||||
open (FH, "<$$File");
|
open (FH, "<$$File");
|
||||||
|
@ -689,8 +691,9 @@ A pattern from which the message ID is generated as it will appear in
|
||||||
the Message-ID header of the message.
|
the Message-ID header of the message.
|
||||||
|
|
||||||
You may use the special strings C<%n> for the I<Name> of your project,
|
You may use the special strings C<%n> for the I<Name> of your project,
|
||||||
C<%d> for the date the message is posted, C<%m> for the month and
|
C<%d> for the date the message is posted, C<%m> for the month, C<%y>
|
||||||
C<%y> for the year, respectively.
|
for the year and C<%t> for a time stamp (number of seconds since the
|
||||||
|
epoch), respectively.
|
||||||
|
|
||||||
This setting is optional; the default is '<%n-%d.%m.%y@I<YOURHOST>>'
|
This setting is optional; the default is '<%n-%d.%m.%y@I<YOURHOST>>'
|
||||||
where I<YOURHOST> is the fully qualified domain name (FQDN) of the
|
where I<YOURHOST> is the fully qualified domain name (FQDN) of the
|
||||||
|
|
Loading…
Reference in a new issue