Added an option to set the date range for which autoreplies are sent

This commit is contained in:
Jamie Cameron
2007-07-14 18:52:55 +00:00
parent a367822eca
commit ff60b38cf2

View File

@@ -60,6 +60,13 @@ if ($header{'from'} =~ /postmaster|mailer-daemon/i) {
exit 0;
}
# Check if we are within the requested time range
if ($header{'Autoreply-Start'} && time() < $header{'Autoreply-Start'} ||
$header{'Autoreply-End'} && time() > $header{'Autoreply-End'}) {
# Nope .. so do nothing
exit 0;
}
# work out the correct to address
@to = ( &split_addresses($header{'to'}),
&split_addresses($header{'cc'}),