Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 27 Feb 2003 00:11:24 +0200
From:      Giorgos Keramidas <keramida@ceid.upatras.gr>
To:        Andreas Wider?e Andersen <awand@pragma.no>
Cc:        freebsd-questions@FreeBSD.ORG
Subject:   Re: proto.m4 file (Sendmail on FreeBSD)
Message-ID:  <20030226221124.GA78804@gothmog.gr>
In-Reply-To: <5.2.0.9.0.20030226082140.00b4bdb0@mail.pragma.no>
References:  <5.2.0.9.0.20030226082140.00b4bdb0@mail.pragma.no>

next in thread | previous in thread | raw e-mail | index | archive | help
On 2003-02-26 09:34, Andreas Wider?e Andersen <awand@pragma.no> wrote:
> I got Sendmail 8.12.6/8.12.7 on my FreeBSD 4.7 STABLE system and
> I've recently been working with it to stop spam coming through to my
> email users. I've added several "FEATURES" in the freebsd.mc file
> and compiled a new sendmail.cf file which works pretty
> good. However, I'm seeing more and more of lines in my maillog like
> the line below:
>
> Feb 26 09:13:00 myserver sendmail[52405]: h1Q8CxZw052405:
>     <g3mek@mydomain.com>... User unknown
> Feb 26 09:13:00 myserver sendmail[52405]: h1Q8CxZw052405:
>     from=<>, size=3411, class=0, nrcpts=0, proto=ESMTP, daemon=MTA,
>     relay=mxo1.vol.cz [195.250.128.76]

What you're seeing is okay.  Spammers try to harvest addresses by
connecting to your mail server and testing if delivery to certain
usernames is allowed, or even if the can relay mail through you.

I'd block them with FEATURE(access_db) if I were you.

You should read the file /usr/share/sendmail/cf/README.  Especially
the part that describes "access_db" and "confPRIVACY_FLAGS".

> My question is, where should I put this in in my proto.m4 file? The
> file is rather large and I really don't know where.

Nowhere.  Don't blindly make changes to .m4 files, without
understanding what's going on.  You'll break your mail server,
very very soon.

> Also, there are 2 proto.m4 files:
>
> /usr/share/sendmail/cf/m4/proto.m4
> /usr/src/contrib/sendmail/cf/m4/proto.m4
>
> Which one should I edit & use?

None of these.  Leave them be.

> When I'm compiling up a new sendmail.cf file I do this:
>
> cp /etc/mail/sendmail.cf /etc/mail/sendmail.cf.orig
> cd /usr/src/etc/sendmail
> cp freebsd.mc freebsd.mc.orig
> [edit freebsd.mc]
> make freebsd.cf
> make freebsd.cf install
> cd /usr/obj/usr/src/etc/sendmail/
> cp freebsd.cf /etc/mail/sendmail.cf
> killall -1 sendmail

You should use the rules of the /etc/mail/Makefile.  Just copy
/etc/mail/freebsd.org to /etc/mail/myhostname.mc and make your
local changes ONLY to myhostname.mc.

Then generate myhostname.cf and submit.cf:

	# make

Then savee a backup copy of your existing sendmail.cf file and install
the new files as sendmail.cf and submit.cf in /etc/mail:

	# cp sendmail.cf sendmail.cf.bak
	# make install

and restart Sendmail.

	# make restart

.

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030226221124.GA78804>