# eMail Server

## Aurora

I am interesting in running an eMail server, and I'm sure there are billions of HOWTOs out there.  However, I'm not sure what type of software I'm looking to install, so I want to ask some very basic questions so I can start searching for the right keywords and HOWTOs.

Here's my idea: I have several (4 or 5) eMail accounts, mostly POP accounts.  I want to have one of Gentoo servers at home download all of the eMail from all these accounts and keep it in one central location.  Once the eMails are stashed in this one location, I want to be able to view my eMail via IMAP or using a WebMail interface from wherever I am (generally I have my laptop with me so IMAP is a perfect solution).

I'm not sure where to start...what type of software should I be looking to use to download the eMail?  How do I take this stash of eMails that has been downloaded and then share it using an IMAP server?  Does postfix do all this for me?

Any thoughts and ideas appreciated.   :Smile: 

----------

## Darknight

I've been happy with postfix as a mail server, I largely followed the virtual mail system howto that is in the gentoo documentation, easy to find. Also have a look at gentoo-wiki.com where you can find a lot of goodies.

To download the mail use fetchmail.

To access it remotely via imap use courier-imap, which is also needed to make use of squirrelmail, which is a decent webmail software.

You find details about all of the above except fetchmail in the mentioned howto (which also covers much more, stuff you probably don't care about at all).

----------

## jmbsvicetto

Hi.

I agree with Darknight on Postfix and fetchmail. However, I suggest using cyrus-imapd and horde/imp.

----------

## nobspangle

I'm using postfix, fetchmail, courier-imap and horde/imp, if you want to send mail through postfix (from you laptop using smtp) you will need to compile postfix with support for SASL.

----------

## pfft

 *nobspangle wrote:*   

> I'm using postfix, fetchmail, courier-imap and horde/imp, if you want to send mail through postfix (from you laptop using smtp) you will need to compile postfix with support for SASL.

 

+ amavisd-new + dcc + pyzor + razor + clamav + f-prot + clamav + bitdefender-console

 :Smile: 

----------

## Aurora

Wow, thanks for the speedy replies.  I really appreciate it.

So, this fetchmail concept...this intergrates with Postfix nicely?  What about *-imapd (courier or cyrus)?  I guess I am confused; I was under the impression that Postfix was kinda like an all-in-one mail daemon that downloaded and provided mail hosting, as well.   :Smile:   I guess I'll do some reading on the specific roles that each of these daemons provides and go from there.

Thanks for the recommendations, all!   :Very Happy: 

----------

## jmbsvicetto

Maybe this diagram helps.

```
(sender) LUA -> MTA -> ... -> MTA -> LDA <- LUA (receiver)
```

MTA - Mail Transfer Agent

LDA - Local Delivery Agent

LUA - Local User Agent

Postfix is a MTA. The role of a MTA is to route mail between hosts and to deliver local mail to a LDA.

Cyrus and Courier are LDAs. Their role is to manage local mailboxes and to provide access to the mailboxes - frequently done through POP3 or IMAP4.

Thunderbird, KMail, Outlook, Outlook Express, Eudora, Pine are all LUAs. These are the client programs used to access, receive and send messages. If you use an webmail solution, the webmail program will act as a LUA.

----------

## hiboo

I am also interested in building a simple "mail" server as Aurora.

But as I understand all this stuff, I yet don't see why postfix. Postfix is only if I want to send email with a custom email adress. But as I already have a smtp server from my Internet provider, Postfix is useless isn't it ?

Just a fetchmail to get back mails and put it in mail box and cyrus to get in on client software is sufficent isn't it ?

----------

## jmbsvicetto

hiboo,

if you don't want or need to create your own domain, you don't need any of this. All you need is to use your LUA - thunderbird, kmail, outlook, outlook express, etc.

Postfix is used to send and to receive email. Cyrus doesn't speak SMTP. so you can't use fetchmail to retrieve mail and to deliver it to cyrus. You can use procmail or other local systems for storing local emails.

----------

## magic919

 *jmbsvicetto wrote:*   

> Maybe this diagram helps.
> 
> ```
> (sender) LUA -> MTA -> ... -> MTA -> LDA <- LUA (receiver)
> ```
> ...

 

This is interesting but I don't think it is correct.  Postfix is an MTA, agreed, but it has an LDA called Local built in and this delivers the mail.  It can optionally palm off to Procmail (and others) as an LDA or use Virtual for non-local users.

Anything serving up mail as POP3 or IMAP4 isn't really an LDA at all.  By definition they are allowing the client access to mailboxes/folders and that is hardly local delivery.  An IMAP/POP server could incorporate an LDA, but let's not muddy the waters.

----------

## hiboo

 *jmbsvicetto wrote:*   

> hiboo,
> 
> if you don't want or need to create your own domain, you don't need any of this. All you need is to use your LUA - thunderbird, kmail, outlook, outlook express, etc.

 what I want is to have all my POP account to be "centralized" on one IMAP server, so I can access it from everywhere. I want my server hosting a maildir that will contain all my emails, and I want to access it via IMAP. Then I want this maildir being populated by my POP account.

Correct me if I am wrong :

- to retreive mail with my LUA with IMAP, there is cyrus

- to get mail for my several POP account, there is fetchmail

```
POP -\

POP -+--[fetchmail]--> maildir --[cyrus]--> LUA

POP -/

```

 *jmbsvicetto wrote:*   

> Postfix is used to send and to receive email. Cyrus doesn't speak SMTP. so you can't use fetchmail to retrieve mail and to deliver it to cyrus. You can use procmail or other local systems for storing local emails.

 fetchmail is not a LDA ?

----------

## magic919

Fetchmail is a one-of-a-kind thing really.  I fetches mail, of course, but its design is such that is speaks SMTP i.e. puts the mail into a local MTA.

For getting mail from POP and into a mailbox consider Getmail.

Cyrus, Dovecot or Courier-IMAP can perform serving up the email to you.

----------

## nielchiano

 *hiboo wrote:*   

> fetchmail is not a LDA ?

 

actualy it's a LUA-to-MTA translator. It gets mail as an LUA, but resends it as an MTA

----------

## Aurora

Any thoughts specifically on dovecot vs. cyrus vs. courier?  I've read a ton of things online regarding these three options and am probably more confused than ever.   :Smile: 

I imagine for a one-user system, either would be more than fine.  But does anyone have any specific experiences with either (or all) of these that they want to share?

Thanks!

----------

## magic919

I just ended up using Dovecot and I don't even remember how.  It's simple to config and works well.  As of 1.0 you can tell it to build POP3 as well as IMAP.  It handles IMAP and secure IMAP well enough.  Doesn't work out under 64 bit last time I checked and there I've used Courier.

----------

