From owner-freebsd-questions@FreeBSD.ORG Wed Jan 17 16:38:47 2007 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 9AF9516A40F for ; Wed, 17 Jan 2007 16:38:47 +0000 (UTC) (envelope-from noeldude@gmail.com) Received: from nz-out-0506.google.com (nz-out-0506.google.com [64.233.162.228]) by mx1.freebsd.org (Postfix) with ESMTP id 60F5613C43E for ; Wed, 17 Jan 2007 16:38:47 +0000 (UTC) (envelope-from noeldude@gmail.com) Received: by nz-out-0506.google.com with SMTP id i11so487559nzh for ; Wed, 17 Jan 2007 08:38:46 -0800 (PST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=jBkw9ZPpfPqUpX2Ovmvp2YaN0e9Ig+eodz+XYoLuSEkxSfon27KWHjjsOUjwcc/XNq+LFUQYouSUbfRKAa3JZ1kk1Ezq89DxzZK5+KJBi+haY8YFnTLo1T+dNagWv2RrWGsLIVR5NeqRRTrWKkhd7yyYG/Fq7MFbAiWqXp36pD4= Received: by 10.65.119.14 with SMTP id w14mr10295949qbm.1169051926598; Wed, 17 Jan 2007 08:38:46 -0800 (PST) Received: by 10.65.156.16 with HTTP; Wed, 17 Jan 2007 08:38:46 -0800 (PST) Message-ID: Date: Wed, 17 Jan 2007 10:38:46 -0600 From: "Noel Jones" To: "FreeBSD Questions" In-Reply-To: <000601c73a43$8683c170$6601880a@Enigma> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <000601c73a43$8683c170$6601880a@Enigma> Subject: Re: Load balancing outgoing mail relay 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: Wed, 17 Jan 2007 16:38:47 -0000 > > FreeBSD 6.2 with Sendmail (initially) and now postfix. > MS DNS with round robin (and TTL set to 0 on the records). > Resolving with nslookup gives something like: > smarthost.domain.tld > 192.168.0.1, 192.168.0.2, 192.168.0.3 > > If I kill 192.168.0.1 then it goes on the second one. But this is failover, > and I need (approximately) load balancing. Postfix will always internally shuffle equal-weight MX records (or multiple A records if there is no MX). I think sendmail does this also. This will not give strict round-robin use of the smarthosts, but over thousands of messages will give an equal share to each host. It sounds as if the host has primary/secondary MX records and you haven't disabled MX lookups for the relayhost. Use in main.cf relayhost = [smarthost.domain.tld] As documented, the brackets are required to disable MX lookups. You may want to adjust initial_destination_concurrency_limit and default_destination_concurrency_limit if your smarthosts will allow more than the default 20 connections. If sending small amounts of mail, postfix connection caching may interfere with observed load sharing. You may want to turn off smtp_connection_cache_on_demand if sending small amounts of mail, but leave it on if sending thousands of messages at a time. -- Noel Jones