1

Possible Duplicate:
Ubuntu: mailserver + database

I want a mailserver on Ubuntu that saves e-mail in the database and uses users in the database to let them login into the POP server and SMTP server. There are also different domains. How can I do this?

3 Answers3

1

What you're looking for is dbmail

DBMail is an open-source project that enables storage of mail messages in a relational database. Currently MySQL, PostgreSQL and SQLite can be used as storage backends. Commercial development and support is also available.

Majenko
  • 244
  • 1
  • 3
1

If you want to setup a Web-fronted mail server with users managed in a database, the easiest is perhaps Postfix + Squirrelmail, and then you can throw in MailScanner + ClamAV and SpamAssassin for antivirus and spam protection. The setup will cope with multiple domains

Start here:

http://www.howtoforge.com/virtual-users-domains-postfix-courier-mysql-squirrelmail-ubuntu-10.04

Then:

http://www.mailscanner.info/ubuntu.html

Linker3000
  • 668
  • 1
  • 5
  • 14
1

It depends on what you mean exactly with database.

If you want to store mail into a (real) RDBMS you could indeed use dbmail. In don't really see the advantage in day to day use of email of a RDBMS, though.

If you mean that you want to store mail on a server for several users you may not want to use a POP mail server. Instead, you want to use an IMAP server. IMAP keeps the mail incl. subfolder structure and read/unread info on the server, allowing the users to view their mail from an arbitrary mail client that knows IMAP, including webmail applications.

Standard IMAP mail servers for Ubuntu are Courier, Cyrus and Dovecot. To store login credentials for your users openLDAP would be a good choice. The complete picture would probably involve :

  • a MTA like Postfix or Exim
  • a IMAP server like Courier, Dovecot or Cyrus
  • a dbase like MySQL or OpenLDAP for login credentials/user info.
  • several mail filter utilities to wheat out spam, like clamav, spamassassin, greylistd and razor.
  • maybe a webmail application like squirrelmail or horde.

You could such a setup even if you wanted to store the mail in a database. You could export email (in the background) to a (very) fast database like CouchDB and do al the analyses from their. A chapter in 'Mining the Social Web' by O'Reilly seals with a scenario like that, BTW.

Jasper
  • 1,084
  • 10
  • 10