Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 10 May 1997 16:06:07 -0600 (MDT)
From:      John-David Childs <jdc@denver.net>
To:        Shawn Ramsey <shawn@luke.cpl.net>
Cc:        questions@FreeBSD.ORG
Subject:   Re: smtp server?
Message-ID:  <Pine.BSD/.3.91.970510155748.17429A-100000@milehigh.denver.net>
In-Reply-To: <Pine.BSF.3.95.970510131044.264A-100000@luke.cpl.net>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, 10 May 1997, Shawn Ramsey wrote:

> > http://spam.abuse.net/spam
> > http://www.informatik.uni-kiel.de/%7Eca/email/check.html#check_rcpt
> > 
> > 
> > Be prepared to deal with a lot of users who have multiple dialup accounts 
> > and/or access the net from work via a different provider ;(
> 
> It seems the solution at www.informatik.... will let you set it so you can
> relay only for who you want. Does anyone already have a sendmail.cf with
> this ruleset already set? I don't use/have a .mc file, and tried putting
> it directly into sendmail.cf, but get lots of errors. :(
> 

Here's a diff of my sendmail.cf with and without the HACKS from 
www.informatik (note that I didn't put the {LocalIP, RelayTO, 
LocalNames, JUNK} files in the "standard" places):


78a80,103
> #####  @(#)use_ip.m4	1.0 (Claus Assmann) 1996-11-23  #####
> 
> 
> 
> 
> #####  @(#)use_relayto.m4	1.0 (Claus Assmann) 1996-11-23  #####
> 
> 
> 
> #####  @(#)use_names.m4	1.0 (Claus Assmann) 1996-11-23  #####
> 
> 
> 
> 
> #####  @(#)check_mail.m4	2.0 (Claus Assmann) 1997-03-23  #####
> 
> 
> 
> 
> 
> #####  @(#)check_rcpt4.m4	2.3 (Claus Assmann) 1997-03-16  #####
> 
> 
> 
158a184,198
> # file containing IP numbers of machines which can use our relay
> F{LocalIP} /etc/adm/mail/mailip
> 
> # file containing names we relay to
> F{RelayTo} /etc/adm/mail/mailrelayto
> 
> # file containing names of machines which can use our relay
> F{LocalNames} /etc/adm/mail/mailnames
> 
> # file containing full e-mail addresses of well-known spammers:
> # spammer@address.domain SPAMMER
> # or junk domain:
> # junk.domain JUNK
> Kjunk btree /etc/adm/mail/junk
> 
533a574,576
> 
> 
> 
785a829,883
> 
> 
> 
> # check for junk domain/spammers
> Sjunk
> # lookup domain in database
> R$*<@$+>$*		$:$1<@$(junk $2$)>$3
> # exists? return
> R$*<@JUNK>$*		$@$1<@JUNK>$2
> # lookup address in database
> R$*<@$+>$*		$:$1<@$(junk $1@$2 $:$2$)>$3
> # exists? return
> R$*<@SPAMMER>$*		$@$1<@SPAMMER>$2
> # mv one subdomain in front, try again
> R$*<@$-.$-.$+>$*	$: $2<@> $>junk $1<@$3.$4>$5
> # undo damage
> R$*<@>$*<@$+>$*		$2<@$1.$3>$4
> 
> Scheck_mail
> # don't check these
> R<$*@$=w>	$@ ok			shortcut
> R$*		$: $>3 $1			canonify
> R$-		$@ ok				local host
> # no host without a . in the FQHN ?
> R$*<@$->$*	$#error $@ 5.1.8 $: 518 invalid host name $2, check your configuration.
> # this is dangerous! no real name
> # R$*<@$*$~P>$*	$#error $@ 4.1.8 $: 418 unresolvable host name $2$3, check your setup.
> # now remove the dot
> R$*<@$*.>$*	$: $1<@$2>$3
> # and check the database
> R$*<@$*>$*	$: $>junk $1<@$2>$3
> R$*<@$*JUNK>$*	$#error $@ 5.7.1 $: "571 This domain is banned, contact your local admin." 	go away
> R$*<@$*SPAMMER>$*	$#error $@ 5.7.1 $: "571 You are banned, contact your local admin." 	go away
> 
> 
> 
> Scheck_rcpt
> # first: get client address
> R$+			$: $(dequote "" $&{client_addr} $) $| $1
> R0 $| $*		$@ ok		client_addr is 0 for sendmail -bs
> R$={LocalIP}$* $| $*	$@ ok		from here
> # next: get client name
> R$* $| $+		$: $(dequote "" $&{client_name} $) $| $2
> R $| $*			$@ ok		no client name: directly invoked
> #R$- $| $*		$@ ok		for those without full DNS...
> R$*$=w $| $*		$@ ok		from here
> R$*$={LocalNames} $| $*	$@ ok		from allowed system
> # now check other side
> R$* $| $*		$: $>3 $2
> # remove RelayTo part (maybe repeatedly)
> R$*<@$*$={RelayTo}.>$*		$>3 $1 $4
> # remove local part (maybe repeatedly)
> R$*<@$=w.>$*		$>3 $1 $3
> # still something left?
> R$*<@$+>$*		$#error $@ 5.7.1 $: 571 we do not relay



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSD/.3.91.970510155748.17429A-100000>