Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I have a single case problem, it relates to selecting the correct mail server. A group wants to create their own business PHP website, where the public can read articles, news etc. and the staff can login and check his mail, update articles, wherever he is, on the same site.

I am tasked to search around for finding/selecting a good mail server (and there are many...) that PHP can connect to, to view received mail, send mail, manage user address books, easy spam/junk control, but also manage mail groups (such as mail sent to projectx-devel@business.org will be forwarded to members email addresses that are registered to groups projectx-devel), etc...!

The PHP side is not my problem, but my problem is to find and recommend a mail server with not too many protocols for easy PHP development (I cant imagine managing IMAP/POP/LDAP/SQL/FILES/ etc in one site..!). Eg. Is there a mail server that stores/sends/verifies mail from a mysql database? This would reduce the protocol to standard SQL, and (arguably!) faster and easier development for the dev group.

The dev server has per default CentOS 6.4 with Mailman installed, which is a world standard, I believe. I have been told that it is complicated to manage, and in this case, maybe not the easiest (I don't know)? I have also been told about the iredmail mail server, which seems pretty close to what I am looking for!

Has anyone else had a similar research task? What are any suggestions, recommendations, for mailservers in this case?

share|improve this question

closed as off-topic by squillman, DanBig, mdpc, Ward, Jenny D Sep 11 '13 at 7:53

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions seeking product, service, or learning material recommendations are off-topic because they tend to become obsolete quickly. Instead, describe your situation and the specific problem you're trying to solve." – squillman, DanBig, mdpc, Ward, Jenny D
If this question can be reworded to fit the rules in the help center, please edit the question.

    
Exim or postfix or any of the others should be fine. Your time (and sanity) might be better spent implementing a (pre-existing) webmail solution that already has the features you need. –  lVlint67 Sep 10 '13 at 17:36
    
I could agree. But they really wanted something very simple and something integrated in the site. –  Florian Mertens Sep 10 '13 at 17:44
    
Your link to wikipedia is a good starting spot. DBMail supports MySQL as a backend. Go through the list, find the software that most closely fits your needs, then come back here if you have any specific questions. –  lVlint67 Sep 10 '13 at 18:10

2 Answers 2

up vote 1 down vote accepted

Firstly, if you want a full featured mail app then you will definitely be best served by just using an already made webmail solution. By doing a search for 'php webmail' I got this link: http://www.noupe.com/ajax/10-ajax-webmail-clients.html which lists many of them but it is strangely missing RoundCube (which is one of the better ones).

If you really MUST, you CAN do this using PHP yourself. I'd assume that you are already familiar with using PHP to send emails. The real trick to doing this is reading the mailbox. There are several examples on the net but I like those that use PHP's built in IMAP extension best (why reinvent the wheel as they say). Here is a very good one (which doesn't give me permission to simply post here so I'll need to link to it): http://garrettstjohn.com/entry/reading-emails-with-php

This isn't going to be a fully working example but you'll only be reading it if you are a masochist anyway.

share|improve this answer

Postfix can get virtual users from mysql. Simply use Postfixadmin to manage all domains and mailboxes. As IMAP server I recommend Dovecot. Roundcube as webmailer.

For fetching mails via PHP you should do the standard way via IMAP. Look at the Fetch library, which encapsulates phps imap_ functions in a good OOP approach.

For mailinglists you can use Majordomo

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.