projects
/
webmin.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a367822
)
Added an option to set the date range for which autoreplies are sent
author
Jamie Cameron
<jcameron@webmin.com>
Sat, 14 Jul 2007 18:52:55 +0000
(18:52 +0000)
committer
Jamie Cameron
<jcameron@webmin.com>
Sat, 14 Jul 2007 18:52:55 +0000
(18:52 +0000)
sendmail/autoreply.pl
patch
|
blob
|
history
diff --git
a/sendmail/autoreply.pl
b/sendmail/autoreply.pl
index
37defdb
..
839f745
100755
(executable)
--- a/
sendmail/autoreply.pl
+++ b/
sendmail/autoreply.pl
@@
-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'}),