John Peacock wrote:
Gavin Carr wrote:

There's already code for this inside denysoft_greylist(), but it's using
the old $ENV{RELAYCLIENT} instead of $self->qp->connection->relay_client,
so you should probably just change it there.

Can one of the committers fix that in svn too?


Done. I still think it is probably better to have a single rcpt plugin which will perform all of the constant tests and just shortcircuit the other rcpt plugins (rather than changing each one as it comes up). I may have a few moments to test this later this week (no promises)...

I went the opposite route from what I think you're suggesting. Currently, the check_relay checks for both relaying clients and rcpt hosts. I split the existing check_relay plugin into "set_relay", and "check_rcpthosts". The "set_relay" is the very first plugin to fire, setting relay_client (or not) if $ENV{RELAYCLIENT} exists (as I'm using tcpserver). This allows me to put "return declined"s into plugins if the relay_client is set (for example, I don't bother to do the check_earlytalker if it's a relay client.)

I also did it because I differentiate between a local address and a rcpt address. First, I check against LDAP in a separate plugin to see if it's a valid local address, and 'return deny' if it's not. The "check_rcpthosts" is only for the domains which I am secondary MX for (those in rcpthosts.)

Could we add that differentiation into qpsmtpd? Perhaps something to say that the SMTP server is authoritative for the domain? For example:

$self->qp->connection->local_account
$self->qp->connection->local_recipient

Or something along those lines? That doesn't quite encompass what I would like, though. Right now I'm using:

$self->qp->connection->notes('islocal')

In order to identify domains for which qpsmtpd is authoritative. Does any of this make sense? Does it make sense to break apart the check_relay plugin into its two (or three) separate functions?

Reply via email to