On Tue, 19 Nov 2002 03:03:38 +1100, Rasjid Wilcox <[EMAIL PROTECTED]> wrote:
>
> I installed mailfront 0.81 on SME 5.5 and gave it a test. It does not quite
> do what I would expect. In detail:
>
> # rpm -Uvh mailfront-0.81-1.i386.rpm
> # touch /etc/mailrules
> # echo "/etc/mailrules" > /service/smtpfront-qmail/env/MAILRULES
>
> Edit /etc/mailrules to:
> k*:[EMAIL PROTECTED]
> d*:*:There is no mailbox for that user here.
>
> Result: All mail is rejected, even stuff address to
> [EMAIL PROTECTED] The d*:* trumps the
> k*:[EMAIL PROTECTED]
(Darrell May also reported this to [EMAIL PROTECTED])
It looks like you're getting caught by some slightly nonintuitive
behavior in smtpfront's mailrules parsing.
The mailrules docs note that
Rules with a recipient pattern of * will be tested when the client
transmits the sender address. Otherwise rules are be tested when the
client transmits the recipient address.
so a "*:*" rule will always deny everything, since sender address
comes before recipient address(es) in the SMTP transaction. It's
*very* specific about that:
if (r->recipient.pattern.len == 1 && r->recipient.pattern.s[0] ==
'*') {
[ apply sender rule ]
}
In other words, there are "compare to sender" rules and "compare to
recipient" rules, and the "*" recipient means that that rule is a
"compare to sender" rule even if "compare to recipient" rules come
before it in the file.
To avoid that, use a recipient pattern that matches everything but
that is not "*". I suspect a recipient pattern of "*@*" will let
you do a "match everything that hasn't matched anything else" rule.
Cheers,
-Rich
--
------------------------------ Rich Lafferty ---------------------------
Systems Administrator/Support Engineer, Network Server Solutions Group
Mitel Networks, Ottawa, ON +1 613 592 2122 (x2513)
-------------------------- [EMAIL PROTECTED] --------------------
--
Please report bugs to [EMAIL PROTECTED]
Please mail [EMAIL PROTECTED] (only) to discuss security issues
Support for registered customers and partners to [EMAIL PROTECTED]
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Searchable archive at http://www.mail-archive.com/devinfo%40lists.e-smith.org