The current names of pop and smtp fields are not very descriptive, with pop usually containing the path to users homedir, and smtp usually containing path to their Maildir. It seems unclear why this data duplication is necessary when a) we could use CONCAT and b) we could probably not even use the Maildir subdirectory, instead putting virtual users' emails right to their homedir.
However, it seems that at least for piped users, the smtp field contains the pipe command to run. The way it has to be entered is quite unintuitive (the admin just has to know what to enter) and buggy due to not escaping quote characters on output.
I propose we rename the pop field to something else (e.g. home) and either drop the smtp field along with the procmail feature entirely, or refactor and rename it to only be used when procmail (or some other custom shell command) is involved. I don't like the idea of letting virtual email users run arbitrary commands on the server, and I'm not sure if we could just let them upload their procmailrc via php and then tell procmail to use that file. Having never used it or anything else, I'm not even sure if procmail is still a thing. Furthermore, managing filtering rules via an IMAP-like interface (read: Sieve) seems more attractive to me, and this approach is already supported by some clients, such as Roundcube (via the bundled Managesieve plugin) or Thunderbird (also via plugins, although it seems both of these are currently outdated).
The current names of
popandsmtpfields are not very descriptive, withpopusually containing the path to users homedir, andsmtpusually containing path to their Maildir. It seems unclear why this data duplication is necessary when a) we could useCONCATand b) we could probably not even use theMaildirsubdirectory, instead putting virtual users' emails right to their homedir.However, it seems that at least for piped users, the
smtpfield contains the pipe command to run. The way it has to be entered is quite unintuitive (the admin just has to know what to enter) and buggy due to not escaping quote characters on output.I propose we rename the
popfield to something else (e.g.home) and either drop thesmtpfield along with the procmail feature entirely, or refactor and rename it to only be used when procmail (or some other custom shell command) is involved. I don't like the idea of letting virtual email users run arbitrary commands on the server, and I'm not sure if we could just let them upload their procmailrc via php and then tell procmail to use that file. Having never used it or anything else, I'm not even sure if procmail is still a thing. Furthermore, managing filtering rules via an IMAP-like interface (read: Sieve) seems more attractive to me, and this approach is already supported by some clients, such as Roundcube (via the bundled Managesieve plugin) or Thunderbird (also via plugins, although it seems both of these are currently outdated).