# Courier Mail Server for beginner?



## silicium (Mar 29, 2013)

Is there a tutorial for beginners with the Courier suite from /usr/ports/mail/courier?
The new home server running FreeBSD 9.1-STABLE is behind firewall/NAT (Cisco IOS router, dynamic IPv4 address, but I plan to switch to a better ISP with static address).
I need some virtual mailboxes like xxx@yyy.dyndns-home.com that are delivered to zzz@homeserver accounts, and would like to switch from my old sendmail + imap-uw setup that became too slow with growing mbox files, running on another server with OpenBSD.
courier-0.65.3_1 port was built with the following options: auth_userdb, gnupg,ipv6,maildropflags,webmailflags,webmailrsent,systemaliases,emptyaliases.
Then RTFM did not help a lot because I could only send email between local accounts (sendmail had been disabled and purged from base system). Everything else received from my ISP connecting with real email address is rejected with _517-Domain does not exist_. The learning curve of courier would not feel so steep if the many configuration files were not entangled with DNS or authentication problems.


----------



## usdmatt (Mar 29, 2013)

I'm not sure how much you want to get away from sendmail but I find the easiest setup on FreeBSD is to use sendmail and mail/procmail for delivery. There's a few guides online and all it takes is a single line in /usr/local/etc/procmailrc and /etc/mail/{hostname}.mc to make sendmail use maildir format instead of mbox.

Once sendmail is correctly delivering to maildir folders, you can use mail/courier-imap to provide IMAP and POP3 access.


----------



## wblock@ (Mar 29, 2013)

Consider using mail/maildrop instead of procmail.  It can be used as a mail delivery agent just like procmail, and supports Maildir.  It's newer, easier to use, and probably more secure than procmail.


----------



## silicium (Mar 30, 2013)

I have read the handbook warning about disabling sendmail, but have no use for any system functions that rely on email result delivery (would never read it, just wasting disk space until filesystem is full or wearing flash memory with limited life cycles). I will rebuild a nanoBSD world WITHOUT_SENDMAIL in src.conf and have to choose something standalone in ports/mail to build a home low-power mail server.


----------



## ohauer (Mar 31, 2013)

Just some rants


> switch from my old sendmail + imap-uw setup that became too slow with growing mbox files



Big mbox files are generally not performant, think about deleting mails placed in the middle of a 1GB mbox file ...
To boost the performance you should consider to switch from mbox to maildir and maybe from courier to dovecot.


----------

