-
Notifications
You must be signed in to change notification settings - Fork 48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Postgresql instructions and config-examples (work-in-progress) #244
Comments
I began working on similar unification last year as part of my effort to review the whole config file, but never really finished it. I could push my work to a branch if you would like to take a look and maybe take it further. |
That'd be very helpful and very welcome! I've been running vexim with postgres and dovecot for many years now and it's been as stable as a rock. However, it seems there might be recent changes in the recent vexim releases regarding the database, etc.. I am currently debugging the current state of postgresql/vexim2 on a new installation; there's likely something that recently changed somewhere along the way that's giving me issues (pgsql lookups in vexim config fails because of some type issue.) Extra material to look at would be greatly appreciated. |
Pushed as 9dcd750 to https://github.com/rimas-kudelis/vexim2/commits/updated-exim4-config. I named the new file Since the change is rather big and I think incorporates a few other tasks as well, I ran out of enthusiasm somewhere along the way, and never really managed to finish it or test it, but if you're up for it, there's certainly no reason for us to duplicate each other's work. We could do it together if you like. One of my goals is/was to unify not only config options, but queries as well. I think we should avoid using MySQL-specific of PostgreSQL-specific syntax and instead stick with what both database engines support. |
Thanks ! I concur with the latter assertion, too. Postgresql required some type-casting to allow that kind of thing. Works well enough now; though I would imagine there might be a more implementation-insensitive manner to handle this issue without having to go and change the table-definition to use 'boolean' instead of 'smallint' on everyone's install. My current short-term goal is to get the 'mainline' mysql-version of everything to have a postgresql-equivalent that works. After that's made working and I understood the differences/challenges, an approach to how to make both work from a single query/config may present itself, I hope. Thanks for the headsup about the push. I hope to have some evenings this week to put work into it. |
IMO it's OK to use boolean fields where supported. MySQL aliases them to tinyint, but that doesn't mean we can't call them boolean in our scripts. |
Hey there.
I'm working on a way to provide postgresql users (and debian+postgresql users in particular, as that's me) a way to more easily get Vexim2 installed, configured and up-and-running.
A side issue i'd like to work on is to help people understand how to get Vexim2 working together with an LMTP/Sieve setup (which i have yet to finish, myself)
For this reason, I've forked to a local branch under https://github.com/insensitiveclod/vexim2 and started doing some re-ordering of documentation and config-files.
I do realize that one of the items in /TODO is to provide some auto-config script/framework that would configure the database and likely provide the right set of config files for use. This goes far beyond the scope of what I am trying to do on the short run, howver: getting people to actually be able to use PostgreSQL without too much fuss, right now , by providing ready-to-use configs + docs.
The main gist of the changes made so far:
I would welcome some comments on whether or not this kind of way of providing configuration-alternatives is the right way to go or if there's better ways to go about handling the mysql/postgres issue.
In effect, there are now 4 variants of the exim-config included in the vexim2 package; the README tells you which one you'll need and what to change, where:
docs/config.mysql
docs/config.pgsql
docs/debian-conf.d/mysql
docs/debian-conf.d/pgsql
This works well enough, but whenever something changes somewhere in php or database-land, 4 sets of config end up needing to be checked/changed/verified.
While working on this, I came to some insights:
The 'domain' lookups seem to really require some syntax-changes to be ported from mysql to pgsql. All (most?) of the other things work as is.
The rest seems to be a question of replacing 'lookup mysql' with 'lookup pgsql', and converting 'quote_mysql' into 'quote_pgsql'.
The remaining change is the 'hide mysql_servers' to 'hide pgsql_servers'. Trivial
This made me wonder about two aspects of all this:
I'd love to hear some thoughts on both the work I've done so far and the approach I went for; as well as the two considerations below. My intention, of course, is to provide something that could/would be included in mainline vexim2 at some point.
Thanks in advance.
The text was updated successfully, but these errors were encountered: