[Raw Msg Headers][Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: restricted relaying

On Wed, Dec 01, 1999 at 05:53:20PM +0100, E.Colanski wrote:
> Nobody answered me but I need immediate answer. So I resend it.
> How to set up in zmailer 2.99.51, that my gateway accepts messages from
> ONE given IP in internet in two cases:
> -when sender is from my domain, no matter of receiver
> -when receiver is from my domain, no matter of sender

  Your question isn't very clear..

  Have you, by change, read  doc/guides/smtp-policy  ???

> Setting in smtp-policy.dat
> x.x.x.x/32        relaycustnet +
> causes relaying all post from this host with no matter of sender and
> receiver addresses

  Don't place things directly to generated  smtp-policy.dat
  (nor smtp-policy.src) Use  $MAILBIN/policy-builder.sh  script.

  The   policy-builder.sh  script has following fragment:

  # smtp-policy.relay
  # (Lists NETWORKS (NO DOMAINS!) that are allowed to use us as relay)
  # (well, actually it could also list e.g.: ".our.domain" if it would
  #  be fine to allow relaying from anybody whose IP address reverses to
  #  domain suffix ".our.domain")
  if [ -f smtp-policy.relay ] ; then
    cat smtp-policy.relay | \
    awk '/^#/{next;}
	{printf "%s  %s %s %s %s %s %s %s %s = _full_rights\n",$1,$2,$3,$4,$5,$6,$7,$8,$9;next;}'

  That is, macro '_full_rights' carries bulk of the setup flags,
  but others can be added as well.

> I'll appreciate quick answer.
> E.Colanski

/Matti Aarnio	<mea@nic.funet.fi>