*BSD News Article 35922


Return to BSD News archive

Path: sserve!newshost.anu.edu.au!harbinger.cc.monash.edu.au!msuinfo!agate!howland.reston.ans.net!gatech!purdue!mozo.cc.purdue.edu!staff.cc.purdue.edu!bj
From: bj@staff.cc.purdue.edu (Ben Jackson)
Newsgroups: comp.os.386bsd.apps
Subject: Re: Sendmail and Term
Date: 18 Sep 1994 02:34:12 GMT
Organization: Purdue University
Lines: 43
Message-ID: <35g8v4$gce@mozo.cc.purdue.edu>
References: <35fqm0$8un@organpipe.uug.arizona.edu>
NNTP-Posting-Host: staff.cc.purdue.edu

In article <35fqm0$8un@organpipe.uug.arizona.edu>,
John Galbraith <john@helios.ece.arizona.edu> wrote:
>I am wondering if it is possible to get sendmail to queue up mail 
>generated on a FreeBSD machine and pass it on to an internet host via a 
>Term connection when available.

Yes, it's possible.  In fact, I do it!  The only change my sendmail.cf
needed was in the smtp, esmtp and relay mailer spcifications.  These
are stanzas that start with `M' in the first column.  Look for
`Msmtp'.  Normally there is a specification (it must be the last one)
that looks like `A=IPC $h', which says "try to use the internal
smtp-over-tcp mta to host $h".  The rewriting rules will set $h to the
destination host or it's mail transfer machine.  If you change this to
`A=IPC 127.0.0.1 40025', that will cause all mail to be delivered to
localhost:40025, where sendmail will expect to find something capable
of speaking SMTP (typically another sendmail).  So you use `tredir
40025 25' and that port will be your remote term host's sendmail, which
will handle forwarding the mail for you.  If you term connection is
down, your local sendmail will hold the outgoing messages until the
next queue run (usually set to every 30m on the command line -- check
/etc/netstart).

If you want to generate valid return addresses, you may also need to
set `DMsome.place.dom'.  That is the name of the host you want to
"masquerade" as.  Outgoing mail will be from user@some.place.dom.  You
probably have a line with just `DM' on it now, which means "don't
masquerade".  Just append the domain you want to this line.  If your
usernames aren't deliverable in the "real world" you will need to set
Reply-To's, which is less than ideal.

After you make these changes, sending a HUP to sendmail should cause it
to reread sendmail.cf.

>Retreiving mail from the internet host is really easy.  All that has to
>be done is the mail spool file has to be downloaded and appended to the
>local FreeBSD spool file.  This works fine, because you don't have to
>mess with sendmail.

You can also do it with more sendmail tricks on the remote side, or as
a user by using a pipe-forward in your .forward (which I do).

--
Ben Jackson