Hello, I'm interested in using DB Mail, but I have a few questions first:
1) Is there any way to make the conf file a little more flexible? For example, my users are already created in a separate table that I use for things like Postfix, Cyrus, and PureFTPd. For example, Postfix uses the following format: hosts = mysql user = postfix password = secret dbname = users table = alias select_field = dest where_field = alias additional_conditions = and paid = '1' That's ok, but PureFTPd's is better because it's a little more flexible: MYSQLServer mysql (and similar params to set up the connection to the server) MYSQLGetPW SELECT password FROM domain WHERE domain="\L" This is where the real power of PureFTPd's config starts to show through. You can define your own SQL statements with replacement variables. Very nice for custom configs. some of the variables: # \L is replaced by the login of the user trying to authenticate. # \I is replaced by the IP address the user connected to. # \P is replaced by the port number the user connected to. # \R is replaced by the IP address the user connected from. # \D is replaced by the remote IP address, as a long decimal number. etc. anyway, just a thought. 2) DBMail got a sort of rave review from the following user: I've test-implemented DBMail on Debian with Sendmail, but not PostFix or in a production environment (yet). Here's some of my notes, though. The POP/IMAP are very nice and fast. The SQL schema is simple and scalability. The command administration tools are simple, to the point that you could bypass them with your direct DB manipulation. My only peeve, though, was the delivery agent: dbmail-smtp. 1) It was not be as well documented as I think it should be for integration with an incoming MTA. An option existed to specify the mailbox by its POP/IMAP username, but it wasn't documented. The documented approach only used the email-alias for delivery, but IMO, it should be the MTA's role (not DBMail's) to determine what email addresses are valid for the mailbox. Not knowing this information kept me confused for days. 2) It didn't give back error codes that say something was wrong, like the mail user didn't exist, or quota exceeded. I had to write my own modified copy that would give appropriate errors back to Sendmail. After that, it seemed to run like a well-behaved delivery agent should. Some day I might re-implement it with LMTP instead of Sendmail return codes, and distribute it back to the developer. 3) A side effect of not using /etc/passwd (or LDAP) as the source of user information is that Sendmail is somewhat blind about whether a given user exists or not, and has to attempt delivery to find out. That's not a good thing if you want an efficient mail system, so I resolved it by listing all the users in /etc/mail/virtusertable. I plugged up all the @domain catch-all lines with a 550 error, which allows Sendmail to immediately reject emails to unknown users. With the rewritten delivery agent, and Sendmail using virtusertable (sourced from MySQL using a perl script), I got it working the way I wanted it to. I looked at DBMail as a possible mail store for a new small web- hosting company, and might actually use it. I haven't come close to a real decision, though, and more well-used solutions like QMail or even traditional Sendmail are an option. Someone has created a Debian package for DBMail, but it didn't seem to be integrated into Debian the way I thought it should be. I don't remember why though, and I've since decided to stay with the upstream source distribution since I have my own injector changes. I'm also using Debian but I'm comfortable building from source, so that's not an issue. I know that I can use MySQL to trap non-existent users with Postfix since I'm already doing that with Cyrus and SASL. However, are there other issues raised in this short review that I might not have considered regarding using Postfix with DBMail? 3) How does DBMail perform compared to Cyrus with large binary attachments? 4) What does Cyrus implement that DBMail doesn't yet? What about vice-versa -- are there features that DBMail has that Cyrus doesn't? 5) What's the state of libsieve integration? I saw that Aaron Stone thoughtfully started to split it out, I assume for eventual inclusion into DBMail according to another mail I saw. I think this is a brilliant move -- sieve is awesome. 6) Is it possible to do HA with MySQL's replication and (better yet) have multi-write with DBMail writing to a replicated database like Cyrus does with Murder? I'm really excited about DBMail even if it takes some time to get it rolling and get my Cyrus system migrated to it because I think that (assuming the performance is roughly the same -- don't forget that Cyrus has high quality indexing capabilities for messages) SQL is a lot easier to work with as a protocol/language than IMAP. I'm really impressed by how clean and simple the code is. Quite a change from SASL... Thanks!! -Jamie
