From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1Ph5ZU-0008Be-SX for garchives@archives.gentoo.org; Sun, 23 Jan 2011 19:25:57 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 72419E09DE; Sun, 23 Jan 2011 19:24:13 +0000 (UTC) Received: from mx.virtyou.com (mx.virtyou.com [94.23.166.77]) by pigeon.gentoo.org (Postfix) with ESMTP id 35188E09DE for ; Sun, 23 Jan 2011 19:24:13 +0000 (UTC) Received: from [192.168.2.43] (p57910284.dip.t-dialin.net [87.145.2.132]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx.virtyou.com (Postfix) with ESMTPSA id 0CB8E39A021 for ; Sun, 23 Jan 2011 20:24:12 +0100 (CET) Message-ID: <4D3C8041.2070105@wonkology.org> Date: Sun, 23 Jan 2011 20:23:45 +0100 From: Alex Schuster User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.9.2.13) Gecko/20101207 Thunderbird/3.1.7 Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org MIME-Version: 1.0 To: gentoo-user@lists.gentoo.org Subject: Re: [gentoo-user] Setting up SMTP relay References: <4D3B4D53.7000209@wonkology.org> <4D3B53AC.904@badapple.net> In-Reply-To: <4D3B53AC.904@badapple.net> Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit X-Archives-Salt: X-Archives-Hash: d181cd68b88d9a94440cc668ab0de4fd kashani writes: > On 1/22/2011 1:34 PM, Alex Schuster wrote: > I handle it with Postfix. Dovecot is only imap and won't accept main > directly. Whoops. > 1. install postfix with USE sasl or devecot-sasl, I don't believe it > matters which. Add the following lines to the bottom of > /etc/postfix/main.cf and fill in your hostname, domain, etc as needed. > > # local settings > myhostname = host.domain.com > mydomain = domain.com > myorigin = $myhostname > inet_interfaces = all > mydestination = $myhostname, localhost.$mydomain, localhost > mynetworks_style = subnet > mynetworks = 127.0.0.0/8 10.19.20.0/24 I left most items commented out as they are the same as the default, I only had to set mydomain, although dnsdomainname and hostname -d both return wonkology.org. > 2. run sudo newaliases > Postfix bitches if the /etc/mail/aliases.db doesn't exist and will hang > on start. > > 3. Verify postfix works, isn't complaining in the logs, etc. > Make sure it's up and running. That you can telnet to port 25 from > another machine and even send to a local user on your machine. Looks good! > 4. Add the user/pass stuff to the bottom of /etc/postfix/main.cf > > # relay host and credentials > relayhost = [my.external.relayhost.com] > smtp_sasl_auth_enable = yes > smtp_sasl_password_maps = hash:/etc/postfix/sasl.passwd > smtp_sasl_mechanism_filter = digest-md5 > smtp_sasl_security_options = noanonymous I need TLS authentication, and found what I need in a howto: smtp_sasl_tls_security_level = may And I removed smtp_sasl_mechanism_filter. > 5. Once you're this far it's time to test all the way through. > > make sure you can send from the localhost machine > sendmail -v some@address.com > . > > Once you're sure that works test from another machine on the network. > Ideally it should just work if you've done all the steps. Relaying does not work yet, I get a "Relay access denied (in reply to RCPT TO command)" error. But my initial goal is reached, I can send mail to {root,wonko}@wonkology.org. That's all I wanted. Many many thanks kashani! Your howto is much more than I expected, it is much appreciated. I realize that postfix is not too complicated, so I will play more with it when I have some spare time. Wonko