From owner-freebsd-questions@FreeBSD.ORG Fri Nov 6 15:12:27 2009 Return-Path: Delivered-To: questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 187721065672 for ; Fri, 6 Nov 2009 15:12:27 +0000 (UTC) (envelope-from wblock@wonkity.com) Received: from wonkity.com (wonkity.com [67.158.26.137]) by mx1.freebsd.org (Postfix) with ESMTP id C90688FC0A for ; Fri, 6 Nov 2009 15:12:26 +0000 (UTC) Received: from wonkity.com (localhost [127.0.0.1]) by wonkity.com (8.14.3/8.14.3) with ESMTP id nA6FCFLj081480; Fri, 6 Nov 2009 08:12:15 -0700 (MST) (envelope-from wblock@wonkity.com) Received: from localhost (wblock@localhost) by wonkity.com (8.14.3/8.14.3/Submit) with ESMTP id nA6FCFYQ081477; Fri, 6 Nov 2009 08:12:15 -0700 (MST) (envelope-from wblock@wonkity.com) Date: Fri, 6 Nov 2009 08:12:14 -0700 (MST) From: Warren Block To: Olivier Nicole Message-ID: User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; format=flowed; charset=US-ASCII X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.2.2 (wonkity.com [127.0.0.1]); Fri, 06 Nov 2009 08:12:15 -0700 (MST) Cc: questions@freebsd.org Subject: Re: How to configure sendmail X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Nov 2009 15:12:27 -0000 Olivier Nicole wrote: > I have this stupide little configuration that I cannot manage to get > working. > > I have one machine a.domain.net that I want to be able to deliver > system mail (like cron and so on) with the following rules: > > - user1 on a.domain.net has the same username as on domain.net; I > want that mail sent to user1 is delivered to user1@domain.net; An alias will do that. > - user2 on a.domain.net has no corresponding user on domain.net, but > it has an alias defined; I want to mail sent to user2 is delivered > to the alias. Creating an alias for a nonexistent user seems to work here. > - of course, mail addressed to a full address x@y.z should be > delivered accordingly, eventually using a mail relay. > I tried using masquerade in submit.mc, I don't edit submit.mc, just .mc. > user1 is then rewritten as user1.domain.net, That's the masquerade... Wait, is that a typo? Should be "user1@domain.net"? > but the alias for user2 is not parsed newaliases(1) is needed after editing /etc/mail/aliases. And there is a bug if you're using 8.0: http://www.freebsd.org/cgi/query-pr.cgi?pr=bin/139870 > and user2 is also rewritten as user2@domain.net. Masquerade again. Not clear whether that's what you want. -Warren Block * Rapid City, South Dakota USA