From owner-freebsd-questions Mon Oct 14 8:26:29 2002 Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id BFA3B37B401 for ; Mon, 14 Oct 2002 08:26:27 -0700 (PDT) Received: from smtp.infracaninophile.co.uk (happy-idiot-talk.infracaninophile.co.uk [81.2.69.218]) by mx1.FreeBSD.org (Postfix) with ESMTP id CAA5643E9E for ; Mon, 14 Oct 2002 08:26:26 -0700 (PDT) (envelope-from m.seaman@infracaninophile.co.uk) Received: from happy-idiot-talk.infracaninophile.co.uk (localhost.infracaninophile.co.uk [IPv6:::1]) by smtp.infracaninophile.co.uk (8.12.6/8.12.6) with ESMTP id g9EFQPKg050115 for ; Mon, 14 Oct 2002 16:26:25 +0100 (BST) (envelope-from matthew@happy-idiot-talk.infracaninophile.co.uk) Received: (from matthew@localhost) by happy-idiot-talk.infracaninophile.co.uk (8.12.6/8.12.6/Submit) id g9EFQKaW050110 for questions@FreeBSD.ORG; Mon, 14 Oct 2002 16:26:20 +0100 (BST) Date: Mon, 14 Oct 2002 16:26:20 +0100 From: Matthew Seaman To: questions@FreeBSD.ORG Subject: Re: Configuring sendmail to use a relay Message-ID: <20021014152620.GA50000@happy-idiot-talk.infracaninophi> Mail-Followup-To: Matthew Seaman , questions@FreeBSD.ORG References: <3DAAD526.9D492556@liwing.de> <000a01c2738e$ef4b6080$ca0110ac@vinyl.tkvbp.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <000a01c2738e$ef4b6080$ca0110ac@vinyl.tkvbp.com> User-Agent: Mutt/1.5.1i X-Spam-Status: No, hits=-14.7 required=5.0 tests=IN_REP_TO,QUOTED_EMAIL_TEXT,REFERENCES,SPAM_PHRASE_02_03, USER_AGENT,USER_AGENT_MUTT version=2.41 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Mon, Oct 14, 2002 at 10:35:21AM -0400, Kliment Andreev wrote: > > how can I configure the system sendmail to use our smtp server > > instead of sending mails directly to the responsible MX for > > the destination address? > > In the file sendmail.cf, put the following line > > DSnameoftherelayserver > > You SHOULD NOT put space between DS and the name_of_the_relay_server! Beware of editing the sendmail.cf file directly. Serious masochists only territory there. The equivalent and recommended way of customizing the sendmail configuration on FreeBSD is via the `hostname`.mc file in /etc/mail: cd /etc/mail make [ This will generate a default `hostname`.mc file if needed ] vi `hostname`.mc Delete the 'dnl ' from the beginning of the line that says: dnl define(`SMART_HOST', `your.isp.mail.server') and substitute the FQDN of your mail relay for the your.isp.mail.server part. Now simply run make to generate and install the new configuration and prod sendmail into using it: make install restart A guide to wrangling sendmail.mc files may be found in /usr/share/sendmail/cf/README Cheers, Matthew -- Dr Matthew J Seaman MA, D.Phil. 26 The Paddocks Savill Way Marlow Tel: +44 1628 476614 Bucks., SL7 1TH UK To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message