Email notification plugin error but email sent

Hello

Hello to everobody

I’ve discover crowdsec some days ago and It’s incredible, congratulations for this profduct :slight_smile:

I’m using crowdsec in a docker container and it’s working well, bouncers enroled in the console, etc

Today I’ve decid to set the emails notifications.

I’ve configured and enabled them but I get an error when I test it.

Gmail credentials are ok because If is chage them I get a password related error.

My crowdsec version is 1.6.11

This is my email configuration

smtp_host: smtp.gmail.com
smtp_username: MY_MAIL@gmail.com
smtp_password: GMAIL_APP_PASSWORD
smtp_port: 587
auth_type: login
sender_name: "Ignacio - CrowdSec"
sender_email:  MY_MAIL@gmail.com
email_subject: "CrowdSec Notification"
receiver_emails:
 - MY_MAIL@gmail.com

# One of "ssltls", "starttls", "none"
encryption_type: "starttls"

I’ve enabled the notifications and restart the container.

Command test

  • sudo docker exec crowdsec cscli notifications test email_default
time="2025-08-22T11:32:55Z" level=debug msg="starting plugin" args="[/usr/local/lib/crowdsec/plugins/notification-email]" path=/usr/local/lib/crowdsec/plugins/notification-email
time="2025-08-22T11:32:55Z" level=debug msg="plugin started" path=/usr/local/lib/crowdsec/plugins/notification-email pid=3985
time="2025-08-22T11:32:55Z" level=debug msg="waiting for RPC address" plugin=/usr/local/lib/crowdsec/plugins/notification-email
time="2025-08-22T11:32:55Z" level=debug msg="using plugin" version=1
time="2025-08-22T11:32:55Z" level=trace msg="waiting for stdio data"
level=info msg="registered plugin email_default"
level=info msg="pluginTomb dying"
time="2025-08-22T11:32:56Z" level=info msg="sent email to [MYMAIL@gmail.com]" @module=email-plugin.email_default
level=info msg="killing all plugins"
time="2025-08-22T11:32:56Z" level=debug msg="received EOF, stopping recv loop" err="rpc error: code = Unavailable desc = error reading from server: read unix @->/tmp/plugin4196763142: read: connection reset by peer"
time="2025-08-22T11:32:56Z" level=info msg="plugin process exited" id=3985 plugin=/usr/local/lib/crowdsec/plugins/notification-email
time="2025-08-22T11:32:56Z" level=debug msg="plugin exited"

I’m using this email configuration in Vaultwarden so It’s a working setup
Could anybody help me?

Thank in advance

Hi again

I’ve just noticed that mails are sent despite de error

I have just read this post and its the same.

I’m using raspibian which is based in Debian 12

Hi,

Those lines are debug messages, not errors. The “RPC error” text appears because cscli notifications test spins up temporary plugin processes to simulate the notification pipeline, sends the test message, and then terminates those temporary processes. The shutdown is what you are seeing in debug. If it were a real failure you would see an ERROR entry with a clear message like a failed password as you stated above.

To clarify how it works:

  1. cscli notifications test creates short-lived plugin instances separate from the ones used by your running CrowdSec service.

  2. After the test message is sent, those instances are torn down, which produces the “RPC error” strings in debug logs.

  3. The HashiCorp plugin framework emits these messages at debug level, which is why we intentionally keep them as debug, not error.

Perfectly explained :slight_smile:
Thanks!! :slight_smile: