# How to configure a personal email gateway



## bestwc (Apr 21, 2011)

Hi there,

I recently configured a home file server with FreeBSD 8-Stable, it works quite well, and now I want to make a further step to move all my emails to FreeBSD. Here's a list of my requirements, 

- I have Gmail, Yahoo, and an office email accounts
- I want a service running on my server, that receives emails from multiple accounts, and also sending.
- I own a MacBook, so I want to configure Mail (The application) to read and write emails to my home server, and that server will redirect my emails to destinations if I'm sending.
- I don't want to keep any emails on my MacBook, instead, all received emails and sent emails are kept on the server as sort of archiving. 
- I receive approximately 500 emails a day (Mostly are mail lists)

Does anyone has anything to recommend, or any tutorial on this? Thank you very much.:f

Regards,
H.L.


----------



## frijsdijk (Apr 21, 2011)

Hi,

To begin with would install postfix+dovecot, there are numerous how-to's found on the interwebs.



> - I want a service running on my server, that receives emails from multiple accounts, and also sending.



You could fetchmail (/usr/ports/mail/fetchmail) for that:

Descr: A typical use of fetchmail is to connect to your ISP's POP3 server,
downloading your mail into the INBOX on your local computer.  You may then
read the mail, offline if you want, using pine, mutt, or any standard mail
user agent.



> - I own a MacBook, so I want to configure Mail (The application) to read and write emails to my home server, and that server will redirect my emails to destinations if I'm sending.



Postfix should take care of this by default (use it's IP as SMTP server). It will do MX lookups and deliver mail where it belongs. Providing that you can make tcp 25 connections to the outside world (your ISP might block it). If not, you would have to configure a relayhost in postfix to relay all outgoing mail through their mailserver.

Also be aware that some hosts might deny your mail as it's coming from an ADSL/Cable address (dynamic or not), and the A/PTR records will probably not match.



> - I don't want to keep any emails on my MacBook, instead, all received emails and sent emails are kept on the server as sort of archiving.



IMAP! (dovecot)


----------



## bestwc (Apr 21, 2011)

Thanks for your reply and these useful info, I'll update this post as solved and try to search for how-tos based on the names you provided.


----------

