My first IMAP server

My first IMAP server

Post by Yizhar Hur » Sat, 08 Jan 2005 21:05:57


I.

I'm going to implement my first production Linux mail server, but haven't
yet decided about the best configuration for it.

I assume that this kind of questions rise quite often and I know that there
is no "right" nor "best" option,
but any tips that you can provide me will help for sure.

I will try to provide all relevant details:

My questions -

* Which imap server (and related software) would you recommend for me?

* I'm planning that users will continue to use Outlook Express as the main
IMAP client,
because it has good support for Hebrew and also because the users are used
to it.
Will it work?

* Other tips?


The goal -
Implement a low cost mail server (SMTP+IMAP+Webmail+AntiVirus) for a small
company (20 users).


More goals -
Central storage of email and shared access instead of local DBX files.
Virus scanning of incoming email.
Public shared mailbox folders.


Myself -
I am an experienced MS Windows system administrator (including Exchange),
but I'm a Linux newbie.
I have some theoretical and home lab practice with linux but no field
experience yet.
I also have no field experience with production IMAP servers as the main
protocol.
I have installed a working Postfix+Cyrus, and also Qmailrocks.org
(qmail+courier) on test machines for practice.


The company -
a small engineering company with about 20 users.
All workstations with MS Windows (most of them XP SP2).
About 4 users have laptops and will probably synchronize all the mailboxes
for offline usage.
Currently they are using Outlook Express with POP3 mailboxes on ISP mail
servers.


Server required features -
SMTP MTA that supports 8 bit characters for incoming and outgoing messages.
IMAP server - this is going to be the major issue (more details later).
Webmail.
Antivirus (probably ClamAV)
Backup to tape.
Web based management (webmin and/or product specific tools).
As I'm a newbie, I need a step by step specific documentation to make the
whole components work together (for example qmailrocks.org)


Server optional features at 2nd priority -
Antispam (later - this is not important right now)
Additional content filters - for example deleting attachments with PIF,EXE
and other extensions (probably later).
Additional domains - maybe later. At first the server will server a single
domain name,
but I might add another one in the future (no more then 2-3 domains).


IMAP related features -
Stability is important (I'm onsite only once a week and won't like it to
crash when I'm not there).
Allowing users to create folders/subfolders.
Allow shared access to mailboxes - some mailboxes will be accessed in the
same time from more then one computer.
Support for "public folders" or "public mailboxes" that will store team
related emails - for example messages related to a specific project.


Choosing the IMAP storage format -
I think that I will use either Cyrus or Maildir storage format for the
following reasons:

* My common sense guides me that a "single file" format is less vulnerable
because a problem with specific file will corrupt that file only and not the
whole mailbox.
What do you think about my assumption by your field experience?

* I want users to be able to create and manage subfolders easily.

* I want shared access to mailboxes and public folders.

* I like the idea that Maildir format is natively supported by some MTA
(like qmail), so the MTA can deliver local mail.
For
 
 
 

My first IMAP server

Post by Jens Both » Mon, 10 Jan 2005 07:18:31

ello,


fine :-)


Cyrus IMAP, as MTA Postfix, Filtering via amavisd-new and spamassassin.


It will work, but the IMAP functions in OE are not the best...


Use Debian as Linux, Web-Cyradm is a nice frontend to postfix and cyrus
(uses mysql for Postfix and Cyrus Tables and AUTH)


Postfix


Cyrus


Squirrelmail or horde


ok


tar and cpio


web-cyradm


spamassassin (via amavid-new)


amavisd-new


No problem, is possible with web-cyradm


no Problem, cyrus is robust (it is often used in larger installations.
My largest has about 4500 Mailboxes)


No Problem


No Problem


No Problem


yes, an it is faster.


Cyrus is a good choice.


If the IMAP Server will crash, mails are queued by the MTA. Webmailer
are using POP3 or IMAP to access mailboxes.


oversized ;-)


2 - 4 GB /
1 GB SWAP
10 - 20 /var
and the rest /var/spool/cyrus

perhaps as LVM to be able to resize Partitions on the fly

Filesystems: XFS or ReiserFS


DDS4 or DLTIV

Backup via cronjob using tar or better cpio


better: start with a RAID 1



I have no experience with fedora. I'm using debian unstable for my servers.


Disks should be no Problem. Some SATA Raid Controllers are not supported.


Greetings


Jens

 
 
 

My first IMAP server

Post by Mike Brodb » Tue, 11 Jan 2005 20:14:49


I'd also choose Cyrus, though I use sendmail & milter modules for
filtering, in preference to amavisd-new. MTA is a personal choice really -
whatever you're happiest with should be fine.


Indeed - Thunderbird/Mozilla are better clients if switching is an option.


I would avoid tar for backups if you go with Cyrus. Cyrus implements a
single instance store using filesystem hard links. Tar is potentially less
than optimal for dealing with lots of hard links (have a look at
http://www.yqcomputer.com/ ).
I'd suggest dump or cpio. Personally I use dump (xfsdump in fact), but
some filesystems dump more reliably than others.


Use a webmail program that uses IMAP. Mixing protocols will confuse users.


I chose XFS, choice strongly influenced by backup tools which guarantee
consistent backups even on mounted filesystems (xfsdump/xfsrestore).



My preference is Amanda, which does a lot more for you than a simple cron
job. Amanda also makes efforts to "stream" the tape drive, which will
lessen wear and tear on drive and tapes.


Definitely a good move.

My 2p worth,

Mike.
 
 
 

My first IMAP server

Post by Yizhar Hur » Wed, 12 Jan 2005 05:09:01

I Jens.

I just wanted to thank you for your reply.

I will check the tips and software that you suggested.

Yizhar


"Jens Bothe" < XXXX@XXXXX.COM > wrote in message
news: XXXX@XXXXX.COM ...



 
 
 

My first IMAP server

Post by Jens Both » Wed, 12 Jan 2005 05:14:21

Hi Yizhar,


no problem



Fine

Greetings

Jens
 
 
 

My first IMAP server

Post by Yizhar Hur » Wed, 12 Jan 2005 06:42:42

I.

I'm checking also the option to use Thunderbird.
It Hebrew (bidi languages) support is not as good as MSOE
but I have noticed that Thunderbird handles other "users.xxx" folder better
then OE.

So I will try both options probably and see how the users react.

Actually, my only problem with that suggestion is simply that
I'm still a newbie and and haven't got the time yet to learn about the file
systems and LVM in Linux,
so I will probably use EXT3 for start just because this is what comes "in
the box" and might deal with this issue later.

Does it make a big different (EXT3 versus XFS or other)?

What is the risk of simply copying the data (rsync?) instead of dumping?
If I get a backup with minor inconsistencies or if I need to stop the cyrus
daemon for several minutes, then I don't have a problem with that.
because the backup will be at evening/night and only very few mobile users
will access email from home.

So I was thinking to have a copy of the whole file system (or just the cyrus
data) on a dedicated partition/harddisk, and backup to tape from there.
It is important for me to always have a good backup on the hard disk and I
plan to have enough storage for that,
so I will need to do the copy/rsync operation anyway, right?

BTW -

Is that a good idea also?

Does "cyrus-imapd" lock important files and prevent copying them (read
opeartion) while it is active?

To be more specific, is this ok (/backup will be a local partition or
separate hard disk):
##########################
service cyrus-imapd stop
rsync -r --delete /etc /backup/etc
rsync -r --delete /var /backup/var
service cyrus-imapd start
##########################

I will try to catch up and study this progam also .
So much to learn...

Thank you very much for the comments.

Yizhar




"Mike Brodbelt" < XXXX@XXXXX.COM > wrote in message
news: XXXX@XXXXX.COM ...



 
 
 

My first IMAP server

Post by Kev » Wed, 12 Jan 2005 18:42:57

>> Filesystems: XFS or ReiserFS

Just one note on this, as I just setup a cyrus server on (Fedora Core 3)
Linux using reiserfs as the /var/spool/imap filesystem. I also copied a few
GB of mail to it, and this confused me for a while:

root $ du -sk /var/spool/imap/d/user/dummy_user/
4963933 /var/spool/imap/d/user/dummy_user/

cyradm > listquotaroot user/dummy_user
user/dummy_user STORAGE 3536478/3700000 (95.5804864864865%)

Note that though my users quota is about 3.7 GB, the actual
usage on the disk is closer to 5GB.

I presume the reason is that most mail files (which cyrus
stores as individual files) are of smallish size, and on
average "waste" around half-a-block of disk space. For the
default reiserfs options that 2k per mail. With a lot of
mail that number soon reaches the gigabytes of wasted space.

I also presume that the (FC3, kernel 2.6.9-1.724_FC3smp) default for
reiserfs fs is "notails". Using "tails" might help, but I guess would
impact performance somewhat.

I dont know if xfs (or ext3 or jfs or ...) are any "better" in this regard.

Kevin
 
 
 

My first IMAP server

Post by David Magd » Thu, 13 Jan 2005 01:40:42

Mike Brodbelt < XXXX@XXXXX.COM > writes:


Or use star:

http://www.yqcomputer.com/

(Not everyone likes its author, but star is highly capable software.)

--
David Magda <dmagda at ee.ryerson.ca>, http://www.yqcomputer.com/
Because the innovator has for enemies all those who have done well under
the old conditions, and lukewarm defenders in those who may do well
under the new. -- Niccolo Machiavelli, _The Prince_, Chapter VI
 
 
 

My first IMAP server

Post by John Murta » Mon, 17 Jan 2005 06:09:48

"Yizhar Hurwitz" <yizhar at mail dot com> writes:



Would not recommend dump on ext3, especially on a mail server
where files are changing/moving rapidly. We used to use it on an
active mail server (until we tried a restore and the files were a
mess!). Dump make a first pass looking at inodes, and then goes
after the files -- things can really get confused when the filesystem
is active. We still use dump, but first we rsync to a 'quiet' disk,
then dump that.

Hope this helps!
--
John
___________________________________________________________________
John Murtari Software Workshop Inc.
jmurtari@following domain 315.635-1968(x-211) "TheBook.Com" (TM)
http://www.yqcomputer.com/
 
 
 

My first IMAP server

Post by Mike Brodb » Tue, 18 Jan 2005 21:23:50


Yes - dump on an active ext2/3 filesystem can be a *bad* thing. Ext2/3 is
probably the worst choice filesystem for Cyrus anyway though - it really
is worth spending the small amount of time necessary to user XFS/ReiserFS.

Mike.