[GH-ISSUE #163] Seperate Mail and Web Server #129

Closed
opened 2026-02-26 09:36:08 +03:00 by kerem · 2 comments
Owner

Originally created by @maugsburger on GitHub (Jan 30, 2016).
Original GitHub issue: https://github.com/opensolutions/ViMbAdmin/issues/163

It seems that ViMbAdmin currently needs the mail and web server to run on the same host, otherwhise setttings like

defaults.mailbox.maildir = "maildir:/srv/vmail/%d/%u/mail:LAYOUT=fs"
defaults.mailbox.homedir = "/srv/vmail/%d/%u"

would make no sense.

In my setup, the web- and mail- and database-server are seperate hosts, so it is not possible to access the virtual mail directories from the web-server.

I know that this is currently needed for quotas, but is there any other reason why this would not work? Or should I just set home- and maildir to any (empty) folder and it should work fine?

Originally created by @maugsburger on GitHub (Jan 30, 2016). Original GitHub issue: https://github.com/opensolutions/ViMbAdmin/issues/163 It seems that ViMbAdmin currently needs the mail and web server to run on the same host, otherwhise setttings like ``` defaults.mailbox.maildir = "maildir:/srv/vmail/%d/%u/mail:LAYOUT=fs" defaults.mailbox.homedir = "/srv/vmail/%d/%u" ``` would make no sense. In my setup, the web- and mail- and database-server are seperate hosts, so it is not possible to access the virtual mail directories from the web-server. I know that this is currently needed for quotas, but is there any other reason why this would not work? Or should I just set home- and maildir to any (empty) folder and it should work fine?
kerem closed this issue 2026-02-26 09:36:09 +03:00
Author
Owner

@barryo commented on GitHub (Jan 30, 2016):

It seems that ViMbAdmin currently needs the mail and web server to run on the same host

No, these can all be on different servers. But it does require some advanced experience of mail servers.

otherwhise setttings like

defaults.mailbox.maildir = "maildir:/srv/vmail/%d/%u/mail:LAYOUT=fs"
defaults.mailbox.homedir = "/srv/vmail/%d/%u"

would make no sense.

These settings are used only to populate their respective database columns in the mailbox table.

In my setup, the web- and mail- and database-server are seperate hosts, so it is not possible to access > the virtual mail directories from the web-server.

I know that this is currently needed for quotas, but is there any other reason why this would not work?

It's not needed for quotes. The LDA/IMAP daemon will take the quota value from the database and use it (store it) in the maildir in a way that's appropriate to each LDA/IMAP daemon. E.g. the maildirsize file often seen in the root of the maildir. The key here is that the LDA/IMAP daemons are configured correctly to slurp this info from the database.

Or should I just set home- and maildir to any (empty) folder and it should work fine?

These can most definitely not be empty. They tell the LDA where to store email messages and IMAP (or POP3) where to find them. Let's use Dovecot as the example here as it's probably the better daemon these days. You'll see in this Dovecot configuration file how it is configured to fetch this information.

ViMbAdmin is really just a front end to the database. The SMTP, IMAP/POP3, SIEVE, LDA, etc daemons are configured independently to talk to the database, not ViMbAdmin.

Some (hopefully obvious) caveats:

  • ViMbAdmin reads quote usage / maildir sizes from the database. Scripts are included which run by cron to update these values in the database. If ViMbAdmin frontend does not have access to the mail directories, then a second installation for running CLI commands will be needed to use these optional features.
  • If you're running separate SMTP and IMAP/POP3 servers then either your SMTP will need access to the mail directories to store email via an LDA (e.g. NFS share) or it will need to forward mail onto a minimal SMTP agent on the IMAP/POP3 server(s) to be stored locally. The latter would be a common mail scrubber implementation.
<!-- gh-comment-id:177211437 --> @barryo commented on GitHub (Jan 30, 2016): > It seems that ViMbAdmin currently needs the mail and web server to run on the same host No, these can all be on different servers. But it does require some advanced experience of mail servers. > otherwhise setttings like > > ``` > defaults.mailbox.maildir = "maildir:/srv/vmail/%d/%u/mail:LAYOUT=fs" > defaults.mailbox.homedir = "/srv/vmail/%d/%u" > ``` > > would make no sense. These settings are used only to populate their respective database columns in the mailbox table. > In my setup, the web- and mail- and database-server are seperate hosts, so it is not possible to access > the virtual mail directories from the web-server. > > I know that this is currently needed for quotas, but is there any other reason why this would not work? It's not needed for quotes. The LDA/IMAP daemon will take the quota value from the database and use it (store it) in the maildir in a way that's appropriate to each LDA/IMAP daemon. E.g. the `maildirsize` file often seen in the root of the maildir. The key here is that the LDA/IMAP daemons are configured correctly to slurp this info from the database. > Or should I just set home- and maildir to any (empty) folder and it should work fine? These can most definitely not be empty. They tell the LDA where to store email messages and IMAP (or POP3) where to find them. Let's use Dovecot as the example here as it's probably the better daemon these days. You'll see in this [Dovecot configuration file](https://gist.github.com/barryo/8918488#file-dovecot-sql-conf-ext) how it is configured to fetch this information. ViMbAdmin is really just a front end to the database. The SMTP, IMAP/POP3, SIEVE, LDA, etc daemons are configured independently to talk to the database, not ViMbAdmin. Some (hopefully obvious) caveats: - ViMbAdmin reads quote usage / maildir sizes from the database. Scripts are included which run by cron to update these values in the database. If ViMbAdmin frontend does not have access to the mail directories, then a second installation for running CLI commands will be needed to use these optional features. - If you're running separate SMTP and IMAP/POP3 servers then either your SMTP will need access to the mail directories to store email via an LDA (e.g. NFS share) or it will need to forward mail onto a minimal SMTP agent on the IMAP/POP3 server(s) to be stored locally. The latter would be a common mail scrubber implementation.
Author
Owner

@maugsburger commented on GitHub (Jan 30, 2016):

No, these can all be on different servers. But it does require some advanced experience of mail servers.

Okay, then I made the wrong conclusion. My setup is running like described, I just wanted to move from the dead openmailadmin to some more modern solution.

These can most definitely not be empty. They tell the LDA where to store email messages and IMAP (or POP3) where to find them.

I probably got confused because currently I'm using a concat in the query, so the path is nowhere in the database.

Thanks for your quick reply anyway! Although, I still need to write some queries to migrate from the old to the new database layout and adjust exim/dovecot config.

<!-- gh-comment-id:177238798 --> @maugsburger commented on GitHub (Jan 30, 2016): > No, these can all be on different servers. But it does require some advanced experience of mail servers. Okay, then I made the wrong conclusion. My setup is running like described, I just wanted to move from the dead openmailadmin to some more modern solution. > These can most definitely not be empty. They tell the LDA where to store email messages and IMAP (or POP3) where to find them. I probably got confused because currently I'm using a concat in the query, so the path is nowhere in the database. Thanks for your quick reply anyway! Although, I still need to write some queries to migrate from the old to the new database layout and adjust exim/dovecot config.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/ViMbAdmin-opensolutions#129
No description provided.