On 7 Nov 2003, at 15:04, Keith C. Ivey wrote:

Matt Sergeant <[EMAIL PROTECTED]> wrote:

The current check for whether a client can relay or not is all
in code in check_relay (I extended this to support config files
as well as %ENV, because %ENV won't work with the SelectServer
code). I realised that this code could probably be better placed
in the Connection class.

It seems that the check varies enough for different systems that leaving it in a plugin might make sense. Then again, maybe the variable things, like different ways of allowing SMTP after POP, are normally in separate plugins anyway.

Currently I'm using the whitelist plugin and a modified
allow_smtp_after_pop (with relay-ctrl) that sets the
'whitelist' note to allow people to relay by bypassing
check_relay.  But there's probably a better way.

OK, another option (and actually how I've implemented it in a patch here) is to have a relayclient() method in Connection which is a getter/setter. So the check_relay plugin just sets a true value in there. Then other plugins can easily check if the client was allowed to relay. The only downside of that is that check_relay isn't called until RCPT TO, so you can't check it prior to that.


Matt.



Reply via email to