1 diff -urN smtpprox-1.2/MSDW/SMTP/Server.pm smtpprox-1.2-fixed/MSDW/SMTP/Server.pm
2 --- smtpprox-1.2/MSDW/SMTP/Server.pm 2003-03-09 13:52:24.000000000 -0500
3 +++ smtpprox-1.2-fixed/MSDW/SMTP/Server.pm 2007-01-18 13:27:44.000000000 -0500
5 package MSDW::SMTP::Server;
8 +use File::Temp qw(mkstemp);
13 return 0 unless defined($_ = $self->getline);
16 - if (s/^helo\s+//i) {
17 + if (s/^(helo|ehlo)\s+//i) {
20 + } elsif (s/^xforward\s*//i) {
21 + my (@attr) = split(/\s+/, $_);
23 + foreach $attr (@attr) {
24 + my ($name, $value) = ($attr =~ /^(.*?)=(.*)$/);
25 + $self->{xforward}->{lc($name)} = $value;
27 } elsif (s/^rset\s*//i) {
30 delete $self->{recipients};
31 + delete $self->{xforward};
32 } elsif (s/^mail\s+from:\s*//i) {
36 $self->{data}->seek(0, 0);
37 $self->{data}->truncate(0);
39 - $self->{data} = IO::File->new_tmpfile;
40 + (undef, $self->{datafilename}) = mkstemp("/tmp/smtpproxXXXXXX");
41 + $self->{data} = new IO::File $self->{datafilename}, "r+";
43 while (defined($_ = $self->getline)) {