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

Add support for empty value config lines #68

Open
cosmingrz opened this issue Sep 14, 2016 · 0 comments
Open

Add support for empty value config lines #68

cosmingrz opened this issue Sep 14, 2016 · 0 comments

Comments

@cosmingrz
Copy link
Contributor

Actually Spamassassin supports empty value config lines for the following type of configs:

<config_name> <list>
<config_name> <boolean>
<config_name> <number>

The default behaviour for this type of config in Spamassassin is ignore line and use the default value

I have started this issue because SpamPAD only supports empty config lines for the first two and for the third is giving a parsing error.

For example:

  • If i have this is config file (as you can see freemail_max_body_freemails has no value):

loadplugin Mail::SpamAssassin::Plugin::Check
loadplugin Mail::SpamAssassin::Plugin::FreeMail

report SCORE
report TESTS

freemail_domains example.com
freemail_max_body_freemails

header CHECK_FREEMAIL_BODY eval:check_freemail_body()

util_rb_tld com

  • And if i have this in the email:

From: [email protected]

Body contains [email protected] [email protected] [email protected]

Spamassassin ignore the freemail_max_body_freemails line and uses the default value for it so the result is that CHECK_FREEMAIL_BODY rule don't match.

SpamPAD is giving a parsing error with this configuration

pad.errors.PluginError: Invalid value for freemail_max_body_freemails:
ValueError: invalid literal for int() with base 10: ''

@cosmingrz cosmingrz changed the title Add supoort for empty value config lines Add support for empty value config lines Sep 14, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants