Please give me a best solution to store all mails (send, receive, forward) in mysql with postfix?
and
Is this the correct approach?
Please give me a best solution to store all mails (send, receive, forward) in
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Postfix server by itself does not store email (not for a long time at least) – it can only temporarily queue until it is forwarded to intended recipient(s). Typically only IMAP (or outdated POP3) servers actually store your email.
Most of the open source IMAP servers (Courier, Cyrus, Dovecot…) do support using MySQL as database to keep meta information like list of users and passwords, list of accepted domains, user aliases, etc. But none even attempt to make use of database like MySQL as actual storage backend.
Of course, if you really feel adventurous, you can try to implement SQL IMAP backend of your own.
One of the most important considerations for you would be good support of unlimited length VARCHAR or BLOBs (for email attachments) by database engine. Unfortunately, MySQL is not very good server as far as BLOB support goes (you will have to tweak both client and server config for that). Also, you would probably want to have good transaction support – if you care for safety of your email data. For MySQL that means you must use InnoDB engine.