pmg-smtp-filter runs with root?

May 10, 2023
31
20
8
Hi Proxmox,

first thanks for the nice product.
While testing, I discovered that the process /usr/bin/pmg-smtp-filter runs with root rights. To my unterstand this process do all the filtering on the mail, is it really necessary to run it with root? Sure it's a pearl script, but e.g. a simple wrong call to an archiver could exploit the whole system when running with root rights, as happened to Barracuda Email Security Gateway.

bye Josef
 
that's a good question, but the answer is not so easy i'm afraid:

pmg-smtp-filter has to access many things (the db, config files, etc.)
we'd have to check if that would all be possible without root (at least for the db we'd have to configure some access rules/users which don't exist currently)
(i don't know every access off the top of my head, i'd first have to look)

for now it's not as simple as changing the running user, but i agree that having a different user for that would be a good idea (if possible)

would you mind opening a feature request/bug for that on https://bugzilla.proxmox.com ?