# Email server - want to use a replacement for ComuniGate

## r00d00

Hi

Have been running RH9 with a trial version of CommuniGate as our internal mail server.

I've just managed to aquire a new machine which I've installed Gentoo on to and want to move our mail to this server.

I'm looking for recommedations of an app for:

Imap server

Reliable and preffably low load

Compatible with CommuniGate Mail files, I belive it uses mbox

Not too difficult to set-up

I would like to have this server eventualy receive our email direct, presently we use an rpop feature in CommuniGate to collect all mail from one pop account.

Any other guidance, thoughts or tips on other things to consider would be really appreciated.

Thanks for any help.

----------

## scout

 *r00d00 wrote:*   

> Imap server
> 
> Reliable and preffably low load
> 
> Compatible with CommuniGate Mail files, I belive it uses mbox
> ...

 

I believe 90% of the people use courier-imap, but you can also use bincimap, they are both in portage.

I use courier-imap because at the time I installed it bincimap wasn't in portage, but I would hesitate now, because I like those small secure and fast programs like bincimap.

I think both are easy to configure.

However the mbox file format isn't suitable for imap, especially if you have shared folders, and I don't know if courier-imap can read mbox, I think not. I don't know if there's any imap server around here that can read mboxes actually, because it would have to lock the whole mbox to make changes in it, and this isn't in the "spirit" of imap.

I'd advise you to first convert the mboxes into maildirs, and the use the new imap server.

If you want to recieve your mail directly you have to install separately a smtp server like qmail or postfix, however It's very easy to retrieve pop mails in maildirs with a small python program called getmail (it's in portage), so that you can first setup getmail (it's very very easy) and have you users have their mail as usual, and then you can concentrate on the configuration of the smtp server which you won't get quickly if it's the first time you do it.

Then when you have the smtp server running, you just make your mail forward in your pop3 provider's account, or change the mx record of your dns so that the mails come directly and then you can disable getmail.

Now for the conversion of mbox into maildir, I guess you wonder if it's really necessary, and I'll try to convince you ...

1) I don't know if there exists and imap server that uses directly this format

2) for imap it would be a bad idea to use mbox because it isn't designed for this: imap is designed to have multiple mail clients tampering on the same directories and mails, and that clearly doesn't fit with mbox. with maildirs, the imap servers just locks one particular email when it has to move/modify it, not the whole mailbox, and everything runs smoothely

3) ok let's suppose there exists an imap server that can uses mboxes, then it would not be "reliable and preferably low load"

Ok, now the difficult part is to make the transition between mbox and maildirs,

First you have to find a program that can convert mboxes into maildirs, I remeber the creator of getmail has written one in python, but I am sure there are sme in portage ... I don't know them precisely

What you could do is to convert everything in one day and make people change their configuration right away.

Now if you have to maintain both the maildirs and the mboxes in sync it's rather tricky, but possible. You could for example keep you communigate server running and install offlineimap (in portage) to make syncronisations between the maildirs and the communigate server.

Good luck   :Wink: 

----------

## r00d00

Thankyou very much for your detailed and response I'm convinced about mailDirs.

So I'm now in the middle of trying to convert things. I'll let you know how it goes.

Thanks again for your help

----------

## r00d00

Thanks for your help so far. All done now have setup bincimap and got it working evetually.

One question, in ComuniGate I could setup routing rules based on sender, subject ect. I can't find anything similar in bincimap do I need another app for this?

----------

## blkwolf

 *r00d00 wrote:*   

> 
> 
> One question, in ComuniGate I could setup routing rules based on sender, subject ect. I can't find anything similar in bincimap do I need another app for this?

 

Since ComuniGate is does everything and the kitchen sink mail server, you'll need more than just imap to replace it.  IMAP just gives end user access to the users mail directories or folders.  The routing stuff would be handled by your MTA or MDA.  For that job I generally use Postfix + Procmail which gives you some very powerful routing and filtering capabilities.

----------

## blake121666

[quote="scout"] *r00d00 wrote:*   

> 
> 
> Now for the conversion of mbox into maildir, I guess you wonder if it's really necessary, and I'll try to convince you ...
> 
> 1) I don't know if there exists and imap server that uses directly this format
> ...

 

From what I've read, the UW-Imap server (the one that initially created and still is the "reference" standard) uses an mbox format with record or field level locking.  Not sure how it does this but that's what I've read.

----------

## DaveArb

 *blake121666 wrote:*   

> From what I've read, the UW-Imap server (the one that initially created and still is the "reference" standard) uses an mbox format with record or field level locking.  Not sure how it does this but that's what I've read.

 

Not sure how it does it either, but I can confirm that UW-IMAP is compatible with mbox, we run this in production. If starting from scratch, I don't think I would advocate it just on theory if nothing else, but it works here.

Dave

----------

## blake121666

Yeah, I prefer maildir as well;  but I cached that factoid in my brain while reading up on the mbox-based servers.  It probably depends on the filesystem you use I would guess.  I'd actually like to know how to implement something like field locks ... might checkout the UW-Imap source one day to see what's done there.

According to courier, the mbox format outperforms the maildir format in raw numbers:

http://www.courier-mta.org/mbox-vs-maildir/

----------

## dogghaus

Hi,

My personal recommendation for a stable, secure, and fast mail server is Postfix/Cyrus-IMAP.  I've been using this combo for three years.  I researched many different ones (exim, qmail, courier, uw-imap) but this one seemed the best to me.

The postfix/cyrus mail server I set up for the company I used to work for had (until a month ago) run over 2 1/2 years without any tinkering.  After that time it had to be rebooted, the reason being the Redhat OS needed to have the maximum file limit reset.

They are both easy to set up, and Cyrus works well with many authentication methods (PAM, LDAP, MySQL, SASL, etc).  It uses maildirs, has excellent tools for reconstructing maildirs from backups, and is compatible with most open-source mail software (Horde, Squirrelmail, etc).  Postfix is excellent, I have my aliases stored in an LDAP directory that postfix references, and three virtual domains set up in postfix.

Also, since Cyrus supports server-side ACLs, shared mail directories are easy to set up.  I configured Outlook clients (with a plugin from Bynari) with shared calendars, folders, tasks, etc, everything stored on a Cyrus server.

The Postfix/Cyrus server I have running at home is a P2 400; my average CPU usage is 3 %, average memory load is 131 MB (SNMP stats).  I have it running on a gentoo machine; both packages are in portage.

Hope this helps!

----------

## blake121666

 *dogghaus wrote:*   

> 
> 
> The Postfix/Cyrus server I have running at home is a P2 400; my average CPU usage is 3 %, average memory load is 131 MB (SNMP stats).  I have it running on a gentoo machine; both packages are in portage.
> 
> 

 

131 MB!!!!!!

What the heck are you doing at home to eat up 131 MB on email?

I just setup my system with postfix/courier-imap as in

https://forums.gentoo.org/viewtopic.php?t=56633&highlight=imap

and by doing a

```
grep -i vmsize /proc/$pids/status
```

where $pids = process ids of the various mail processes running (saslauth, authroot, ...etc)

I'm using 8 MB on the saslauth stuff and 16 MB on the courier-imap stuff.  Is Cyrus doing some memory mapping or something with your mail?  Or are you stating the full memory utilization of everything on your box (not just Cyrus).

I don't much like courier and have been considering others.  I just got through playing with Lotus Domino at home because it ate up all my memory and I have a crappy old 128 MB PII class computer I'm doing this on as well at home.  I'm thinking of replacing the courier piece with bincimap next - but I don't like it's default gentoo package using daemontools and ucspi-tcp .... muddies up my root filesystem and adds stuff I'd rather not have at this point.

----------

## dogghaus

Sorry, I should have been more clear; that is the total memory the machine is using (SNMP trap for total memory in use).  I was just setting an example of the type of base system necessary to run a competent mail server, independent of load.

----------

