From owner-freebsd-questions@FreeBSD.ORG Mon Nov 9 02:26:04 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 5D704106566C for ; Mon, 9 Nov 2009 02:26:04 +0000 (UTC) (envelope-from Olivier.Nicole@cs.ait.ac.th) Received: from mail.cs.ait.ac.th (mail.cs.ait.ac.th [192.41.170.16]) by mx1.freebsd.org (Postfix) with ESMTP id 09EA08FC15 for ; Mon, 9 Nov 2009 02:26:04 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by mail.cs.ait.ac.th (Postfix) with ESMTP id 0F7ED3A383A; Mon, 9 Nov 2009 09:26:01 +0700 (ICT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cs.ait.ac.th; h= references:subject:subject:in-reply-to:from:from:message-id:date :date:received:received:received; s=selector1; t=1257733561; x= 1259547961; bh=oNZF+wONssah9f35Y3e7KuHio+tKALdn0Xzf2p0+fKE=; b=k 5r/vwCUXqlwSE9Gg6Q8ZQnm3SBLMZOwnJ2JM4SKIid0DC4j1aRg673E/L3Z5I7Xd fO8jSnXSphCT7roAYAKwn2KGaFmJmFT+hxva6pZHsgIFfe8hu3LwmUbGu+fVYvtn cSzdTWL6ZYS/ysCHeidG/v+gQmX5menFZAZS3NuNV8= X-Virus-Scanned: amavisd-new at cs.ait.ac.th Received: from mail.cs.ait.ac.th ([127.0.0.1]) by localhost (mail.cs.ait.ac.th [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id bBlaO0Wf2Xqg; Mon, 9 Nov 2009 09:26:01 +0700 (ICT) Received: from banyan.cs.ait.ac.th (banyan.cs.ait.ac.th [192.41.170.5]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.cs.ait.ac.th (Postfix) with ESMTPS id 1D7C13A3839; Mon, 9 Nov 2009 09:26:01 +0700 (ICT) Received: (from on@localhost) by banyan.cs.ait.ac.th (8.14.3/8.14.3/Submit) id nA92PxYp079632; Mon, 9 Nov 2009 09:25:59 +0700 (ICT) (envelope-from on) Date: Mon, 9 Nov 2009 09:25:59 +0700 (ICT) Message-Id: <200911090225.nA92PxYp079632@banyan.cs.ait.ac.th> From: Olivier Nicole To: wblock@wonkity.com In-reply-to: (message from Warren Block on Fri, 6 Nov 2009 08:12:14 -0700 (MST)) References: 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: Mon, 09 Nov 2009 02:26:04 -0000 Hi, I apologize if I was not clear enough. I answer youe questions and try to be more clear at the bottom. > > 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. Only I don't want to define an alias for each and every user. > > - 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. user2 aliases to an existing account on some other place. > > - 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. I shall try that. > > user1 is then rewritten as user1.domain.net, > That's the masquerade... Wait, is that a typo? Should be > "user1@domain.net"? Right, that was a typo. > > 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: Yes I did newaliases and the version of sendmail is the default with FreeBSD, that must be 8.14.3 > Masquerade again. Not clear whether that's what you want. How to configure sendmail on a.domain.net so that: 1) users with an alias defined in /etc/mail/aliases have their messages sent to the alias; 2) users with no alias have their mail sent to user@domain.net (same username). It seems that masquerade does the part 2) but users in 1) are not sent to the alias. Best regards, Olivier