From owner-freebsd-questions Tue Oct 12 6: 6:49 1999 Delivered-To: freebsd-questions@freebsd.org Received: from mailhost.criterion.canon.co.uk (mailhost.criterion.canon.co.uk [194.223.249.254]) by hub.freebsd.org (Postfix) with ESMTP id 4055815771 for ; Tue, 12 Oct 1999 06:06:31 -0700 (PDT) (envelope-from adamn@csl.com) Received: from csl.com (hermes.criterion.canon.co.uk [194.223.249.13]) by mailhost.criterion.canon.co.uk (8.8.8/8.7.3) with ESMTP id NAA20178; Tue, 12 Oct 1999 13:53:08 +0100 (BST) Message-ID: <380331A8.B6DF5B07@csl.com> Date: Tue, 12 Oct 1999 14:03:36 +0100 From: Adam Nealis Organization: Criterion Software, Ltd. X-Mailer: Mozilla 4.6 [en] (X11; I; Linux 2.0.34 i686) X-Accept-Language: en MIME-Version: 1.0 To: David May Cc: questions@FreeBSD.ORG Subject: Re: [Q] Sendmail configuration question. References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG David May wrote: > > I want to set up a special sendmail server configuration > but so far have not been successful. I hope someone might > be able to give me some tips here or some suitable > sendmail configuration for a similar setup. > > What I am trying to do is set up sendmail on a dual homed > host to receive and send mail from the outside world. It > relays all incoming mail to a mail server on the internal > network. The server on the internal network relays all > outgoing mail to it for routing to the outside world. The > main reason for this is take advantage of anti-spam > features in sendmail and for security for the internal > mail server. I think this is a common setup although > I might not have described it in the usual way. > > The public domain name is mydomain.com.au. > The external mail server is mailhost.mydomain.com.au. > > The internal network domain name is internal. > The internal mail server is mailhub.internal. > > There are separate DNS servers for internal and external > domain queries. > > I tried defining MAIL_HUB in the sendmail m4 config file, based on the > FreeBSD default freebsd.mc but it did not work. I get error messages from > sendmail when I receive mail from outside: > > SYSERR(root): MX list for mydomain.com.au points back to > mailhost.mydomain.com.au I _always_ make that mistake at least once when doing a new sendmail config ;). You need to add to /etc/mail/sendmail.cw all the names of this machine that will be used for e-mail for that config. This may not fit in with your plans, but you might consider not using sendmail, but instead separating out the tasks of receiving e-mail from a network connection and the actual delivery. (See /usr/ports/mail/smtpd/pkg/DESCR if you have a current ports collection). > and the following when mail is received from the outside world: > > Oct 12 13:23:39 mailhost sendmail[6230]: > NAA06228: to=, delay=00:00:00, xdelay=00:00:00, > mailer=esmtp, relay=mydomain.com.au., stat=Local configuration error > Oct 12 13:23:39 mailhost sendmail[6230]: NAA06228: NAA06230: DSN: Local > configuration error > > I thought this must be due to problems with MX records and definition > of class "w" so I checked these. > > There is a single MX record for mydomain.com.au pointing to > mailhost.mydomain.com.au. /etc/mail/sendmail.cw contains entry for > mailhost.mydomain.com.au. When sendmail starts up it correctly > recognises its hostname, domain and node as mailhost.mydomain.com.au, > mydomain.com.au, mailhost respectively. > > If I define SMART_HOST instead then incoming mail works perfectly but that > causes problems with outgoing mail. I.e. Unroutable mail causes a mail > loop. > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-questions" in the body of the message To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message