1

I'm currently running postfix on a CentOS 6.5 box.The mail is currently stored in the users Maildir directory. Users utilize roundcube as a web mail client.

This is a low priority machine and there are only a handful of users (less than 10). The total amount of mail storage consumed is less than 1G, however someone in my dept is insisting I migrate the mail to MySQL because it's more secure and efficient.

What I need to know is:

Firstly are the benefits mentioned accurate? Are there any other benefits or drawbacks to using Postfix with MySQL? The system currently receives a very low volume of mail (less than 20 a day).

What (briefly) are the steps involved in migrating the mail (if it's even possible) ? If it's going to be a disruptive exercise it might not be worth it.

Thanks!

3
  • What kind of POP/IMAP server you have used now?
    – Kondybas
    Sep 10, 2014 at 14:55
  • Ask that someone why MySQL would be more secure and efficient. I'm assuming this would be for storage of the mail itself?
    – wurtel
    Sep 10, 2014 at 14:56
  • Further details - IMAP provided by Dovecot. I think this is just for mail storage, I'm not entirely sure if it was being suggested that postfix configuration be stored too.
    – Aditya K
    Sep 10, 2014 at 15:01

1 Answer 1

7

While nothing prevents Postfix from delivering mails to an MDA that stores the received mail in an SQL database (maildrop-mysql exists, AFAIK), it wouldn't make sense to do so if common IMAP servers like Cyrus, Courier or Dovecot are involved to access the mail as they are unable to use an SQL database as a storage backend.

Also I would consider the claim that storing the mails in a MySQL database is more secure and faster as plainly wrong. If the correct permissions are set on the maildirs and Dovecot is correctly configured and up to date, it wouldn't be any more secure, as everyone who can read the maildir files would likely be able to get a dump of the SQL tables as well. And since Dovecot etc. are highly optimized to work with large volumes of mails I can't see how using an SQL database with all its overhead (and the lack of tree data structures) would offer a performance benefit.

Tell your colleague that this whole thing doesn't make any sense.

2
  • Even more - dovecot have its own indices that makes access very, very fast. Also dovecot can deduplicate messages and filter them by the sieve. There is no reasons to prefer mysql storage.
    – Kondybas
    Sep 10, 2014 at 16:33
  • Thanks so much for you answer. I feel better armed to have a good debate about the topic now!
    – Aditya K
    Sep 11, 2014 at 13:32

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .