*BSD News Article 79185


Return to BSD News archive

Path: euryale.cc.adfa.oz.au!newshost.carno.net.au!harbinger.cc.monash.edu.au!munnari.OZ.AU!news.mel.connect.com.au!news.mira.net.au!pumpkin.pangea.ca!eru.mt.luth.se!www.nntp.primenet.com!nntp.primenet.com!howland.erols.net!newsfeed.internetmci.com!in1.uu.net!news.gtn.com!klemm.gtn.com!usenet
From: andreas@klemm.gtn.com (Andreas Klemm)
Newsgroups: comp.unix.bsd.freebsd.misc
Subject: Re: UUCP mail problems
Date: 25 Sep 1996 08:30:48 GMT
Organization: FreeBSD makes fun
Lines: 186
Message-ID: <52aqjo$nu@klemm.gtn.com>
References: <51es65$bk9@fountain.mindlink.net>
NNTP-Posting-Host: klemm.gtn.com
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-Newsreader: knews 0.9.8
To: ddunlop@redpoint.com

[Posted and mailed]

In article <51es65$bk9@fountain.mindlink.net>,
	ddunlop@redpoint.com (Don Dunlop) writes:
> I have a small internal IP network that I use mainly as a hobby
> system.  On my FreeBSD box I have set up uucp to connect with my ISP
> and download news and mail.  This works fine.  The mail comes in and I
> can then connect to the POP3 server on the FreeBSD box and getmy mail.
> 
> Problem is getting it to go the other way.  At this point I am just
> trying to use PINE to generate e-mail trhough a telnet session on the
> FreeBSD system and have it send that out via uucp.  This does not work
> and I now have no idea where to look to get it to go.
> 
> What I need to know is this:
> 
> How do I set up the FreeBSD system so that it will send mail out to
> the Internet via the UUCP connection?
> 
> Can anyone point me in the right direction for this?
> 
> Please e-mail replies to ddunlop@redpoint.com if possible.


You have to configure your mail transport agent -> sendmail.
Sendmail 8.7 is easy to configure, since you only need a 
master config file, where you declare the wanted features, that
you need and via 'make' the creating of a custom sendmail.cf file
is automated.

Here is my klemm.mc file, call it at your site simply redpoint.mc
and move it to /usr/src/usr.sbin/sendmail/cf/cf (yes, you have
to install the sendmail sources, I think in 2.1.5 you could choose
to install the cf files only)

Type 'make redpoint.cf' in this directory and move the file
to /etc/sendmail.cf.

Test the delivery of mail to your ISP (internet service provider)
with sendmail's address test mode:

sendmail -bt
> 3,0 foo@bar.com

The output might be similar to that ... then everything is fine.

root{1006} ~ sendmail -bt
ADDRESS TEST MODE (ruleset 3 NOT automatically invoked)
Enter <ruleset> <address>
> 3,0 foo@bar.com
rewrite: ruleset  3   input: foo @ bar . com
rewrite: ruleset 96   input: foo < @ bar . com >
rewrite: ruleset 96 returns: foo < @ bar . com >
rewrite: ruleset  3 returns: foo < @ bar . com >
rewrite: ruleset  0   input: foo < @ bar . com >
rewrite: ruleset 98   input: foo < @ bar . com >
rewrite: ruleset 98 returns: foo < @ bar . com >
rewrite: ruleset 95   input: < uucp-dom : easix > foo < @ bar . com >
rewrite: ruleset 95 returns: $# uucp-dom $@ easix $: foo < @ bar . com >
rewrite: ruleset  0 returns: $# uucp-dom $@ easix $: foo < @ bar . com >

uucp-dom and related things are all well documented in the README
file /usr/src/usr.sbin/sendmail/cf/README

Here my mc file, that of course needs fine tuning....
My hostname is klemm.gtn.com, my e-mail domain is
klemm.gtn.com ... easix is the uucp name of the mail
exchanging host of my ISP

local_procmail is only needed, if you intend to use
procmail as your local e-mail delivery program.

To integrate it into sendmail has the advantage, that every
user immediately is able to use procmails filter capabilities
via a $HOME/.procmailrc file, for example to filter out
commercial e-mail spammers....

The cw file is only needed in the case, that your site had
another name in former times, so that sendmail accepts
those other names in incoming e-mails, look here:

localhost
knobel
knobel.gun.de
knobel.knirsch.de
knobel.UUCP
knobel-ip
knobel-ip.gun.de
mailhost
klemm
klemm.gtn.com

an /etc/service.switch file with the contents:
hosts	files
is needed to force sendmail, not to dialout for name resolving,
in case you have a on demand dialup ppp connection to your ISP
as well. the feature nodns wasn't enough for me in the past.

Good luck.


divert(-1)

include(`../m4/cf.m4')
VERSIONID(`@(#)knobel.mc 1.1 (AKL) 20/03/96')

OSTYPE(bsd4.4)dnl
Dmklemm.gtn.com
define(`confDOMAIN_NAME', `$m')dnl
MASQUERADE_AS(klemm.gtn.com)dnl
define(`UUCP_MAX_SIZE', 2000000)dnl
define(`SMART_HOST', `uucp-dom:easix')dnl
define(`UUCP_RELAY', `uucp-dom:easix')dnl

FEATURE(nodns)dnl
FEATURE(nocanonify)
FEATURE(use_cw_file)
FEATURE(always_add_domain)
FEATURE(masquerade_envelope)
FEATURE(local_procmail)

MAILER(local)dnl
MAILER(smtp)dnl
MAILER(uucp)dnl


BTW: here is my actual .procmailrc file, that blovks e-mail
spammers ;-))

$HOME/.procmailrc

# Please check if all the paths in PATH are reachable, remove the ones that
# are not.

PATH=/bin:/usr/bin:/usr/local/bin:/home/andreas/bin:/usr/sbin:/sbin:.

DEFAULT=/var/mail/andreas	# my incoming mail folder

MAILDIR=$HOME/Mail		# You'd better make sure it exists
				# We don't use a global lockfile here now.
				# Instead we use local lockfiles everywhere.
				# This allows mail to arrive in all mailboxes
				# concurrently, or allows you to read one 
				# mailbox while mail arrives in another.

:0 c
* ^From.*gherrera@netcom.com
* ^From.*jobs@enginet.com
* ^From.*hnet@dialup.francenet.fr
* ^From.*@.*cyberpromo.com
* ^From.*office@phoenix.at
* ^From.*ACE@pwrnet.com
* ^From.*@.*interramp.com
* ^From.*staff@cvcom.com
* ^From.*AAI@Business.Israel.Net
* ^From.*postmaster@ssltd.com
* ^From.*mail26045@pop.net
* ^From.*amazing@telysis.com
* ^From.*hotline@tcac.com
* ^From.*hotlinecy@aol.com
* ^From.*username@odin.tcac.com
* ^From.*fletel@fletel.stargate.co.uk
* ^From.*uk0@jupiter.stargate.co.uk
* ^From.*@great-place.com
* ^From.*jlharden@digital.net
* ^From.*revol@ccibsd.cci-internet.COM
* ^From.*\.\.\.@ccibsd.cci-internet.COM
* ^From.*@.*honeys.com
* ^From.*@.*answerme.com
* ^From.*@.*netfree.com
* ^From.*@.*servint.com
{
	EXITCODE=77
}

# Anything that has not been delivered by now will go to $DEFAULT



	Andreas ///
	
-- 
andreas@klemm.gtn.com         /\/\___      Wiechers & Partner Datentechnik GmbH
   Andreas Klemm          ___/\/\/         Support Unix -- andreas.klemm@wup.de
pgp p-key  http://www-swiss.ai.mit.edu/~bal/pks-toplev.html  >>> powered by <<<
ftp://sunsite.unc.edu/pub/Linux/system/Printing/aps-491.tgz  >>>    FreeBSD <<<