Hi Hanno,

> On Sat, 28 Mar 2009 08:20:53 +0800 (SGT)
> p...@sg.homeunix.com wrote:
>>      Basically i need to deny incoming connections from non-local
>> clients
>> based on whether they have authenticated or not. So if an external
>> sending server doesn't authenticate with us, he can't even send to
>> local recipient.
>>
>>      with my previous qmail installation i just needed to define
>> "REQUIRE_AUTH" in my tcprules file. just how do it do it with
>> qpsmtpd?
>
> Load the "check_relay" plugin and a plugin like this (before any other
> rcpt checking plugin)
>
> sub hook_rcpt {
>    my ($self, $qp, $recipient, @args) = @_;
>    # relay_client is true if a client has authed or set as
>    # relay client by the "check_relay" plugin.
>    return (DENY, "Sending host is not local or authed")
>      unless $self->qp->connection->relay_client;
>
>    return DECLINED;
> }
>
>       Hanno
>

Sorry, but i'm quite new to this. do i create a plugin eg. require_auth in
the plugins directory, copy and paste your code into it and load the
plugin in the peers/0 file? or what do i do?

Cheers,
Paul

Reply via email to