ALT Linux repos
S: | 8.18.0-alt0.Alpha2 |
5.0: | 8.14.3-alt3 |
4.1: | 8.14.4-alt0.M41.1 |
4.0: | 8.14.4-alt0.M40.1 |
3.0: | 8.13.4-alt3 |
+updates: | 8.13.8-alt1.M30.1 |
Group :: System/Servers
RPM: sendmail
Main Changelog Spec Patches Sources Download Gear Bugs and FR Repocop
Patch: sendmail-contrib-expn.pl-tempfile.patch
Download
Download
--- sendmail-8.14.3/contrib/expn.pl.old 2003-04-15 21:59:50 +0500
+++ sendmail-8.14.3/contrib/expn.pl 2008-09-25 20:48:09 +0500
@@ -99,6 +99,8 @@
# $levels : -1
# $S : the socket connection to $server
+chop($TEMPFILE = `mktemp`);
+
$have_nslookup = 1; # we have the nslookup program
$port = 'smtp';
$av0 = $0;
@@ -402,7 +404,7 @@
for $f (sort @final) {
print "$f\n";
}
-unlink("/tmp/expn$$");
+unlink("$TEMPFILE");
exit(0);
@@ -1000,13 +1002,13 @@
}
$0 = "$av0 - nslookup of $server";
- sysopen(T,"/tmp/expn$$",O_RDWR|O_CREAT|O_EXCL,0600) || die "open > /tmp/expn$$: $!\n";
+ sysopen(T,$TEMPFILE,O_RDWR|O_CREAT|O_EXCL,0600) || die "open > $TEMPFILE: $!\n";
print T "set querytype=MX\n";
print T "$server\n";
close(T);
$cpref = 1.0E12;
undef $nserver;
- open(NSLOOKUP,"nslookup < /tmp/expn$$ 2>&1 |") || die "open nslookup: $!";
+ open(NSLOOKUP,"nslookup < $TEMPFILE 2>&1 |") || die "open nslookup: $!";
while(<NSLOOKUP>) {
print if ($debug > 2);
if (/mail exchanger = ([-A-Za-z_.0-9+]+)/) {
@@ -1037,7 +1039,7 @@
}
close(NSLOOKUP);
- unlink("/tmp/expn$$");
+ unlink($TEMPFILE);
unless ($nserver) {
$0 = "$o0 - finished mxlookup";
return 0 unless $lastchance;