This nice guy did wrote the "onchange" patch for vpopmail: https://qmail.jms1.net/vpopmail/ His patch was accepted upstream some years ago in vpopmail-5.4.18. Gentoo currently has vpopmail-5.4.33 stable and 5.4.33-r1 unstable; they're both based off the vpopmail-5.4.33.tar.gz source tarball which has the patch included and a nice doc/README.onchange file explaining it. The patch is enabled by passing --enable-onchange-script to the configure script and it looks for a ~vpopmail/etc/onchange script to execute when anything changes (new account, modified account, etc...). Just enabling the patch without putting a script there should not change anything for current users, but it could be made a USE flag to allow people to choose. [offtopic: while you're at it, --enable-domainquotas would be useful too] The onchange hook would be of great use in many areas. Our use case could be one of the most common I guess: keep an update list of valid RCPT TO addresses to use on separate Mail eXchanger hosts to refuse mail for unknown users, thus avoiding to generate backscatter mails. Reproducible: Always Steps to Reproduce: 1. install vpopmail 2. try to keep an update list of valid RCPT TO addresses 3. fail :/ Expected Results: put a script in ~vpopmail/etc/onchange and get it called every time something changes.
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=264b28523b9afd79eac7b9a0a969693e800ad616 commit 264b28523b9afd79eac7b9a0a969693e800ad616 Author: Rolf Eike Beer <eike@sf-mail.de> AuthorDate: 2020-01-25 10:31:00 +0000 Commit: Sergei Trofimovich <slyfox@gentoo.org> CommitDate: 2020-02-25 21:29:22 +0000 net-mail/vpopmail: enable onchange script If there is no script put there by the user then this simply does nothing as before. This also drops the dependency on postgresql[server] as I see no reason that this would not work with a remote server. Closes: https://bugs.gentoo.org/516100 Signed-off-by: Rolf Eike Beer <eike@sf-mail.de> Closes: https://github.com/gentoo/gentoo/pull/14441 Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org> net-mail/vpopmail/vpopmail-5.4.33-r7.ebuild | 251 ++++++++++++++++++++++++++++ 1 file changed, 251 insertions(+)