3 # Called from a sendmail alias when an autoresponse arrives, as sent by the
7 require './status-lib.pl';
9 # read headers and body
12 if (/^(\S+):\s+(.*)/) {
21 if ($header{'subject'} =~ /TEST-(\S+)-(\S+)/) {
22 # Looks like a valid reply
23 local ($sserv, $sid) = ( $1, $2 );
24 $replies_file = "$module_config_directory/mailserver-replies";
25 &read_file($replies_file, \%replies);
26 local ($when, $got, $id) = split(/\s+/, $replies{$sserv});
28 # Got a reply to an outstanding email
30 $replies{$sserv} = "$when $now $id";
33 # Reply is to an email that is way out of date!
35 $replies_file =~ /^(.*)$/;
36 &write_file("$1", \%replies);
41 print STDERR "Only Mailserver Response auto-reply messages should be sent to this address\n";