Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 6 May 2012 02:42:53 +0200
From:      Polytropon <freebsd@edvax.de>
To:        Joshua Isom <jrisom@gmail.com>
Cc:        "freebsd-questions@freebsd.org" <freebsd-questions@freebsd.org>
Subject:   Re: Best mail setup for home server?
Message-ID:  <20120506024253.0c276fbc.freebsd@edvax.de>
In-Reply-To: <4FA54566.6050106@gmail.com>
References:  <4FA54566.6050106@gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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, ...



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20120506024253.0c276fbc.freebsd>