Allow use of ~ in autoreply file

This commit is contained in:
Jamie Cameron
2025-07-10 04:40:22 -07:00
parent 0a0ad2f119
commit d8166e9a8e
2 changed files with 4 additions and 0 deletions

View File

@ -154,6 +154,9 @@ if ($header{'x-original-to'} && $rheader{'No-Forward-Reply'}) {
# Open the replies tracking DBM, if one was set
my $rtfile = $rheader{'Reply-Tracking'};
if ($rtfile) {
if ($rtfile =~ /^~/) {
$rtfile =~ s/^~/$ENV{'HOME'}/;
}
if ($rtfile !~ /^\//) {
$rtfile = $ENV{'HOME'}.'/'.$rtfile;
}

View File

@ -10,6 +10,7 @@ if (substr($in{'file'}, 0, length($access{'apath'})) ne $access{'apath'}) {
&error(&text('rfile_efile', $in{'file'}));
}
$in{'replies_def'} || $in{'replies'} =~ /^\/\S+/ ||
$in{'replies'} =~ /^~\/\S+/ ||
&error($text{'rfile_ereplies'});
$in{'period_def'} || $in{'period'} =~ /^\d+$/ ||
&error($text{'rfile_eperiod'});