On Tue, 23 Jan 2001, Dave Sill wrote:

> Here's a possible fix. In control/virtualdomains:
> 
>   [0.0.0.0]:alias-devnull
> 
> And in ~alias/.qmail-devnull-default
> 
>   #
> 
> Which should throw away all mail to MX's resolving to 0.0.0.0.

My tests show that that won't work:

echo "[0.0.0.0]:alias-devnull" > /tmp/vd
cat /tmp/vd /var/qmail/control/virtualdomains > /tmp/nvd
cp /tmp/nvd /var/qmail/control/virtualdomains
chmod 644 /var/qmail/control/virtualdomains
echo # > ~alias/.qmail-devnull
chmod 644 ~alias/.qmail-devnull
killall -HUP qmail-send
/var/qmail/bin/qmail-remote \[0.0.0.0\] [EMAIL PROTECTED] [EMAIL PROTECTED] << EOF
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: testing

hello
EOF

qmail-remote returns with

    rK0.0.0.0 accepted message.
    Remote host said: 250 Message accepted for delivery

and the qmail log shows

980273407.745867 new msg 1112229
980273407.746179 info msg 1112229: bytes 366 from <[EMAIL PROTECTED]>
    qp 8502 uid 8
980273407.751043 starting delivery 62: msg 1112229 to remote
    [EMAIL PROTECTED]
980273407.751057 status: local 0/10 remote 1/20
980273467.837834 delivery 62: success:
    209.217.125.238_accepted_message./Remote_host_said:_250_ok_980273466_qp_26250/
980273467.837854 status: local 0/10 remote 0/20
980273467.837860 end msg 1112229

Because 0.0.0.0 is not mentioned in the envelope RCPT TO header, the
virtualdomain rule does not apply.

-- 
Regards
Peter
----------
Peter Samuel                            [EMAIL PROTECTED]
http://www.e-smith.org (development)    http://www.e-smith.com (corporate)
Phone: +1 613 368 4398                  Fax: +1 613 564 7739
e-smith, inc. 1500-150 Metcalfe St, Ottawa, ON K2P 1P1 Canada

"If you kill all your unhappy customers, you'll only have happy ones left"

Reply via email to