
Good evening, Is it possible to have postfix save mail in a database table instead of flat file /home/vmail/[domain]/[user] after having set up virtual users? Is there a special reason why it should ALWAYS save there? Any help on this would be HIGHLY appreciated. Been trying to figure it out for a couple of weeks now and I'm not getting anywhere. -- Regards, Ndambuki Muthoka David Phne: +254733476463;+254722316140 Addr: 2084 - 01000 Thika, Kenya.

Hi David, This is very possible, Postfix supports virtual users and domains using a MySQL database, Exim does this too and in my opinion it is even better ;) Here is a good start for you http://www.howtoforge.com/virtual_postfix_mysql_quota_courier -- Δαβίδ Bette Davis <http://www.brainyquote.com/quotes/authors/b/bette_davis.html> - "Brought up to respect the conventions, love had to end in marriage. I'm afraid it did."

Hi David, David Njuki wrote:
Hi David,
This is very possible, Postfix supports virtual users and domains using a MySQL database, Exim does this too and in my opinion it is even better ;)
Am not sure if this is what the other David was asking. If i got his question right was if postfix can store mails in a database rather than in files inside a home directory (maildir format). Essentially there are those who will say its bad to want to store mails on a DB format for scalability issues (speed vs scale). Since when working with DB's they tend to bloat and consume more disk space than is really necessary and then it becomes more expensive to scale DB's. Theres however the implementation of postfix +Dbmail http://www.dbmail.org/ You may want to look at this. if you are looking for a large scale implementation i would recommend postfix + dovecot or postfix + cyrusIMAP and some webmail system and good NAS. Regards, Michuki.

Hi David, Add this to ur todo: list http://sourceforge.net/projects/postfixadmin/ If u are using Fedora (U didn't specify), u need the postfix-$Version.src.rpm, and MySQL libs ;
From my experience its not compiled to support db natively.
On Wed, May 27, 2009 at 9:42 AM, Michuki Mwangi <michuki@swiftkenya.com>wrote:
Hi David,
David Njuki wrote:
Hi David,
This is very possible, Postfix supports virtual users and domains using a MySQL database, Exim does this too and in my opinion it is even better ;)
Am not sure if this is what the other David was asking. If i got his question right was if postfix can store mails in a database rather than in files inside a home directory (maildir format).
Essentially there are those who will say its bad to want to store mails on a DB format for scalability issues (speed vs scale). Since when working with DB's they tend to bloat and consume more disk space than is really necessary and then it becomes more expensive to scale DB's.
Theres however the implementation of postfix +Dbmail http://www.dbmail.org/
You may want to look at this.
if you are looking for a large scale implementation i would recommend postfix + dovecot or postfix + cyrusIMAP and some webmail system and good NAS.
Regards,
Michuki.
_______________________________________________ Skunkworks mailing list Skunkworks@lists.my.co.ke http://lists.my.co.ke/cgi-bin/mailman/listinfo/skunkworks Other services @ http://my.co.ke Other lists ------------- Skunkworks announce: http://lists.my.co.ke/cgi-bin/mailman/listinfo/skunkworks-announce Science - http://lists.my.co.ke/cgi-bin/mailman/listinfo/science kazi - http://lists.my.co.ke/cgi-bin/mailman/admin/kazi/general

The implementation is for a fairly small institution of mostly high school students and staff, so about 300~400 accounts. I will be working on a deb based system [ read ubuntu ]. And yes, I would like to store the e-mails in a mysql database instead of a home directory (maildir format). I've already started on it, will get back to you soon. On 05/27/2009, melvin obiri <obirimelvin@gmail.com> wrote:
Hi David, Add this to ur todo: list http://sourceforge.net/projects/postfixadmin/ If u are using Fedora (U didn't specify), u need the postfix-$Version.src.rpm, and MySQL libs ; From my experience its not compiled to support db natively.
On Wed, May 27, 2009 at 9:42 AM, Michuki Mwangi <michuki@swiftkenya.com>wrote:
Hi David,
David Njuki wrote:
Hi David,
This is very possible, Postfix supports virtual users and domains using a MySQL database, Exim does this too and in my opinion it is even better ;)
Am not sure if this is what the other David was asking. If i got his question right was if postfix can store mails in a database rather than in files inside a home directory (maildir format).
Essentially there are those who will say its bad to want to store mails on a DB format for scalability issues (speed vs scale). Since when working with DB's they tend to bloat and consume more disk space than is really necessary and then it becomes more expensive to scale DB's.
Theres however the implementation of postfix +Dbmail http://www.dbmail.org/
You may want to look at this.
if you are looking for a large scale implementation i would recommend postfix + dovecot or postfix + cyrusIMAP and some webmail system and good NAS.
Regards,
Michuki.
_______________________________________________ Skunkworks mailing list Skunkworks@lists.my.co.ke http://lists.my.co.ke/cgi-bin/mailman/listinfo/skunkworks Other services @ http://my.co.ke Other lists ------------- Skunkworks announce: http://lists.my.co.ke/cgi-bin/mailman/listinfo/skunkworks-announce Science - http://lists.my.co.ke/cgi-bin/mailman/listinfo/science kazi - http://lists.my.co.ke/cgi-bin/mailman/admin/kazi/general
_______________________________________________ Skunkworks mailing list Skunkworks@lists.my.co.ke http://lists.my.co.ke/cgi-bin/mailman/listinfo/skunkworks Other services @ http://my.co.ke Other lists ------------- Skunkworks announce: http://lists.my.co.ke/cgi-bin/mailman/listinfo/skunkworks-announce Science - http://lists.my.co.ke/cgi-bin/mailman/listinfo/science kazi - http://lists.my.co.ke/cgi-bin/mailman/admin/kazi/general
-- Regards, Ndambuki Muthoka David Phne: +254733476463;+254722316140 Addr: 2084 - 01000 Thika, Kenya.

On Wed, May 27, 2009 at 3:04 PM, David Ndambuki <damundx@gmail.com> wrote:
The implementation is for a fairly small institution of mostly high school students and staff, so about 300~400 accounts. I will be working on a deb based system [ read ubuntu ].
And yes, I would like to store the e-mails in a mysql database instead of a home directory (maildir format).
I've already started on it, will get back to you soon.
If I may ask, what requirement are you trying to fulfill by storing the mails in the DB? -- Best regards, Odhiambo WASHINGTON, Nairobi,KE +254733744121/+254722743223 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ "Clothes make the man. Naked people have little or no influence on society." -- Mark Twain

Ease of backup and experimenting as I don't want to have a large /home. I'd prefer to have a large DB in /usr, than interact with the filesystem. Most of the mails will be attachments of homework children have done which will be word files or spreadsheets etc. so I figured I can easily dump the DB and create monthy backups faster with phpmyadmin than copy the actual maildir directory. On 05/27/2009, Odhiambo ワシントン <odhiambo@gmail.com> wrote:
On Wed, May 27, 2009 at 3:04 PM, David Ndambuki <damundx@gmail.com> wrote:
The implementation is for a fairly small institution of mostly high school students and staff, so about 300~400 accounts. I will be working on a deb based system [ read ubuntu ].
And yes, I would like to store the e-mails in a mysql database instead of a home directory (maildir format).
I've already started on it, will get back to you soon.
If I may ask, what requirement are you trying to fulfill by storing the mails in the DB?
-- Best regards, Odhiambo WASHINGTON, Nairobi,KE +254733744121/+254722743223 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ "Clothes make the man. Naked people have little or no influence on society." -- Mark Twain
_______________________________________________ Skunkworks mailing list Skunkworks@lists.my.co.ke http://lists.my.co.ke/cgi-bin/mailman/listinfo/skunkworks Other services @ http://my.co.ke Other lists ------------- Skunkworks announce: http://lists.my.co.ke/cgi-bin/mailman/listinfo/skunkworks-announce Science - http://lists.my.co.ke/cgi-bin/mailman/listinfo/science kazi - http://lists.my.co.ke/cgi-bin/mailman/admin/kazi/general
-- Regards, Ndambuki Muthoka David Phne: +254733476463;+254722316140 Addr: 2084 - 01000 Thika, Kenya.

On Wed, May 27, 2009 at 3:04 PM, David Ndambuki <damundx@gmail.com> wrote: [.......]
And yes, I would like to store the e-mails in a mysql database instead of a home directory (maildir format).
What's the motivation behind this? I remember seeing some posts on exim-users or similar list some time back, arguing the merits and demerits of storing the actual email content in a database. I can't remember any of the arguments for/against this, however. IMHO, storing user info in a database is as far as I'd go (actually, have done) and leave the mail on the good old filesystem, but it would be great to know of any compelling reasons to go the whole 9 yards. I'm not saying you're doing the wrong or right thing, I'd just like to learn from your point of view.
I've already started on it, will get back to you soon.
Watching this thread...please keep us posted. Including any gotchas.... Regards, Steve -- "A democracy is a sheep and two wolves deciding on what to have for lunch. Freedom is a well armed sheep contesting the results of the decision." - Stolen from someone else's sig.

This is very good from your perspective, but technically, not advisable - for sure you are better of having configs and the likes on a db but not mail. If you go against the wise advice, good luck. ./Ok3ch On Wed, May 27, 2009 at 3:41 PM, Steve Muchai <smuchai@gmail.com> wrote:
On Wed, May 27, 2009 at 3:04 PM, David Ndambuki <damundx@gmail.com> wrote: [.......]
And yes, I would like to store the e-mails in a mysql database instead of a home directory (maildir format).
What's the motivation behind this? I remember seeing some posts on exim-users or similar list some time back, arguing the merits and demerits of storing the actual email content in a database. I can't remember any of the arguments for/against this, however.
IMHO, storing user info in a database is as far as I'd go (actually, have done) and leave the mail on the good old filesystem, but it would be great to know of any compelling reasons to go the whole 9 yards. I'm not saying you're doing the wrong or right thing, I'd just like to learn from your point of view.
I've already started on it, will get back to you soon.
Watching this thread...please keep us posted. Including any gotchas....
Regards, Steve
-- "A democracy is a sheep and two wolves deciding on what to have for lunch. Freedom is a well armed sheep contesting the results of the decision." - Stolen from someone else's sig. _______________________________________________ Skunkworks mailing list Skunkworks@lists.my.co.ke http://lists.my.co.ke/cgi-bin/mailman/listinfo/skunkworks Other services @ http://my.co.ke Other lists ------------- Skunkworks announce: http://lists.my.co.ke/cgi-bin/mailman/listinfo/skunkworks-announce Science - http://lists.my.co.ke/cgi-bin/mailman/listinfo/science kazi - http://lists.my.co.ke/cgi-bin/mailman/admin/kazi/general
participants (7)
-
David Ndambuki
-
David Njuki
-
melvin obiri
-
Michuki Mwangi
-
Odhiambo ワシントン
-
Okechukwu
-
Steve Muchai