Page 1 of 1

Is it possible for SMTP_ALLOWUSER to be included or appended via other conf file?

Posted: 19 May 2020, 04:04
by joelmclean
Hello ConfigServer Community, Longtime lurker, first time poster.

We use CSF as our go-to for a bunch of cPanel servers, and for a while now we've been tightening everything up by controlling them with Ansible. The general idea is that we have a CSF config template, apply it to a server (so that if policies change, all servers are updated and CSF is ensured to be running) and away we go.

I'm trying to simplify our playbooks, and one thing that would help me verily is if the csf.conf could be split out into smaller files; for example, I know that CSF.allow and csf.deny allow for an "include /path/to/denytoo.list" or similar.

My current gripe is that to control users on the "SMTP_ALLOWUSER" we're having to maintain a separate template part for each server, which is just getting unorganised; the alternatives are to list _all_ of the users we'd like in allowuser, or to list the allowed users against their host as a variable.

In nearly every way I'd like to tackle this change, I would like to see something like:
`SMTP_ALLOWUSER = /etc/csf/csf.allowuser`

where /etc/csf/csf.allowuser simply contains

`mailman,cpanel,user1,user2,etc`

I haven't had any luck just messing around with this, nor finding this in the forum already; but there's a lot here to read through, so it's possible I was looking for something very specific when I should have been looking for someone general.

So TL;DR:
Is it possible to change SMTP_ALLOWUSER = user1,user2 into an "include" statement?
Or alternatively, include an additional conf file where the SMTP_ALLOWUSER is declared? similar to how httpd includes *.conf in the conf.d directory.

Looking forward to being pointed to the obvious answer in the FAQ that I just struggled to find! Any help would be appreciated.