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

cant use CIDR format in "SPF for all domains" setting #1295

Closed
rseffner opened this issue Dec 3, 2024 · 3 comments
Closed

cant use CIDR format in "SPF for all domains" setting #1295

rseffner opened this issue Dec 3, 2024 · 3 comments
Assignees
Milestone

Comments

@rseffner
Copy link

rseffner commented Dec 3, 2024

Describe the bug
Trying to add "ip6:2a01:::6442::/64" or "ip6:2a01:::10::2/64" in settings results in "Der Wert des Feldes "spf_spf_entry" hat nicht das erwartete Format."
Mayby an syntax check dislikes the "/"?

System information

  • Froxlor version: 2.2.5

To Reproduce
system -> seetings -> antispam -> spf for all domains : input : save

Expected behavior
Would like to see that froxlor accepts SPF settings - also in CIDR format - as described e.g. here http://www.open-spf.org/action_browse_id_SPF_Record_Syntax_revision_7/.

@d00p d00p self-assigned this Dec 3, 2024
@d00p d00p added this to 2.2 Dec 3, 2024
@github-project-automation github-project-automation bot moved this to To do in 2.2 Dec 3, 2024
@d00p d00p added this to the 2.2.x milestone Dec 3, 2024
@d00p d00p closed this as completed in 60f51fd Dec 3, 2024
@github-project-automation github-project-automation bot moved this from To do to Done in 2.2 Dec 3, 2024
@rseffner
Copy link
Author

rseffner commented Dec 3, 2024

This change did not solve the problem.

@d00p
Copy link
Member

d00p commented Dec 3, 2024

try this:

diff --git a/actions/admin/settings/180.antispam.php b/actions/admin/settings/180.antispam.php
index 6a3c67b2..b6bc96b2 100644
--- a/actions/admin/settings/180.antispam.php
+++ b/actions/admin/settings/180.antispam.php
@@ -129,7 +129,7 @@ return [
                                        'settinggroup' => 'spf',
                                        'varname' => 'spf_entry',
                                        'type' => 'text',
-                                       'string_regexp' => '/^v=spf[a-z0-9:~?\s.-\/]+$/i',
+                                       'string_regexp' => '/^v=spf[a-z0-9:~?\s.\-\/]+$/i',
                                        'default' => 'v=spf1 a mx -all',
                                        'save_method' => 'storeSettingField'
                                ],

@rseffner
Copy link
Author

rseffner commented Dec 3, 2024

Fine. Thats working.

d00p added a commit that referenced this issue Dec 3, 2024
Signed-off-by: Michael Kaufmann <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

No branches or pull requests

2 participants