From bbc36670f7c55a38974ff09c83bbb0703fcd38b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ask=20Bj=C3=B8rn=20Hansen?= Date: Wed, 21 Apr 2004 12:42:45 +0000 Subject: [PATCH] + Create temp files with permissions 0600 (thanks to Robert James Kaes again) + + Fix warning in check_badrcptto plugin (Thanks to Robert James Kaes) git-svn-id: https://svn.perl.org/qpsmtpd/trunk@230 958fd67b-6ff1-0310-b445-bb7760255be9 --- Changes | 5 +++++ lib/Qpsmtpd/Transaction.pm | 2 +- plugins/check_badrcptto | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/Changes b/Changes index 6b603aa..554458a 100644 --- a/Changes +++ b/Changes @@ -1,5 +1,10 @@ 0.28 + + Create temp files with permissions 0600 (thanks to Robert James Kaes again) + + Fix warning in check_badrcptto plugin (Thanks to Robert James Kaes) + Proper "Log levels" with a configuration option $Include feature in config/plugins diff --git a/lib/Qpsmtpd/Transaction.pm b/lib/Qpsmtpd/Transaction.pm index fbe54a2..5d7d4f1 100644 --- a/lib/Qpsmtpd/Transaction.pm +++ b/lib/Qpsmtpd/Transaction.pm @@ -81,7 +81,7 @@ sub body_write { -d $spool_dir or mkdir($spool_dir, 0700) or die "Could not create spool_dir: $!"; $self->{_filename} = $spool_dir . join(":", time, $$, $transaction_counter++); $self->{_filename} =~ tr!A-Za-z0-9:/_-!!cd; - $self->{_body_file} = IO::File->new($self->{_filename}, O_RDWR|O_CREAT) + $self->{_body_file} = IO::File->new($self->{_filename}, O_RDWR|O_CREAT, 0600) or die "Could not open file $self->{_filename} - $! "; # . $self->{_body_file}->error; } # go to the end of the file diff --git a/plugins/check_badrcptto b/plugins/check_badrcptto index e65c247..276015e 100644 --- a/plugins/check_badrcptto +++ b/plugins/check_badrcptto @@ -16,7 +16,7 @@ sub check_for_badrcptto { return (DENY, "mail to $bad not accepted here") if $bad eq $from; return (DENY, "mail to $bad not accepted here") - if substr($bad,0,1) eq '@' && $bad eq "@$host"; + if substr($bad,0,1) eq '@' && $bad eq "\@$host"; } return (DECLINED); }