You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Though all the documentation looked (to me) like it was recommended, putting wildduck and zone-mta into different mongodb databases does not work with the current plugin. The easiest way to fix it is to change:
const database = app.db.database;
to
const database = app.db.users;
I'm not sure if this is the best way or not as I'm still new to the project, but that's how I've fixed it; I don't know if anyone really puts users in a different database from the rest of wildduck but it seems unlikely. However, app.db.database will normally refer to the zone-mta database not the wildduck database. It has suddenly become apparent to me that most people have them sharing a database =]
The text was updated successfully, but these errors were encountered:
I think to get it working, you have to explicitly set the sender value in the DB configuration of ZoneMTA. In general, WildDuck and ZoneMTA can use the exact same DB configuration.
So to make that work (and it sounds plausible) then what you'd end up doing is putting the wildduck db in the connection string (for zone-mta) and then setting sender to the name of the zone-mta database... this seems more than a bit counter-intuitive.
The more I look at this the more I think the most correct fix would actually be to have an option in the plugin configuration which specifies the name of the wildduck database -- then it should use that if provided and then fall back to database if not provided. Barring that, the users database seems the most likely to usually be it.
I know (now) that you can use the same database for both, but that is not at all clear in the documentation that I read and so I didn't set it up that way; I can change it if needed, but I'd actually prefer not to because I hope to do some experimentation with zone-mta separately from the wildduck deployment.
Thoughts on my proposed solution? I don't really know much about the config system used here, so I'm picking things up based on inference from reading code; I'd like to fix this in a way that it will remain fixed without needing to maintain a separate copy of the plugin but also not breaking anyone else's slightly screwball deployment =] I'm happy to write some code to make it happen, but I don't want to spend a lot of time on a solution and have you reject it because it turns out it's a dumb idea when you actually understand the full picture =]
Though all the documentation looked (to me) like it was recommended, putting wildduck and zone-mta into different mongodb databases does not work with the current plugin. The easiest way to fix it is to change:
to
I'm not sure if this is the best way or not as I'm still new to the project, but that's how I've fixed it; I don't know if anyone really puts users in a different database from the rest of wildduck but it seems unlikely. However,
app.db.database
will normally refer to the zone-mta database not the wildduck database. It has suddenly become apparent to me that most people have them sharing a database =]The text was updated successfully, but these errors were encountered: