qpsmtpd currently accepts <""@domain.name> as a recipient address, and
(unless rejected for some other reason) will queue to @domain.name.
I don't think conforms with RFC2821, and I don't think it's ever needed.
This patch to check_badrcptto would fix:
sub hook_rcpt {
my ($self, $transaction, $recipient, %param) = @_;
+ return Qpsmtpd::DSN->no_such_user("recipient address must include local
part")
+ unless $recipient->user;
While we're looking at that plugin, I have a couple of other suggested
changes (for clarity and efficiency):
--- 0.42rc1/plugins/check_badrcptto.orig 2007-10-18 12:09:16.000000000
-0400
+++ 0.42rc1/plugins/check_badrcptto 2007-10-18 12:13:38.000000000 -0400
@@ -1,19 +1,21 @@
-# this plugin checks the badrcptto config (like badmailfrom for rcpt address)
+# this plugin checks the badrcptto config (like badmailfrom for sender address)
use Qpsmtpd::DSN;
sub hook_rcpt {
my ($self, $transaction, $recipient, %param) = @_;
+ return Qpsmtpd::DSN->no_such_user("recipient address must include local
part")
+ unless $recipient->user;
my @badrcptto = $self->qp->config("badrcptto") or return (DECLINED);
return (DECLINED) unless $recipient->host && $recipient->user;
my $host = lc $recipient->host;
- my $from = lc($recipient->user) . '@' . $host;
+ my $to = lc($recipient->user) . '@' . $host;
for my $bad (@badrcptto) {
$bad = lc $bad;
$bad =~ s/^\s*(\S+)/$1/;
return Qpsmtpd::DSN->no_such_user("mail to $bad not accepted here")
- if $bad eq $from;
+ if $bad eq $to;
return Qpsmtpd::DSN->no_such_user("mail to $bad not accepted here")
- if substr($bad,0,1) eq '@' && $bad eq "[EMAIL PROTECTED]";
+ if $bad eq "[EMAIL PROTECTED]";
}
return (DECLINED);
}