From owner-freebsd-questions@FreeBSD.ORG Sun May 6 00:42:55 2012 Return-Path: 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 A4D31106564A for ; Sun, 6 May 2012 00:42:55 +0000 (UTC) (envelope-from freebsd@edvax.de) Received: from mx02.qsc.de (mx02.qsc.de [213.148.130.14]) by mx1.freebsd.org (Postfix) with ESMTP id 37F8F8FC0A for ; Sun, 6 May 2012 00:42:55 +0000 (UTC) Received: from r56.edvax.de (port-92-195-20-192.dynamic.qsc.de [92.195.20.192]) by mx02.qsc.de (Postfix) with ESMTP id ED19F1DAF3; Sun, 6 May 2012 02:42:53 +0200 (CEST) Received: from r56.edvax.de (localhost [127.0.0.1]) by r56.edvax.de (8.14.5/8.14.5) with SMTP id q460gr74003945; Sun, 6 May 2012 02:42:53 +0200 (CEST) (envelope-from freebsd@edvax.de) Date: Sun, 6 May 2012 02:42:53 +0200 From: Polytropon To: Joshua Isom Message-Id: <20120506024253.0c276fbc.freebsd@edvax.de> In-Reply-To: <4FA54566.6050106@gmail.com> References: <4FA54566.6050106@gmail.com> Organization: EDVAX X-Mailer: Sylpheed 3.1.1 (GTK+ 2.24.5; i386-portbld-freebsd8.2) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: "freebsd-questions@freebsd.org" Subject: Re: Best mail setup for home server? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Polytropon List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 06 May 2012 00:42:55 -0000 On Sat, 05 May 2012 10:21:10 -0500, Joshua Isom wrote: > I currently use my FreeBSD system as my generic unix server and some > coding, along with occasional multimedia. I'd installed postfix years > ago and kept using it. Right now, I use getmail with cron, dspam, and > dovecot to handle my gmail account. I've never set up outgoing mail > which makes changing email clients, or devices, annoying. Currently > postfix is set to use dovecot's deliver command so that dovecot can sort > and handle it. Before I deal with setting postfix to relay the mail, > dealing with firewalls and other possible issues, is there a better > alternative? I'd prefer that local mail "just works" even if I lose > internet, and any email that gets as far as my server will at least > eventually mail. The archlinux wiki seems to suggest ssmtp doesn't work > properly with attachments. Instead it recommends msmtp, which requires > an active internet connection to use. Dragonfly's dma is local only to > the computer and not the LAN. Are the only options configuring sendmail > or configuring postfix? As it has been explained already, "home _server_" in regards of e-mail makes certain assumption on what you _should_ do. Since dynamic IPs have become the main source of spam (and spam the main amount of e-mails transferred), sending from a dynmic IP might fail due to mail servers refusing to talk to your box. Furthermore, "connection might drop" is also a bad idea for a server. If problems in mail transmission occur "on the way", notifications will be addressed to your server, and if it's currently not reachable, a problem for the other mail server arises, maybe even in blacklisting your machine. I've had a comparable solution when I was at university, behind a static IP: directly sending mail was no problem, and for receiving I did use fetchmail. That combination made me fully independent in choice of MUAs (and when paying attention to local storage formats, they all could work on the same mail data). I've been using an external server for actually hosting the mailbox (emptied by POP), so _that_ functionality (receiving messages on my _own_ system) was not in my scope at that time. However, with proper masquerading _any_ MUA could "send to localhost", and even "ls /some/stuff | mail -s stuff bob@example.com" was possible. After moving, I only had dynamic IP, resulting in the observation that my setup didn't work for _some_ targets anymore, as they refused to accept messages from dynamic IPs. So I reconfigured sendmail to just send the messages to my ISP's MX. That mail relay _has_ a static IP. The downside: You won't be able to control the arrival of your messages; only "successfully transmitted to relay" will be in the logs. You can see advantages and disadvantages in this approach: local storage, requirement for "permanent and reversable connection" (proper DNS records highly suggested!) and "being tied" to ISP's MX. Maybe you should rething your operations ideas with the suggestions given on the list. There are some things to consider, but what you're basically planning is possible without much trouble, as long as you pay attention to the protocol. :-) -- Polytropon Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ...