Need advice for setting up mail server

Niklaas Baudet von Gersdorff me at
Sun Aug 7 18:01:59 UTC 2016

Solène Rapenne [2016-08-07 19:16 +0200] :

> Hello, you will need a SMTP server like Postfix or OpenSMTPD.
> You will also need to care with DKIM signing and SPF in your
> DNS. By running your own mail server you may also have problems
> to send mails to big companies like gmail, hotmail, yahoo
> etc... because they tend to blacklist large range of IP and
> it's hard to get removed on this list.

At this stage I neither have SPF nor DKIM implemented on one of
my machines (this one I am actually sending you the mail from)
and so far I had no problems sending mails to "bigger companies".
I realised that Google started automatically guessing SPF and it
works for my mail server at least. :-)

> If you need a webmail, see rainloop which is in PHP and act
> much like a dumb imap client from the web very little code on
> the server, or roundcube but this one needs more configuration
> and requires server side resources (caching, saving data
> etc..).

Once I intended to use Rainloop but the problem I see is that you
need a license for using it commercially:

So you should check whether that applies to you beforehand.

> Later you may need to fight against spam with greylisting and
> spamassassin.

While greylisting is quite effective I had problems with it
because "bigger companies" tend to send mail from different mail
server i.e., greylisting won't work that well. I used
spamassassin years ago and was not very happy with it because
from my feeling it uses a lot of resources but still has
difficulties marking spam properly.

What I can highly recommend is mail/spamd. I learned about it in
the FreeBSD Handbook. However, documentation there seems a bit
old so it's not longer correct. Spamd offers greylisting too but,
as mentioned above, there are reasons not to enable that.
However, you can also run it in blocking mode solely. This way it
collects updated entries on malicious hosts that you can pipe to
PF and block with your firewall. Very resource-friendly. Read
spamd(8) for how to configure it properly (and don't trust the
handbook on it).


More information about the freebsd-questions mailing list