Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cpanel migration - no spamassassain rule migrated #943

Open
shoulders opened this issue Oct 27, 2024 · 8 comments
Open

cpanel migration - no spamassassain rule migrated #943

shoulders opened this issue Oct 27, 2024 · 8 comments

Comments

@shoulders
Copy link

SYSTEM INFORMATION
OS type and version Ubuntu Linux 22.04.5
Usermin version 2.102
Virtualmin version 7.20.2 Pro
Theme version 21.20.7
Apache version 2.4.52
Package updates 10 package updates are available

This is a probably a feature request.

Background

In cpanel I have set a few spamassassain rules to block out most of the offenders of recent spam in Global Email Filters. these are per domain rules.

You can also set Email Filters which is a per email method.

image

the issue

My global filters/spamassaasain rules were not brought over

the request

Make the cpanel migration migrate these settings aswell.

NB: Mine are not complex and i can move them manually.

@iliajie
Copy link
Collaborator

iliajie commented Oct 27, 2024

Hello,

Thanks for the heads up!

Where are those SpamAssassin rules stored within a cPanel account?

@shoulders
Copy link
Author

Below id the information you have asked for but for SpamAssassin rules and the filters, both of which were not brought over.

in the cpanel account backup

./homdedir/.cpanel/filter.yaml.bak

this is from 2017 so I think it is pointless and not the live data.

./homdedir/.cpanel/filter.yaml

```yaml --- filter: - actions: - action: save dest: /dev/null filtername: Dodgy Spam rules: - match: contains opt: or part: $message_body val: /t/click/ - match: contains opt: or part: $message_body val: /mw/index.php/ - match: contains opt: or part: $message_body val: or send post-mail - match: contains opt: or part: $message_body val: /track-url/ - match: contains opt: or part: $message_body val: claudia unescaped: 1 - actions: - action: save dest: /dev/null enabled: 1 filtername: Generated Apache SpamAssassin™ Discard Rule rules: - match: contains opt: or part: "$h_X-Spam-Bar:" val: +++++ version: '2.2' ```

./homdedir/.cpanel/filter.cache

{"version":2.2,"filter":[{"actions":[{"dest":"/dev/null","action":"save"}],"filtername":"Dodgy Spam","unescaped":1,"rules":[{"val":"/t/click/","part":"$message_body","opt":"or","match":"contains"},{"val":"/mw/index.php/","part":"$message_body","match":"contains","opt":"or"},{"val":"or send post-mail","part":"$message_body","match":"contains","opt":"or"},{"part":"$message_body","match":"contains","opt":"or","val":"/track-url/"},{"part":"$message_body","match":"contains","opt":"or","val":"claudia"}]},{"filtername":"Generated Apache SpamAssassin™ Discard Rule","rules":[{"val":"+++++","part":"$h_X-Spam-Bar:","opt":"or","match":"contains"}],"enabled":"1","actions":[{"dest":"/dev/null","action":"save"}]}]}

./homdedir/.spamassassin/user_prefs

score SPF_FAIL 10
whitelist_from *@joomlashine.com
whitelist_from *@stackideas.com
required_score 5

Addtional

https://docs.cpanel.net/cpanel/files/backup-for-cpanel/

The Email Filters backup file only stores the account-level email filters from cPanel’s Global Email Filters interface (cPanel » Home » Email » Global Email Filters). The backup file does not store user account-level email filters from cPanel’s Email Filters interface (cPanel » Home » Email » Email Filters).

@jcameron
Copy link
Collaborator

That's certainly something we can look into migrating! Did the latest backup you sent me have these custom rules?

@shoulders
Copy link
Author

No it didn't .

I will whip up an example cpanel with various options and send it over. Might be a couple of days though.

@jcameron
Copy link
Collaborator

ok thanks that would be really useful!

@shoulders
Copy link
Author

i have sent you an example cpanel account in an email.

@jcameron
Copy link
Collaborator

jcameron commented Nov 1, 2024

Thanks, will take a look!

@shoulders
Copy link
Author

I have sent a corrected backup with global filters, whitelists, blacklists, an additional Spam test (SPF_FAIL).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants