From owner-freebsd-questions@FreeBSD.ORG Tue Mar 22 10:13:15 2005 Return-Path: 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 C04D816A4CE for ; Tue, 22 Mar 2005 10:13:15 +0000 (GMT) Received: from 239dsl82.soderhamn-net.com (239dsl82.soderhamn-net.com [81.94.82.239]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4043343D1D for ; Tue, 22 Mar 2005 10:13:15 +0000 (GMT) (envelope-from ulfalizer@gmail.com) Received: by 239dsl82.soderhamn-net.com (Postfix, from userid 1001) id 240EB6104; Tue, 22 Mar 2005 11:16:49 +0100 (CET) Date: Tue, 22 Mar 2005 11:16:49 +0100 From: Ulf Magnusson To: freebsd-questions list Message-ID: <20050322101649.GA15294@obygden> Mail-Followup-To: Ulf Magnusson , freebsd-questions list References: <951e41953ef5.953ef5951e41@liu.se> <20050321104319.GB1373@orion.daedalusnetworks.priv> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20050321104319.GB1373@orion.daedalusnetworks.priv> User-Agent: Mutt/1.4.2.1i Subject: Re: Mutt & sendmail configuration problems X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Mar 2005 10:13:15 -0000 I switched to Postfix, and after a little twiddling everything works fine. I'll just stick with PF until I need some sendmail-specific feature. Anyway, thanks for your help! On Mon, Mar 21, 2005 at 12:43:19PM +0200, Giorgos Keramidas wrote: > On 2005-03-20 14:21, Ulf Magnusson wrote: > > I'm trying to set up sendmail to route outgoing mail to an external > > SMTP server. I need this for Mutt, which doesn't have its own means of > > transfering mail and relies on whatever MTA the system provides. I > > found out about sendmail's SMARTHOST capability and added this line to > > my .mc configuration file (built by 'cd /etc/mail && make && > > make install'): > > > > define(`SMART_HOST', `smtp.liu.se') > > > > I then installed the changes with 'make && make install && make > > restart'. Now, whenever I try to send mail from Mutt, I get back the > > following failure notice: > > > > % Date: Sun, 20 Mar 2005 13:33:21 +0100 (CET) > > % From: Mail Delivery Subsystem > > % To: > > % Subject: Returned mail: see transcript for details > > % Auto-Submitted: auto-generated (failure) > > % > > % [-- Bilaga #1 --] > > % [-- Typ: text/plain, Kodning: 7bit, Storlek: 0,5K --] > > % > > % The original message was received at Sun, 20 Mar 2005 13:33:20 +0100 (CET) > > % from localhost [127.0.0.1] > > % > > % ----- The following addresses had permanent fatal errors ----- > > % > > % (reason: 504 : Sender address rejected: need fully-qualified address) > > E-mail messages send by your local Sendmail have an envelope-from > address of . The remote MTA that receives the message > knows nothing about the machine called ``obygden'' and rejects the > message. > > One way to make this work is to use address-rewriting: > > 1. Start by adding the following to your ``/etc/mail/obygden.mc'' file: > > FEATURE(masquerade_envelope) > FEATURE(generics_entire_domain) > FEATURE(genericstable, `hash -o /etc/mail/genericstable') > GENERICS_DOMAIN(`localdomain.net') > > Where ``localdomain.net'' is the local domain of ``obygden''. > > 2. Then in a file called ``genericstable'' in /etc/mail, put the > following: > > ulf@obygden ulfma629@student.liu.se > ulf@obygden.localdomain.net ulfma629@student.liu.se > > 3. Build a genericstable.db file and rebuild sendmail.cf: > > # cd /etc/mail > # make > # make install > > 4. Restart Sendmail: > > # cd /etc/mail > # make restart > > You should be set to go. Now the addresses the user ``ulf'' uses > locally will be rewritten by Sendmail to real addresses on their way out > and the receiving SMART_HOST/MTA will be happy to forward the messages > to their destination. > > - Giorgos >