From owner-freebsd-net@FreeBSD.ORG Wed Dec 20 09:13:35 2006 Return-Path: X-Original-To: freebsd-net@freebsd.org Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B19AA16A412 for ; Wed, 20 Dec 2006 09:13:35 +0000 (UTC) (envelope-from infofarmer@gmail.com) Received: from nf-out-0910.google.com (nf-out-0910.google.com [64.233.182.187]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5B57743CD2 for ; Wed, 20 Dec 2006 09:12:57 +0000 (GMT) (envelope-from infofarmer@gmail.com) Received: by nf-out-0910.google.com with SMTP id x37so2422676nfc for ; Wed, 20 Dec 2006 01:12:56 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; b=Yt43lzmn8G+QNi6i31KzN6b/HLjHXxB3I4KAJSbiIu9YoDAUOCzYbOXLkWeEaiKjLq/TIF0rlMLCS3SK+UVXDfthVg4STcvXpshDMji7Q6KktW8cLX0rwHjCCuzBMODf60DpYBe972n8daNFt4I0Qcj3egyML+zX4T/rkv4e0oQ= Received: by 10.78.205.7 with SMTP id c7mr4874103hug.1166604390382; Wed, 20 Dec 2006 00:46:30 -0800 (PST) Received: by 10.78.167.16 with HTTP; Wed, 20 Dec 2006 00:46:30 -0800 (PST) Message-ID: Date: Wed, 20 Dec 2006 11:46:30 +0300 From: "Andrew Pantyukhin" Sender: infofarmer@gmail.com To: Alexei In-Reply-To: <884597862.20061220101424@sovetnik.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <884597862.20061220101424@sovetnik.org> X-Google-Sender-Auth: 56b442b2d2ee94b8 Cc: freebsd-net@freebsd.org Subject: Re: border mx X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Dec 2006 09:13:35 -0000 On 12/20/06, Alexei wrote: > Hello, freebsd-net. > > I'm going to build some mail system, so I need some advice. > There is a network with a 'MS Exchange' as a mail server and > 'someintdomain' as an internal mail domain. I also have an internet > domain, for example 'mydomain.com'. There is a freebsd box as a > gateway for my network, and 'MX' record of 'mydomain.com' will point > on it's address. > What I need: > > - when someone sends mail from internet to 'vasya@mydomain.com', my gw > replaces vasya@mydomain.com with 'vasya@someintdomain' and sends it to > Exchange server > - when someone from my internal network (vasya@myintdomain) sends mail > to some internet mail address (ie sends it to ms exchange server and > exchange sends it to gw), my gw replaces 'From:' and 'Reply-to:' > fields vasya@someintdomain -> vasya@mydomain.com > > Is that real? How can I realise this system? Or, maybe, there is some > other way to get the result I need? > > PS: 'Exchange' server has 'grey' address (192.168.0.0/16) and I don't > want allow him connect to the internet directly. > PPS: Sorry, if this question is not suitable for this maillist, so > advise me please where to ask. I would redirect you to another place but most of what you want is discussed in almost any mailserver's manual, even that of Exchange, I'm sure. A couple of pointers: 1) You are right in not wanting to directly connect a 192.168.x.x address to the internet, your ISP wouldn't appreciate that ;) 2) Spamwise, the gw mx should be able to tell a valid (internal) address from an invalid one. There are different approaches, from importing aliases db from Exchange at regular intervals to verifying addresses over SMTP and what not. Good luck!