On Wed, 4 Nov 2009, Filippo Carletti wrote:

In sme server we have some email aliases defined as visible=internal,
that is internal users (relayclients) could write to them, but from
outside the lan (non relay clients) the email address is not reachable
(non existent).

I don't think this is the correct way to implement that feature. What this patch says is to ignore badrcptto for relay clients. What you really want is a different set of valid local recipients for relay clients. The set of valid local recipients is being checked by a different plugin.

(http://github.com/filippocarletti/qpsmtpd/blob/0c8c3fbd4a79d4ef3536ff90e3bb1595bbad0fe9/packaging/rpm/files/qpsmtpd-0.40-badrcptto_allowrelay.patch)

--- qpsmtpd-0.40/plugins/check_badrcptto.badrcptto_allowrelay   2007-06-14
11:57:24.000000000 -0600
+++ qpsmtpd-0.40/plugins/check_badrcptto        2007-06-14 13:26:42.000000000 
-0600
@@ -3,6 +3,7 @@

sub hook_rcpt {
  my ($self, $transaction, $recipient, %param) = @_;
+  return (DECLINED) if $self->qp->connection->relay_client;
  my @badrcptto = $self->qp->config("badrcptto") or return (DECLINED);
  return (DECLINED) unless $recipient->host && $recipient->user;
  my $host = lc $recipient->host;



Reply via email to