Nethserver-rspamd a new module

,

Ok, but we need to move all the UI to nethserver-mail2-disclaimer then because all the UI code is in nethserver-mail2-common, or link by a dependency

To make it simple leave UI in mail2-common and add just some IFs to the view

1 Like

I have something that should work.
It’s a modification of my previous script but I have to made some adjustments.

It’s a “complete” signature solution, not only disclaimer, but the configuration is made modifiyng files “by hand”, not with templates.

everything you do manually editing your file is reproducible with some templates, everything

Please try it…

We have reached the beta stage and we need you to try this nice work…except the disclaimer right now (a PR should solve this issue) rspamd aimed to replace amavisd for spam hunting

you have a new documentation page you can found at http://docs.nethserver.org/en/latest/mail2.html

@davidep did a testing case you can read at https://github.com/NethServer/dev/issues/5394

well nice done to the team, it is your turn to test and report back what you miss and what it should be enhanced…

I would call some people
@robb @mrmarkuz @pagaille @alefattorini @saitobenkei

4 Likes

omg

beta :star_struck:

2 Likes

good morning, had installed the beta and seems to work fine. one question is, i lost my pop3 connector (nethserver-getmail) to receive emails from different pop3 accounts. is ther a possibilitie to get it back?

1 Like

Was nethserver-getmail package removed accidentally?

rpm -q nethserver-getmail

Do you have any custom template?

find /etc/e-smith/template-custom

Any error in messages log?

grep -B 5 -E '(ERROR|FAIL)' /var/log/messages

it was uninstalled by installing the beta. i dont have a custom template.

rpm -q nethserver-getmail = package nethserver-getmail is not installed

1 Like

There’s a dependency conflict among RPMs. Thank you for the input!

The fix is trivial and soon to come :wink:

1 Like

i got error messages from the formerly cron-job for getmail:

Filter error (filter Filter_classifier clamdscan (allow_root_commands=“False”, arguments="(’-c’, ‘/etc/clamd.d/amavisd.conf’, ‘–stdout’, ‘–no-summary’, ‘–infected’, ‘-’)", command=“clamdscan”, exitcodes_drop="(‘1’,)", exitcodes_keep="(‘0’,)", group=“None”, ignore_header_shrinkage=“False”, ignore_stderr=“False”, path="/usr/bin/clamdscan", unixfrom=“False”, user=“amavis”) returned 2 ()
)

To fix the RPM conflicts

yum update \
    http://packages.nethserver.org/nethserver/7.4.1708/autobuild/x86_64/Packages/nethserver-mail2-filter-2.0.0-1.32.pr13.ga90b7c9.ns7.noarch.rpm \
    http://packages.nethserver.org/nethserver/7.4.1708/autobuild/x86_64/Packages/nethserver-mail2-common-2.0.0-1.32.pr13.ga90b7c9.ns7.noarch.rpm \
    http://packages.nethserver.org/nethserver/7.4.1708/autobuild/x86_64/Packages/nethserver-mail2-server-2.0.0-1.32.pr13.ga90b7c9.ns7.noarch.rpm

yum install nethserver-getmail

But it’s not enough. A template-custom is needed to contact the right clamd instance, provided by rspamd.conf… Here you are:

mkdir -p /etc/e-smith/templates-custom/getmailrc
sed 's:/etc/clamd.d/amavisd.conf:/etc/clamd.d/rspamd.conf:' /etc/e-smith/templates/getmailrc/30clamd > /etc/e-smith/templates-custom/getmailrc/30clamd

I hope it does not raise some kind of socket permission problem… Let’s see it @hucky

1 Like

had build the custom template with your infos, do i have to restart something or update something?

got this errors when the server is trying to get the emails:

Filter error (filter Filter_classifier clamdscan (allow_root_commands=“False”, arguments="(’-c’, ‘/etc/clamd.d/amavisd.conf’, ‘–stdout’, ‘–no-summary’, ‘–infected’, ‘-’)", command=“clamdscan”, exitcodes_drop="(‘1’,)", exitcodes_keep="(‘0’,)", group=“None”, ignore_header_shrinkage=“False”, ignore_stderr=“False”, path="/usr/bin/clamdscan", unixfrom=“False”, user=“amavis”) returned 2 ()
)
Filter error (filter Filter_classifier clamdscan (allow_root_commands=“False”, arguments="(’-c’, ‘/etc/clamd.d/amavisd.conf’, ‘–stdout’, ‘–no-summary’, ‘–infected’, ‘-’)", command=“clamdscan”, exitcodes_drop="(‘1’,)", exitcodes_keep="(‘0’,)", group=“None”, ignore_header_shrinkage=“False”, ignore_stderr=“False”, path="/usr/bin/clamdscan", unixfrom=“False”, user=“amavis”) returned 2 ()
)

Yes, you’re right:

signal-event nethserver-getmail-save
1 Like

still the same Problem with this error:
Filter error (filter Filter_classifier clamdscan (allow_root_commands=“False”, arguments="(’-c’, ‘/etc/clamd.d/rspamd.conf’, ‘–stdout’, ‘–no-summary’, ‘–infected’, ‘-’)", command=“clamdscan”, exitcodes_drop="(‘1’,)", exitcodes_keep="(‘0’,)", group=“None”, ignore_header_shrinkage=“False”, ignore_stderr=“False”, path="/usr/bin/clamdscan", unixfrom=“False”, user=“amavis”) returned 2 ()
)
Filter error (filter Filter_classifier clamdscan (allow_root_commands=“False”, arguments="(’-c’, ‘/etc/clamd.d/rspamd.conf’, ‘–stdout’, ‘–no-summary’, ‘–infected’, ‘-’)", command=“clamdscan”, exitcodes_drop="(‘1’,)", exitcodes_keep="(‘0’,)", group=“None”, ignore_header_shrinkage=“False”, ignore_stderr=“False”, path="/usr/bin/clamdscan", unixfrom=“False”, user=“amavis”) returned 2 ()
)
Filter error (filter Filter_classifier clamdscan (allow_root_commands=“False”, arguments="(’-c’, ‘/etc/clamd.d/rspamd.conf’, ‘–stdout’, ‘–no-summary’, ‘–infected’, ‘-’)", command=“clamdscan”, exitcodes_drop="(‘1’,)", exitcodes_keep="(‘0’,)", group=“None”, ignore_header_shrinkage=“False”, ignore_stderr=“False”, path="/usr/bin/clamdscan", unixfrom=“False”, user=“amavis”) returned 2 ()
)

Let’s edit the template-custom /etc/e-smith/templates-custom/getmailrc/30clamd

{
    my $viruscheck = $account->prop('VirusCheck') || 'enabled';

    if ($viruscheck eq 'enabled') {
        $OUT .= <<EOF
[filter-1]
type = Filter_classifier
path = /usr/bin/clamdscan
arguments = ("-c", "/etc/clamd.d/rspamd.conf", "--stdout", "--no-summary", "--infected", "-")
exitcodes_drop = (1,)
user = _rspamd
group = mail
EOF
    }
}

Changed the user line and added the group one

Amazing news! We need our @quality_team services now :smiley:

this seems to work right now :slight_smile: great shot @davidep

1 Like