[Mimedefang] Rejecting mail only for non-authenticated users?
Ron Wilhoite
ronw at bals.org
Tue Aug 21 06:18:31 EDT 2007
On 08/21/2007 04:54 AM Andy Lyttle wrote:
> Hi all,
>
> I've got some great custom rules developed to reject messages based on
> the sender's IP address (or reverse DNS hostname). I put these in
> filter_relay, and they're working great. But then I realized... I use
> the same server to handle incoming e-mail from other servers on port 25,
> and authenticated e-mail from my users on port 587 (sent with encryption
> and authentication). If one of my users happens to be connecting from
> an IP address I don't want to accept spam from, how can I determine
> whether I'm dealing with an authenticated user or not?
>
> I'm assuming this can't be done from filter_relay, but I'd be happy to
> move the code to filter_recipient if I can do it from there. The
> important thing is that I want to reject the connection before receiving
> the DATA.
I have this in filter_sender before various helo checks and hostname
checks, faked country name checks, etc., for the reason you mentioned -
roaming users:
read_commands_file();
if ($SendmailMacros{'auth_authen'}) {
return ('CONTINUE', 'ok');
}
Ron Wilhoite
More information about the MIMEDefang
mailing list