Slashdot Mirror


E-Mail Server Setup Advice?

dhammala asks: "I am responsible for setting up and maintaining a mail server for small web-hosting type business. We currently host about 75 domains, around 100 mailboxes and due to the efforts of our sales team, we are wanting to get ready for some great increases in those numbers. I am worried about my current configuration and ease of administration. More importantly (well, at least to the customers) is email deliverability -- it seems that messages delivered to some big players are being marked as SPAM or disappearing altogether. I am asking the Slashdot community for it's insight and advise on 1) if my current choice of software/configuration is a good match for this situation and 2) if there any additional measures I might take to ensure email deliverability?" "Here is an overview of our current setup:
  • We lease servers at ev1servers.net.
  • The servers are running RHEL ES3.
  • We chose to use Postfix and have it configured to support virtual users and domains mapped in MySQL tables. The reference I used to configure this setup is located here. We initially chose Postfix over qmail because it was open and over sendmail because the config files are actually readable.
  • I have added in SQLGrey grey-listing for Postfix to provide a simple level of SPAM detection for our users. We are not wanting to deal with the customer service and higher box loads of mail scanning at this time. We might choose to use a 3rd party vendor to do this as needed.
  • Messages are delivered locally via maildrop in maildir format.
  • Courier IMAP is running to support both IMAP and POP access to the mailboxes.
  • Postfix Admin was setup for easy mailbox administration.
For deliverabilty, I have/am taking the following steps:
  • I have verified that our reverse IP records are correct
  • I have created SPF records for all of the domains
  • I have verified that our server is not listed in any blacklists (great scanner at dnsstuff.com)
  • I have started to install DomainKeys for Postfix
In doing all of that, I have found that our IP is listed in the BlarsBL. Do I need to be concerned about this rogue list? The IP was there before I even began to setup the box.

I have not yet been able to get DomainKeys to work with Postfix. It was during my configuration attempts that I started to question this setup and wondered if this was the best setup for our situation.. this inquiry has lead to this posting.

In a perfect world, I would have an email server that:
  • is easy to administer,
  • supports automated mailbox setup/removal (currently I can just insert rows into my tables and the mailbox setup is done)
  • supports current technologies, like grey-listing, DomainKeys, etc
  • is secure
  • makes the best use of system resources -- I want to get the 'best bang for the buck'
So what do you think? If I stick with this setup will life be grand? I am open to something new AND even taking the time to learn a new setup. If I do need to switch to something different, my only concern would be the ability to migrate existing mailboxes and messages over to the new setup.

Are there any other technologies or configurations that I need to implement to support the best deliverabilty rates?"

67 comments

  1. Full out of box solution. by Anonymous Coward · · Score: 3, Informative

    It's not free, but great support and full everything right out of the box, including IMAP, POP, SMTP, HTTP, authentication, account management, quotas and everything else you could possibly want.

    If your company can't afford it, that sucks, but I'd rather use that than try and get courier, postfix, pop3d and squirrellmail or whatever to all work together.

    http://www.sun.com/software/products/messaging_srv r/home_messaging.xml

    1. Re:Full out of box solution. by BoomerSooner · · Score: 1, Informative

      Don't use the Sun Messaging if you want to keep your clients happy. My university used to run QMail with Horde/IMP and it was kick ass (I subsequently moved my mail servers to that combo). They then for some unexplained reason (probably easier to admin or they got a deal since they are a university) they switched to this piece of shit software.

      IT FUCKING SUCKS. You have about 1/10th the features and it runs significantly slower (I cannot verify the hardware is the same but the previous systems were IRIX on SGI machines, my best guess is this POS is running on Sun based systems).

      Clients want more features not less. If you cannot administer the system yourself then hire someone who can. There are many consultants out there that are reasonably priced. If my email went from something great to something shitty I'd be pissed.

      When Yahoo Mail and GMail are better than what you can offer for free are better than what you charge to offer, do you really deserve to have any customers?

      Learn to properly admin a mail server, end of story. Hell you could even use Exchange. However that is more difficult than any other combo you can put together in my opinion.

    2. Re:Full out of box solution. by Nos. · · Score: 1

      I don't know who modded you as a Troll, but they should have their mod rights revoked, or get paid by Sun.

      I have also been on the user side of Sun's Messaging service. I can't express how frustrated I am with it. Calendaring is a joke. The web interface is behind what most OSS products were years ago. Whatever you do, don't rely on the "JES Connector" to get your Outlook client to interface with the calendar. Have my entries are missing through outlook, but show up fine in the thin client. Speaking of the thin client, if you use it, and use it to store bookmarks, don't let your session time out. Clicking on a bookmark is not a direct link to the site you want to go, but to some internal redirecting script which needs to authenticate you.

      At home I run Postfix with MySQL, amvisd-new with SpamAssassin and ClamAV. Zero problems, simple administration, and between Spamassassin and RBLs, I see about 1/100th of the spam that directed at me.

  2. http://www.clamav.net/ by kapplepc · · Score: 3, Informative

    I recommend setting up ClamAv with FreshClam to filter out virus/worm type email. I have found it performs very well on my server. I have also found they have a very fast responce to new viri as they appear.

    http://www.clamav.net/

  3. one word by Anonymous Coward · · Score: 0

    postini. its more expensive, but its worth EVERY CENT.

    evil too. they have a free trial, and the filtering is of such high quality youll be hooked.

    1. Re:one word by slasher999 · · Score: 2, Insightful

      Agreed. Postini does a great job. Been using them for years in one capacity or another. I just wish they had a consumer level solution.

  4. Blame by Anonymous Coward · · Score: 0, Interesting

    You do realize that when something breaks or is misconfigured or *you* do something wrong and it affects your coworkers or your customers - you will take full blame, right? You're not going to have th ability to call one person that will support you and fix you and take the blame for anything that went wrong?

    Not only that, but with so many different groups involved in your email solution, just getting good support even in the community will be hard to do. It's not like there's any QA done between X and Y and Z on A and B hardware and C environments.

    Not to mention, nobody is obligated to help you out in a certain timeline (say, you may or may not ever get an answer rather than getting an answer and help from someone live within an hour).

    Sometimes you get what you pay for. And in big-business email centers - it's such a case.

    Personally, I use postfix and qpopper and spamassassin, but I'm also not providing email for a hundred or a few thousand customers.

    1. Re:Blame by Confessed+Geek · · Score: 2, Funny

      Ah HA! caught an Exchange salesman in the Act! This is astroturfing at its best ;)

  5. Dear Slashdot by Mensa+Babe · · Score: 0, Troll

    Please do my work for me.
    Sincerely, Slashdot reader.

    --
    Karma: Positive (probably because of superiour intellect)
    1. Re:Dear Slashdot by Shimdaddy · · Score: 1

      Why are you so mean? This is unnecessary, and it's flamebait. It seems to me you should be doing your work and not griping at others. He asked a legitimite, detailed question and I think one that many others of us will run into someday. This question serves as a reference for more people than the author, and is in general a learning experience. So chill out.

    2. Re:Dear Slashdot by Seraphim_72 · · Score: 0, Offtopic
      Dear Mensa Babe,

      Get over yourself, is is at best a flawed IQ test.

      Kisses

      Sera

      P.S. The guy is obviously in over his head and was looking for help, glad to know "Mensa" would toss a drowning man an an anchor.

      --
      Slashdot, where armchair scientists get shouted down and armchair theologians get modded up.
    3. Re:Dear Slashdot by pauldy · · Score: 1

      Why complain this is what Slashdot is. There is no more tech news after the dot com bubble so now we must suffer through people who are indecisive, unsure of themselves, and genuinely befuddled by the technologies they work with day in and day out. It shows people responsible for exploiting the technologies are even more clueless than the people they hire to manage and implement them.

      But take heart, one of these days an invitation only Slashdot will emerge and it will cure many of the issues plagued by the original with real "News for Nerds" and stuff that really matters. Mmmm, I'm dreaming about it right now.

    4. Re:Dear Slashdot by michaelhood · · Score: 1

      Superiour, eh?

  6. Why Postfix/courier? by Lenolium · · Score: 2, Informative

    So, I have a mail system setup, it's running around 70 domains, and 500 email accounts.

    I am using courier as the mta, and courier as the pop, and courier as the imap.

    The courier makes a fine MTA, but you do have to tweak a few of it's settings to make it more wideopen to allow it to connect to misconfigured exchange servers.

    Other than that it has been great. I have a email account management system that I wrote that lets each domain have admin users that can add and delete accounts as they please.

    I have SpamAssassin setup for some users (most of them post their email addresses in plain text on their websites) and even with that load, there is still plenty more capability in this little server.

    Now, if you want a system that scales to tens of thousands of users, you are going to need to get something a little bigger than this, you are going to need to get a mail system that can distribute the messages over a number of servers. That is something I have not researched.

    1. Re:Why Postfix/courier? by iamcadaver · · Score: 2, Informative
      Now, if you want a system that scales to tens of thousands of users, you are going to need to get something a little bigger than this, you are going to need to get a mail system that can distribute the messages over a number of servers. That is something I have not researched.

      It might be called Hula: http://www.hula-project.org/

      --
      Before I part with'em: two pennies weigh ~4.996+/-0.014g, have a zinc core, and the face of Lincoln. You can keep 'em.
    2. Re:Why Postfix/courier? by Confessed+Geek · · Score: 1

      How do you handle vacation messages? I'd like something users can turn on and off but there seems to be no built in function in courier

    3. Re:Why Postfix/courier? by richie2000 · · Score: 1

      It's implemented by using a .mailfilter file in the user's home directory per the descriptions in the maildrop docs. How to change the .mailfilter file is left as an exercise to the reader but Courier's own webmail has support for it.

      --
      Money for nothing, pix for free
    4. Re:Why Postfix/courier? by phoenix_rizzen · · Score: 2, Insightful

      Cyrus IMAP does this using the MURDER protocol, which has been submitted as an Internet RFC. Cyrus also supports the SIEVE protocol (another Internet RFC) for server-side filtering.

      This is the solution we will be migrating to this year (Postfix, Cyrus, SquirrelMail) for ~1600 accounts in 1 domain, with another setup for next year using ~15,000 accounts across 15 domains. User accounts are stored in an OpenLDAP directory.

    5. Re:Why Postfix/courier? by Confessed+Geek · · Score: 1

      Yes, thats the point I had gotten to. I had hoped someone had developed a "user easy" way of doing it. Guess I'll have to break down and write it myself :P

    6. Re:Why Postfix/courier? by richie2000 · · Score: 1
      I had hoped someone had developed a "user easy" way of doing it.

      Oh, they have. Zillions of ways actually. There's no standard to make an e-mail client tell the server that the user is on vacation, so you end up with webmail-powered kludges, one or more for every webmail/MTA combination there is. You should be able to find one for whichever webmail program you're using - but you're almost guaranteed that another webmailer got the "good" vacation kludge and you got stuck with one of the bad ones.

      --
      Money for nothing, pix for free
  7. Thank you for your public service by Anonymous Coward · · Score: 0

    I would have done it myself but you, a MENSA babe, had already done it.

    1. Re:Thank you for your public service by Seumas · · Score: 1

      IT'S A TRAP!!!

      It's really Men's A Babe.

      Don't fall for those TV/TG tricks!

  8. Courier IMAP by embo · · Score: 2, Informative

    Courier IMAP is running to support both IMAP and POP access to the mailboxes.

    I would switch to dovecot. I found the performance to be quite a bit better than Courier, and it seemed more stable as well.

    1. Re:Courier IMAP by detzli · · Score: 1

      I had the same experience with it... until i upgraded to the newest version. Config file stopped working, had to rewrite it. And after i did that it just wouldnt work like it used to, it just says "Internal login failure".

  9. Hard work. by Seumas · · Score: 5, Insightful

    I support email servers for a living. I have for almost seven years - exclusively on Solaris, AIX and NT (though I do so on linux for my personal use).

    While I think that your deployment is a reasonably sane one - as far as going the OSS/free route is concerned - I agree with the other poster here who said that having nobody to blame will be an issue in the future. When your job is on the line, it's good to have someone else who is supposed to know and fix everything for you when you are hard-up for solutions. Email administrators for the largest and biggest corporations in the world don't do it all in-house. Even they contract out for support for their enterprise level products. Because their customers and bosses expect great reliability and performance and features and they don't want to wait for several days (or longer) while you read some half-assed documentation on a website, chat up some gurus in IRC and post to some web forums and usenet groups hoping for help.

    Also, there is nobody certifying that the products you are using will absolutely work together. And on whatever platform you're using. They may say they've tried it on it - but I doubt in many cases they will say it's been certified through a thorough internal QA process that weeds out a lot of bugs and such.

    Also, when you really must have something fixed, you will either have to write the code yourself (laborious to do, without even talking about testing and implementing). If you have a commercial product and a contract, you can present a business case to get your issue some priority and have a fix. And you can always threaten to drop the product if they don't do what you want (it works more often than you'd think).

    Even when full-fledged, thorough, all-encompassing high-capacity commercial servers - the position of email admin is a full time job for at least one or more people. Using a dozen different open source products and maintaining everything and keeping a constant sandbox environment to work in (you don't want to introduce upgrades or patches or changes on production, of course!) will consume all of your available time. If you are the full-time email admin here and that is your only responsibility - have at it. But if you have other responsibilities... I think the commercial path might be better for you.

    Again - I'm an OSS advocate. Yet, I feel strongly that there are some cases in which commercial software and support is valuable. Depending on the specifics of your duties and position, this may or may not apply to you. But consider it. Especially if you're going to be fairly huge some day.

    Another solution would be to contract with a third party. There are companies that do nothing but provide you with email solutions. They can do this based on very strong commercial products. These companies themselves will host and run the hardware for you. They will do all of the configuration and deployment and maintenance and administration for you. I'm not familiar with their prices, though - but do look into it. The upgrades and crashes and migrations are their responsibility. Meeting QOS is their responsibility. They will deal with the commercial mailserver vendor(s) for you. They already have support contracts with them. All you do is tell them how big of a deployment you want and you're set.

    After working with commercial mailservers for several years, I was ready to setup a deployment of my own for my own personal project. Not having any funds, I decided I was going to go the OSS rout. Just figuring out what would work together and what wouldn't (you have to make sure your POP, IMAP and webmail servers all use the same mailbox formats. You have a gazillion options for accounting from LDAP to MySQL, countless authentication mechanisms, etc). It drove me nuts. It was at that point that I started to see the light and the real value in what I did with commercial products. Having an entire server that supports everything you could possibly need or want in an email solution through one install and one configur

    1. Re:Hard work. by Confessed+Geek · · Score: 1

      You know I was really with you until you got to the part about no IMAP OR Webmail... Now I'm rather dubious... Your users ALL have laptops or never go on vacation/offsite and still want their mail? Your company allows the security risk of downloading mail to untrusted machines?

      I'm really confused here. You sound like a smart guy but this last decision makes you sound like a duffer, or you have been using Out of the Box for way too long.

    2. Re:Hard work. by Seumas · · Score: 1

      As I said, the OSS deployment is for a personal project. I run a huge website and it sends out thousands of emails per day (notices, registrations, password reminders, etc) and recieves several times that (75% of which is spam).

      Since there are only a handful of users, POP is just fine. Or in my case, just ssh-ing in and firing up mutt on the server.

      If I were offering an email service to people, I'd spend more time on one of the five zillion webmail "solutions" out there or with IMAP. Of course, that'd still depend on how much performance I wanted to sacrifice on the system just for people to use IMAP and webmail.

      I definitely didn't want IMAP and webmail for my own use enough to keep playing with all the IMAP servers out there (and webmail setups). I found an IMAP client I liked once and a webmail client I also liked. But one used maildir and the other used mbox. So at that point, I just said "fuck it" and realized that I was wasting far too much time on an email solution for a single person when pop and mutt would both do. :)

    3. Re:Hard work. by DavidTC · · Score: 1
      Man, either the astroturfs are out in force, or no one here can read. This is the second message that says 'Everything might work together or might not, who knows? Commercial solutions tend to be easier.' (And explictly says 'I'm an OSS fan'. What, you guys got the same script?)

      Well, let's look at what software he's talking about.

      Postfix.
      SQLGrey: A policy server for postfix (In fact, it won't work with anything else. 'Policy servers' are a postfix invention, designed to provide half of the functions of a sendmail milter without being, you know, so stupid.)
      DomainKeys for Postfix: A postfix content filter. Interestingly, this might work with other servers, as it's just talking SMTP on local socket. Regardless, it's designed for postfix.
      Postfix Admin: Nuff said.

      The two last, remaining piece of software, courier-imap and maildrop, are admittedly not designed to work 'with' postfix. They are, however, designed to work with each other, as they are both from the 'courier' mailserver package.

      And courier-imap doesn't interact with postfix in any way, shape, or form. maildrop puts the files somewhere, courier-imap picks them up.

      So that leaves the postfix to maildrop interaction as the only interaction between 'things that haven't been tested to work together' in the entire system.

      And, um, the interaction is postfix running 'maildrop email_address' and then catting the mail message, asking maildrop to deliver it. It's fairly trivial to set up, it's adding two lines to postfix's config. In fact, I think that one of those line are already there, you just have to uncomment. There are dozens of walkthroughs, and they are about two screens long, and they include installation and config. In fact, maildrop is the recommended delivery agent of postfix if you have a system too complicated for it to handle.

      That's not to say things can't be complicated to set up. Setting up a mysql postfix with maildrop and courier-imap can be tricky. How do I know? I've done it. (Although I have recently removed maildrop, as the 'virtual' delivery agent in postfix has gotten much better.)

      But it's not tricky because 'things might not work together'. At all. The trick is getting postfix to talk sql. And maildrop to talk sql. And courier to talk sql. And sasl to talk sql. And something to run in the background actually making mailboxes you put in your SQL.

      You have to do more configuring, in more places, with seperate OSS packages, and I'll be the first to admit it. But you don't have to configure the mail software listed to 'talk to each other', mail software is damn good at following standards in interaction, especially the newer stuff. You have a SMTP server, it hands mail off to a delivery agent in a trival way, this delivery agent puts the mail somewhere, and the pop3/imap server locates said mail. It's not rocket science. You can use pretty much any software at any stage of that.

      Now, taking you at your word, you should have known this. Everyone who has an opinion of OSS mail servers should know this. You pick qmail/postfix/courier-smtp/sendmail/exim/smtp_serv er, you pick maildrop/procmail/delivery_agent, and you pick courier-imap/dovecot/pop_server, and they all magically Do The Right Thing, assuming that you've decided beforehand where the mail will go and in what format. In fact, you can switch any of those things, usually on the fly, and the others keep working, although switching smtp servers on the fly is a good way to kill yourself.

      --
      If corporations are people, aren't stockholders guilty of slavery?
    4. Re:Hard work. by Seumas · · Score: 1

      I'm sorry, but I've dealt with far too many email admins who didn't have a clue and were responsible for an entire enterprise structure that could barely manage simple tasks, much less figure out a complex mish-mash of OSS solutions. It isn't that they're deficient, but you have to plan a deployment for the level of administration that is going to be afforded to it. Someone who is posting to Slashdot of all places - to get a review of their deployment plan - is (and no offense to the submitter) probably not more than an armchair email admin. He doesn't really say what his email-related expertise is, so I have to assume it's "average" or below. And if not him, then at some point they will be hiring an admin to do his work for him after the deployment (or if he's laid off or run over by a bus - whatever).

      His deployment plan is complex when compared with most commercial solutions and because he'll be the sole point of support and maintenance, when he moves on the next guy who takes over will have to have all of his knowledge and skills and understanding of this deployment. It has the potential to become a mess.

      I think you will find that at least half of "email admins" don't even know how to telnet to 110 or 143 or 25 and run a manual session. In fact, based on my experience, I would wager that far more than half don't know how to do that.

      So I'm certainly not going to suggest mishmashes of OSS software without professional support to such people. And I've learned not to assume that everyone is a genius. And not everyone, certainly, is a professional mail server admin. It sounds to me like this is sort of a project he was thrown at and he is picking it up as he goes along. (For the record, I'm not a professional mail server admin either - that isn't where my focus lays - but I have dealt with enough of them to see the pitfalls they've encountered with commercial and OSS products).

      So, what I really want to know is this:

      He's clearly not a professional experienced admin of mailservers. This may be his first bit foray into a full deployment in a production environment. He has four or five major components. When postfix goes tits-up or he encounters some sort of trippy IMAP flag behavior or corrupted mailboxes that he can't manage to fix... and thousands or tens of thousands (if this company is growing) of users are without service and they're all losing business due to the downtime... Who is he going to go to? What if he's on vacation and the webserver guy is stuck having to figure out what's wrong with the mailserver and he doesn't have a clue?

      I'd take talking to someone within minutes over having to post to some forum or IRC channel and hoping I get something useful from a bunch of people who are not obligated to help in any way. In a non-corporate environment, that'd be a different issue. I can take the time to get help or learn what's going on and debug the situation.

    5. Re:Hard work. by Directrix1 · · Score: 1

      I found the following to be very easy to deploy and maintain, requiring only a minimal amount of time. Granted we only have about a hundred email addresses but, still I spend very very little time maintaining this setup: QMail (SMTP and POP3) QMailScanner with SpamAssassin and ClamAV BincIMAP And its all running off a 1.8GHz P4 (granted with high load).

      --
      Occam's razor is the blind faith in the natural selection of least resistance and in universal oversimplification. -- EF
    6. Re:Hard work. by observer7 · · Score: 0

      thank you for your support check is in the mail

    7. Re:Hard work. by DavidTC · · Score: 1
      I dunno, maybe you're coming from six years ago.

      But it's not as complicated as it could be, if sane choices are made.

      That means absolutely no sendmail. That means Maildirs, so you don't need any file locking at all. That means users stored in one place, be it SQL or LDAP, and not a brittle text file under any circumstances.

      A lot of that is choices, and many people don't know how to make good ones, but this guy does. In fact, he's managed to chose exactly what I chose, three years ago, at least for the basics.

      And this plan, as I pointed out, isn't complex. A postfix policy server doesn't increase the complexity of anything at all. An imap server that isn't part of a SMTP server is less complex than if they cared about each other. You can write a mail delivery agent in four lines of shell script. None of those things are externally complex, none of them interact with other things in complex ways.

      You seem to think that small things talking to each other is more complex than one big thing. That is just completely wrong. Small things that talk to each other in well-defined ways are easier to deal with.

      Because, and speaking of checking things manually, you can manually tell maildrop to deliver a message, you can replace maildrop with something that just dumps every message to a file to see if it or postfix is manging a header, and you can manually look at a Maildir mail message to see if the imap server or maildrop is confused. You can't do that if your server is one big black box where you put in mail on port 25 and get it out port 143.

      The only added complexity to his setup is the content filter, which requires postfix accepting mail, and then delivering to a non-postfix server running on localhost and a weird port, which then does scanning and hands it to another postfix instances. While that is needlessly complex, it seems to work without any problems at all, and, if it does have problems, a single line commented out will fix that.

      And, yes, if he doesn't have time to be a mail admin, he shouldn't be one, but mail systems run themselves if you do not fiddle with them and set them up correctly. The only non-spam-fighting change I've made in several years to the system I administer is changing 'maildrop' to postfix's own 'virtual' delivery agent (Something, BTW, I would recommend to this guy.) because it got smart enough to work for me, and finally getting sasl2 working. (Before I was using a postfix patch called simple_auth, which worked fine but was limiting my upgrade options.)

      --
      If corporations are people, aren't stockholders guilty of slavery?
    8. Re:Hard work. by PunkeyFunky · · Score: 1
      Email administrators for the largest and biggest corporations in the world don't do it all in-house. Even they contract out for support for their enterprise level products. Because their customers and bosses expect great reliability and performance and features and they don't want to wait for several days (or longer) while you read some half-assed documentation on a website, chat up some gurus in IRC and post to some web forums and usenet groups hoping for help.

      Speaking as an email admin for an $80bn company, with around 10million internet messages/day, I can say that we do everything in house.
      We're a sendmail shop, with mimedefang and spamassassin, and various in-house mods/changes. We deliberately stick with OSS, and have so far resisted the management pressure to go for a commercial 'supported' solution.
      -L
    9. Re:Hard work. by frn123 · · Score: 1

      What are you guys doing getting 1.8GHz machine into high load?

      I run a Celeron300A(OC to 450Mhz) with 192Mb of memory and regular IDE disk. We have about 150 e-mail accounts, all of them get filtered thru SpamAssassin and ClamAV, and the load is about 0.25!

      Debian Postfix-Amavis setup.

      Oh, that machine also handles some 10 orso low-traffic webpages, has UW-IMAP + squirrelmail + IMP.

      How in the hell can you get 1.8Ghz machine on his knees with 100 mail accounts?

    10. Re:Hard work. by Directrix1 · · Score: 1

      Well, it had 128MB memory. And the reason it really gets loaded down is because hourly I have clamscan scan everybody's mailboxes including inside zips, rars, etc. (this takes a while, but its mainly to ensure that I don't dish out a virus thats discovered after the mail has been received). And also, its the proxy server for the local LAN (about 200 computers). Now that I updated the RAM to 512 its not bad though. And also, all connections use AUTH over TLS/SSL (including SMTP for outbound connections). The real killer though is running clamscan on all the zip files in peoples mailboxes (we receive lots of multimegabyte zip attachments). When you say the load is 0.25, what metric are you specifying? 0.25% 25%? On our system with the increased RAM it tends to hover around 30% to 60% while clamscan does its business.

      --
      Occam's razor is the blind faith in the natural selection of least resistance and in universal oversimplification. -- EF
    11. Re:Hard work. by frn123 · · Score: 1

      Ah, i see - re-active scanning might take a lot of time.

      Load is usually specified as of output /usr/bin/uptime binary or as output of /usr/bin/top.

      Cat /proc/loadavg on linux box shows load too.

  10. Seconded by metamatic · · Score: 1

    Courier IMAP is pretty poor. UW-IMAP is a piece of crap. Binc might be good now (it has the right goals), but was too immature when I looked at it.

    Switch to Dovecot. Also, if you haven't already, switch to Maildir for your storage format. The mbox format is a disaster when dealing with IMAP clients like Apple's Mail, which opens multiple folders at once, thereby locking them all and blocking mail delivery.

    --
    GCHQ Quantum Insert installed. If only our tongues were made of glass, how much more careful we would be when we speak
    1. Re:Seconded by Sexy+Bern · · Score: 1

      Also Maildir is much better for backup/recovery of messages. rsync or rsnapshot work beautifully with Maildir. Performance from LookOut! is better too.

  11. CommuniGate - Not free but.... by DigitalReverend · · Score: 2, Informative

    It is easy to use, can be expanded to cluster servers and is reliable.

    Works with squirellmail, and a bunch of other cool features. Plus the name of the company is kind of cool.
    http://www.stalker.com/content/solutions.htm

    --
    I read Slashdot for the headlines, because the headlines, unlike the articles, are usually original and never duplicated
  12. to the original poster, my personal opinion by Kalzus · · Score: 2, Interesting

    If I were you, I would ask myself at least this:

    "If the building the server lives in falls into the center of the earth, but my boss wants the mail back up (not necessarily with their data, just live again), would I be able to put Postfix, SQLGrey, LDAP auth and Courier back together in less than 4 hours except for user accounts?"

    If you are sufficiently detailed enough to pull that off within 4 hours except for user accounts, you probably have the bits you need to wing all the rest of the bells and whistles (webmail, MAPI integration, upgrading one piece and making sure the other 11 don't die, etc.) which eat up your time.

    The main problem with going commercial (which you should consider if you're sure it'd take you at least 8 or 9 hours of a day to put this together from zero) is that the extra features (Outlook integration via MAPI, etc.) tend to cost.

    OTOH, if you go commercial the extra features are not yet another thing you need to spend time on because presumably you're paying for parts that already work.

    Choosing a path starts with your honest appraisal of your own skills.

    (Personally, I find Postfix + SQLGrey + Postfix virtual delivery agent to rock. But I don't mind going into the guts to add a new user or set a quota on an abuser or whatever. QMail I've found to be a tad dangerous. Often the slightest typo either puts qmail-send in a mad CPU loop (which is annoying) or delivers it in the wrong place (which is really annoying) or 5xx's it (bad). Adding extra steps into the qmail handling pipeline is a nightmare and should never be done on a production box first. But maybe I suck.)

    --
    "The Devil does not know a lot because He's the Devil, He knows a lot because he's old." -- unknown
    1. Re:to the original poster, my personal opinion by Anonymous Coward · · Score: 0

      would I be able to put Postfix, SQLGrey, LDAP auth and Courier back together in less than 4 hours

      From scratch? No. From backup tape? Yes.

  13. Suggestions by Bruha · · Score: 2, Informative

    Check out inter7.com

    They use Qmail which is open source. Who told you it was not?

    Qmail is highly scalable and I think www.qmailtoaster.com and a few other sites provide great setups that allow you to set quotas and such.

    large game sites use qmail.

    Hell hotmail.com uses qmail to send emails. Not sure about the rest of it.

    Inter7 can get you setup properly and provide maintenance if you have problems but otherwise their setups are self manageable.

    1. Re:Suggestions by Trepalium · · Score: 1
      Qmail is a fine MTA that is really beginning to show it's age, and was written by a control freak. If you want to run a Qmail system, you're basically forced to maintain your very own patch repository because the base package is almost completely inadequate these days. You cannot do spam filtering, virus scanning, SMTP authentication, TLS, or anything djb didn't believe was important.

      I switched from qmail to postfix, not because qmail was defective in any way, but rather because postfix is maintained. Since I use this mail server as a front-end for MS Exchange, I can finally reject invalid recipients without sending a bounce message. The anti-virus and anti-spam systems integrate into the system in ways that make sense. Plus, I have a more conventional system since I no longer have executables in /var, an alien service management system running (daemontools), and a single purpose tcpwrappers (ucspi-tcp) installed. I know that I could rebuild my Postfix system with just the config files -- I couldn't say the same about qmail.

      Besides, qmail's license doesn't qualify as OSS or Free software under either OSI or DFSG guidelines. You are not permitted to distribute modified versions of the software, which is pretty high on the list of DFSG/OSI requirements.

      Postfix may not be as secure as qmail (it has certainly had more security vulnerabilities), but I'm a heck of a lot happier with it.

      --
      I used up all my sick days, so I'm calling in dead.
    2. Re:Suggestions by gregwbrooks · · Score: 1
      A variation on a theme: build a FreeBSD toaster based on Matt Simmerson's recipe at www.tnpi.biz. There's a very large user community that helps out via mailing lists, the instructions are outstanding and it's got all the goodies: Webmail, tarpitting, antivirus/antispam, web-based config or command-line config, etc. Matt and others offer for-fee troubleshooting and/or set-up, but chances are you won't need it. And it is secure as hell.

      Yeah, I run it -- consider me a satisfied customer/fanboy.

      --


      "It was a summer's tale: Just a boy, his Linux, and a head full of dreams..."
    3. Re:Suggestions by dodobh · · Score: 1

      See the qmail license. You cannot modify and distribute qmail, and you cannot distribute binaries.

      --
      I can throw myself at the ground, and miss.
  14. To create mail directories on fly. by DavidTC · · Score: 2, Informative
    Download this.

    Then, assuming you know how to write PHP code, throw away the php. It's not that good. It can't handle fields being added to the database. But writing php for database manipulation is trivial, so I'll assume that's what you're already doing.

    Anyway, what you need from 'vmail' is the 'maintain' perl script. It's fairly easy to understand. Basically, you want a 'new' table in your database with new email addresses, a 'deleted' one for deleted addresses, and a 'moved' one for moved emails. So in addition to editing your main mail table, you also put email addresses in those tables when those things need to happen.

    The script pulls these out of each table and does the things. It doesn't mess with your main table at all.

    Now, the perl script needs to turn that email address into a directory. It starts out as hostname.dom/u/user/ from user@hostname.dom, but you can change that however you want with a bit of perl study.

    Or, instead of putting the email address in the tables, you can just put the directories, and tell it not to try to make that into a directory at all. That's probably simplier if you already have the rest of the system set up with other pathnames, and you don't know perl.

    I experimented with cgi scripts and whatnot, but this was much easier. You can either put in cron to run every minute or so, or you if it is important updates happen instantly, you can make it suid and run it from a cgi script or from php.

    As an added bonus, that script is so nicely written you can make other tables and make other things happen. It's a nice way to keep restrictive permissions on your webserver, but have nice, protected php pages that can make 'requests' that get executed at certain times.

    I have a copy of it that lets people change users listed in .htaccess files, although I don't currently have an interface to it. And I have one that will create apache config files and empty directories with the right permissions, and then restarts the web server, for when domains get added.

    --
    If corporations are people, aren't stockholders guilty of slavery?
  15. FUD alert? by Anonymous Coward · · Score: 0

    We initially chose Postfix over qmail because it was open

    Who told you this little chestnut? Are you planning on redistributing qmail? No? Then you don't even need a license (which is good because it doesn't come with one ;-).

    qmail is just as "open" as postfix if you're just using it, and has the advantage of being simpler and guaranteed secure.

    I have set up qmail on several BSD boxes and some of those boxes have not been touched (rebooted, upgraded, hacked, whatever) in *over 2 years* (verified with Tripwire). Try that with windows sometime...

    I have nothing against postfix, mind you, I use it on my home machines and in certain situations that need flexible setups, but qmail is great for "set up and forget" situations.

  16. dbmail by thing12 · · Score: 1

    I'm surprised nobody has mentioned dbmail yet. It's a nice prepackaged substitute for maildir/courier/mysql virtual users, etc... It's not a substitute for everything you require, but it will simplify your most common admin tasks.

    1. Re:dbmail by pyrrhonist · · Score: 1

      Fixed linky: dbmail :)

      --
      Show me on the doll where his noodly appendage touched you.
    2. Re:dbmail by thing12 · · Score: 1

      doh! thanks

  17. HELO, VRFY, and stuff by dacarr · · Score: 1
    Make sure you turn on the requirement for HELO and turn off the SMTP VRFY command.

    If you do something that's going to drastically alter your server's behavior, do 'inet_interfaces=localhost' to test, then restore to 'all' when you're sure it's working.

    --
    This sig no verb.
  18. Personally... by Shads · · Score: 4, Informative

    ... after hosting using Exim3 and Exim4, Postfix, and Sendmail... if i were doing a "Large" config again (read 1000+ domains, 30k+ accounts) I wouldn't consider anything *but* sendmail. It's not the easiest, newest, or anything like that, but it does scale extremely well. The setup I'm currently using (about 10 domains, 70ish accounts) is:

    Exim4 SMTP
    Dovecott IMAP and POP3
    Bogofilter
    Spamassassin (SA-Exim)
    Clam-AV

    It's a rocking system, I'm currently having about 18000 messages a day tossed at me of which about ~17000 are spam. My personal accounts were getting about 2500 spam/day until I enabled all the anti-spam software and virus removal. I now get about 1-2 Spam a day and I've not had a single false positive.

    For a small mid range setup I would probally use exim4. It's simple, has great features, and it's nice to have spamassassin at smtp time instead of having to process the entire message.

    I don't recommend standard RBL's, however, the URI RBL's are *extremely* effective and an order of magnatude more sane in what they block (eg: if the message contains a link to viagraforyou.com it blocks the message, rather than blocking random dsl servers and /16 netblocks of ip addresses to catch a single spammer... some of the standard rbl's are nutzo.)

    Theres a nice tutorial and informational link about using all the good features of sendmail and several additional ideas and theories on what is effective and what isn't at http://acme.com/mail_filtering/ the guy gets *insane* quantities of mail (mostly spam) and tells how he deals with it.

    Synopsis: Large site- Sendmail, Medium/Small Site- Exim4.

    Alot of people like qmail and postfix over sendmail and exim, but I just don't care for them having used them. Although if forced to choose between postfix and qmail it would be qmail.

    --
    Shadus
    1. Re:Personally... by dodobh · · Score: 1

      I am a BOFH at a very large email hoster. We use Postfix. It scales up very well, and is rock solid.

      BTW, those graphs are pretty small compared to our numbers.

      --
      I can throw myself at the ground, and miss.
  19. Dovecot rocks... by schon · · Score: 1

    I *LOVE* Dovecot!

    If only it did shared mailboxes, it'd be perfect.

  20. Trust Tiers by Sparr0 · · Score: 1

    I would suggest setting up a number of outgoing relays. Group your customers into tiers of trustworthiness. Everyone goes on server 1 to begin with. Anyone who behaves for 3 months gets moved up to server 2. Anyone who behaves for 3 months there gets moved up to server 3. Anyone who misbehaves gets moved back down to server 1, and anyone who continues to misbehave on server 1 gets disconnected. This ensures that your non-spamming customers end up with more reliable delivery.

  21. Cyrus by phorm · · Score: 1

    I'm a courier user myself, but I was talking with one of my co-workers about IMAP servers and he said that Cyrus - though a bit more of a pain-in-the-ass to configure - was generally more efficient under scenarios with a high userbase.

    I can't recommend it from experience, but I would trust the advice of this particular individual.

    For smaller userbase, I'd have to say that courier was pretty painless to configure and reliable as well.

  22. I recommend ... by ModernGeek · · Score: 1

    ... Microsoft Exchange Server 2003 Enterprise Platinum "This One Is Really Secure" Edition. Nothing like good old Microsoft products.

    --
    Sig: I stole this sig.
  23. BlarsBL by Yottabyte84 · · Score: 1

    I really wouldn't worry about it. Hardly anyone uses it to block email since he states on his site that it has a lot of colatteral blocking.

    1. Re:BlarsBL by WebHostingGuy · · Score: 1

      Actually I think he has blacklisted the entire internet. The ones to be concerned about are spamcop, spamhaus, cbl, etc.

      --
      Quality Hosting e3 Servers
  24. Roll your own for full job security... by jonadab · · Score: 0, Troll

    Hey, you want job security, right?

    Write your own mail server software, preferably in an unpleasantly horrible language, such as Threaded Intercal. Make sure it keeps all the mail and account information in something inherntly tied to the implementation language, such as stored procedures, disk-based monads, persistent lexical closures, or the like.

    Did I mention the part about not supporting POP3 or IMAP, but rolling your own protocol and client? You wouldn't want some hotshot hiree coming along, extracting all the mail that easily, and moving the company over to Exim or Postfix.

    Oh, and you want there to be a lot of resistence to moving away from your solution, so make it do something executives will like, such as have the server authenticate clients by MAC address so they don't have to have passwords.

    Also, just to raise the bar for potential replacement systems, roll in some features that have nothing whatsoever to do with mail. For instance, you could tie the mail server into the company accounting system and put user interface in the client for viewing up-to-the-minute charts showing revenues, remaining fund levels in various funds, and so forth. Arrange it so that users can send each other these charts (actually just magic tokens that pull them up) by email.

    --
    Cut that out, or I will ship you to Norilsk in a box.
  25. QmailToaster by T4D · · Score: 2, Informative

    You might want to check out QmailToaster. It's free, supports multiple domains, has a web interface, and has SPF and ClamAV integration.

  26. Postfix + Cyrus + SQLGrey +DSPAM + Mysql by madstork2000 · · Score: 2, Informative

    I own a small hosting company. I have setup my business so that all accounts (except shell accounts) are stored and authenticated against MYSQL databases.

    For that reason I chose Cyrus as the actual local mail system. It supports IMAP / POP3 can be scaled pretty easily. And despite reports that it is hard to configure, I have found that it really is not too bad if you keep things simple.

    Currently I host about 3000 domains, and roughly 5000 email accounts, though most are nothing more than SPAM traps.

    If you do go this route, the key is a reliable and robust MYSQL server(s).

    The main advantage of MYSQL based virtual acounts is web-based management is trivial. ADD / UPDATE / DELETE can be done simply by updating a record.

    The draw backs I have found are: a database/DB Server is an additional point of failure. Replication has been a bit tricky at times. Do not run DSPAM in the same database as your user / hosting accounts.

    -MS2k

  27. Another place to ask advice by hadaso · · Score: 3, Informative

    You might want to ask your question also at the forums at emaildiscussions.com. There is a subforum there for "setting up an email service" and there are several active participants that are email admins running operations like yours or bigger (or smaller) that can give you good advice.

  28. qmail rocks! by Anonymous Coward · · Score: 0

    and so does qmailrocks.org

    that site is a very complete step by step, and you can stear away from the sendmail/postfix nastiness..

    qmail in my professional opinion, runs the fastest, and is the most secure.

  29. sendmail? by Anonymous Coward · · Score: 0

    Considering it's the most insecure piece of software on the internet, well next to BIND DNS anyway...

    Why would you recommend it to anyone?

  30. Outsource It by Vagary · · Score: 2, Informative
    Another solution would be to contract with a third party. There are companies that do nothing but provide you with email solutions. They can do this based on very strong commercial products. These companies themselves will host and run the hardware for you. They will do all of the configuration and deployment and maintenance and administration for you. I'm not familiar with their prices, though - but do look into it. The upgrades and crashes and migrations are their responsibility. Meeting QOS is their responsibility. They will deal with the commercial mailserver vendor(s) for you. They already have support contracts with them. All you do is tell them how big of a deployment you want and you're set.
    As someone who used to support an email server for a living, I'd have to strongly second the recommendation for outsourcing. Email is not your main business and you don't have enough customers to afford learning enough to give your customers the service they'll demand. (Although maybe it'd be cheaper to make those mistakes now than when you have so many customers you have no choice but to do it yourself?)

    95% of your customers would probably be happiest with addresses forwarded to GMail accounts that are configured to put the forwarded address in the From: field. Think about it.