[H-GEN] I hate SPAM - A solution
Michael Anthon
anthonm at tams.com.au
Fri May 8 03:34:25 EDT 1998
OK, I guess that could be considered useful information 8^)
I will also give an explanation in case anyone else wishes to do this
and can't figure it out (it took me a couple of hours, being a bit of a
novice with sendmail). Most of this process was gleaned from
http://www.glenns.org/sendmail.antispam.html
Ummm.. first you need this file
http://www.informatik.uni-kiel.de/%7Eca/email/rules/check.tar
That's got the hacks you need for sendmail (I am using 8.8.5). In
particular, you need to have the /usr/lib/sendmail-cf/hack/*.m4 files in
place.
Then create a directory /etc/mail and create 2 files in it "accept_ip"
and "relay_to"
accept_ip gets filled with dotted quad addresses (one per line) that you
are willing to relay mail FOR. These can be in the form w, w.x, w.x.y
or w.x.y.z, you can also create a file called accept_names and fill it
with names instead of IPs but that would depend on what you are trying
to achieve. I wanted to block everything but one domain (my home use
ISP, just in case their mail server dies) so I just used the IP method.
relay_to gets filled with domains (one perline) that you are willing to
relay TO. In my case, I just have "tams.com.au" since I don't want to
relay mail to anyone else.
OK, now you have to edit your mc file. Redhat comes pre-installed with
a sendmail.cf generated from redhat.cf. Following is my new tams.mc....
divert(-1)
include(`../m4/cf.m4')
define(`confDEF_USER_ID',``8:12'')
define(`SMART_HOST',`server.tams.com.au.')
OSTYPE(`linux')
undefine(`UUCP_RELAY')
undefine(`BITNET_RELAY')
HACK(use_ip, /etc/mail/accept_ip)
HACK(use_relayto, /etc/mail/relay_to)
HACK(check_rcpt4)
FEATURE(redirect)
FEATURE(always_add_domain)
FEATURE(use_cw_file)
FEATURE(local_procmail)
MAILER(procmail)
MAILER(smtp)
"server.tams.com.au" is my crappy MS Exchange Server. This machine will
now only accept mail from my LAN. The configuration now accepts mail
into the IPC (mail.tams.com.au) via sendmail which then forwards any
acceptable mail (ie *@tams.com.au) on to the "smart host"
server.tams.com.au. Outgoing mail is still sent directly from Exchange
Server.
Once you have your mc file, then you can do this.....
m4 /usr/lib/sendmail-cf/m4/cf.m4 /usr/lib/sendmail-cf/cf/tams.mc >
/etc/sendmail.cf
This creates the sendmail config file, then you can do
/etc/rc.d/init.d/sendmail.init stop
/etc/rc.d/init.d/sendmail.init start
Here endeth the lesson. I hope this is of some help to some other poor
*nix novices out there with their sendmail pants down around their
ankles......
Regards
Michael Anthon
TAMS Systems
On Friday, 8 May 1998 5:02, Michael Oliver [SMTP:sysgod at gate.net.au]
wrote:
> On Fri, 8 May 1998, Michael Anthon wrote:
>
> > Upon further investigation, I found a nice little web page that
explains
> > how to configure various mail servers to prevent relaying, which is
when
>
> and the URL is????
> ----------------------- HUMBUG General List
--------------------------------
> echo "unsubscribe general" | mail majordomo at humbug.org.au # To
Unsubscribe
----------------------- HUMBUG General List --------------------------------
echo "unsubscribe general" | mail majordomo at humbug.org.au # To Unsubscribe
More information about the General
mailing list