[Solved] DKIM rmilter error

So apparently, ‘SEGV’ which appeared in previous logs you copy/pasted refers to segmentation fault, which is pretty bad. Can you tell which version of rmilter and rspamd you’re running ? Probably with rmilter --version and rspam --version (maybe with or without a d at the end of the name :/)

Ouch …

$ rmilter --version
Erreur de segmentation

Okay, that’s really really bad :slight_smile: .

I would suggest trying to reinstall the package.

Should be something like apt-get install rmilter --reinstall

ok I have done an apt-get update && apt-get upgarde

$ sudo apt-get upgrade
Lecture des listes de paquets… Fait
Construction de l’arbre des dépendances
Lecture des informations d’état… Fait
Calcul de la mise à jour… Fait
0 mis à jour, 0 nouvellement installés, 0 à enlever et 0 non mis à jour.
2 partiellement installés ou enlevés.
Après cette opération, 0 o d’espace disque supplémentaires seront utilisés.
Souhaitez-vous continuer ? [O/n]
[master d5fac46] saving uncommitted changes in /etc prior to apt run
Author: pi pi@mondomain
55 files changed, 1895 insertions(+), 350 deletions(-)
create mode 100644 cron.d/yunohost-upgrade
create mode 100644 nginx/conf.d/mondomain.fr.d/roundcube.conf
create mode 100644 php5/fpm/pool.d/roundcube.conf
delete mode 100644 profile.d/sshpasswd.sh
create mode 100644 rmilter.conf.d/ynh_dkim.conf
create mode 100644 rspamd/redirectors.inc
create mode 100644 rspamd/worker-fuzzy.inc
create mode 120000 systemd/system/multi-user.target.wants/rspamd.service
delete mode 120000 systemd/system/sockets.target.wants/rmilter.socket
create mode 100644 yunohost/apps/roundcube/status.json
Paramétrage de rmilter (1.9.2+nmu2) …
Fichier de configuration « /etc/rmilter.conf »
==> Modifié (par vous ou par un script) depuis l’installation.
==> Le distributeur du paquet a fourni une version mise à jour.
Que voulez-vous faire ? Vos options sont les suivantes :
Y ou I : installer la version du responsable du paquet
N ou O : garder votre version actuellement installée
D : afficher les différences entre les versions
Z : suspendre ce processus pour examiner la situation
L’action par défaut garde votre version actuelle.
*** rmilter.conf (Y/I/N/O/D/Z) [défaut=N] ? Y
Installation de la nouvelle version du fichier de configuration /etc/rmilter.conf …
Installation de la nouvelle version du fichier de configuration /etc/rmilter.conf.common …
Installation de la nouvelle version du fichier de configuration /etc/rmilter.conf.sysvinit …
Paramétrage de yunohost (2.5.6) …
Regenerating configuration, this might take a while…
Attention : Le fichier de configuration « /etc/nslcd.conf » a été modifié manuellement et ne sera pas mis à jour
Attention : Le fichier de configuration « /etc/rmilter.conf » a été modifié manuellement et ne sera pas mis à jour
Restarting YunoHost firewall…
update-rc.d: error: no runlevel symlinks to modify, aborting!
[master 8c17a6d] committing changes in /etc after apt run
Author: pi pi@mondomain
4 files changed, 14 insertions(+), 54 deletions(-)
rewrite rmilter.conf (74%)
create mode 120000 systemd/system/multi-user.target.wants/rmilter.service

So I have respond : Y ou I : installer la version du responsable du paquet

So reinstall package (Paramétrage de rmilter (1.9.2+nmu2)) and regen-conf
and the problem still here …

segmentation fault

do I have to do the same for rspamd?

May be another information I’m running Raspbian on Raspberry … may be a dependance probleme ?

Hi. I just did the upgrade from 2.4 to 2.5. It seems that I have the same problem.

First, I update/upgrade all using the web administration panel.

Secondly, cron send me a first mail with : https://paste.yunohost.org/oyavilebav.vhdl. As you see, there was an error in rmilter too…
One our after, new mail (as the first cron failed) : https://paste.yunohost.org/afobutufib.vhdl. Same problem.

So, reading this thread I did :

 yunohost service regen-conf rmilter --force

Then manually run the upgrade script :

PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin apt-get install yunohost moulinette yunohost-admin ssowat -y && rm -f /etc/cron.d/yunohost-upgrade

I entered “Y” when it asked me for rmilter (see log : https://paste.yunohost.org/dehozarara.vhdl).

Now, it seems to be ok for me as

systemctl status rmilter.service

shows Active: active (running)

However, I do have something wrong :

systemctl status rmilter.socket

gives me : Loaded: not-dound (Reason: No such file or directory) https://paste.yunohost.org/fuquvumupa.pas

EDIT :
Based on this post, it seems to have a configuration problem in /etc/rmilter.conf.common:

dkim {
    # Sample for dkim specific keys
    # domain {
    #   key = /etc/dkim/dkim_example.key;
    #   domain = "example.com";
    #       selector = "dkim";
    # };
    # domain {
    #   key = /etc/dkim/dkim_test.key;
    #   domain = "test.com";
    #       selector = "dkim";
    # };
    # Universal selector, keys will be checked for pattern /etc/dkim/<domain>.<selector>.key
domain {
            key = /etc/dkim;
            domain = "*";
            selector = "dkim";
    };
header_canon = relaxed;
body_canon = relaxed;
sign_alg = sha256;

};
The selector “dkim” is not the good one as in /etc/dkim/ the name is domain.ltd.mail.key and not domain.tld.dkim.key.

remove are your sure?

That’s what the cron did. I simply copy/past. Indeed if you don’t do it, every hour it will re-do the cron (even after a successful install).

You should regenerate configuration after performing the upgrade (by doing yunohost service regen-conf rmilter --force)

Sorry, I wasn’t clear. After the update, there was an error message in the log, so I run the command. I’ll edit my post to be clearer.

So I have juste run an upgrade and do

yunohost service regen-conf rmilter --force
and reboot

So now I have

$ sudo systemctl status rmilter.service
● rmilter.service - Another sendmail milter for different mail checks
Loaded: loaded (/lib/systemd/system/rmilter.service; enabled)
Active: active (running) since dim. 2017-02-26 18:10:42 CET; 36min ago
Main PID: 406 (rmilter)
CGroup: /system.slice/rmilter.service
└─406 /usr/sbin/rmilter -c /etc/rmilter.conf -n

$ sudo systemctl status rspamd.service
● rspamd.service - rapid spam filtering system
Loaded: loaded (/lib/systemd/system/rspamd.service; enabled)
Active: active (running) since dim. 2017-02-26 18:10:44 CET; 41min ago
Main PID: 772 (rspamd)
CGroup: /system.slice/rspamd.service
├─772 rspamd: main process
├─800 rspamd: controller process
├─801 rspamd: normal process
├─803 rspamd: normal process
├─804 rspamd: normal process
└─805 rspamd: normal process

thank you @opi

But
yunohost service status tell me:

rmilter:
loaded: enabled
status: inactive
rspamd:
loaded: enabled
status: inactive

strange … is something broken?

The output of yunohost service status is broken for rspamd/rmilter in YunoHost current stable; This is already fixed in testing release; You can manually apply the fix, which is [fix] Rspamd & Rmilter are no more sockets · YunoHost/yunohost@7d4aa63 · GitHub

OK thank you I will wait for release :slight_smile:

Great job.

[quote=“Jean31, post:18, topic:2526, full:true”]
So reinstall package (Paramétrage de rmilter (1.9.2+nmu2)) and regen-confand the problem still here …

segmentation fault

do I have to do the same for rspamd?

May be another information I’m running Raspbian on Raspberry … may be a dependance probleme ?[/quote]

I have exactly the same problem.
I’ve done opi’s recipe to disable sockets, I’ve upgraded as much as I could and I’ve done numerous apt-get install rmilter --reinstall and yunohost service regen-conf rmilter (as well as rspamd) and reboots without any success.
I use a raspberry pi/raspbian too.

Did I miss something or is there something special to do to get rmilter/rspamd work on raspberry pi ? :stuck_out_tongue:

Is your installation new? This is the case why not install directly with the image to raspberry already ready

Actually, my installation isn’t new but it’s not a problem because I own another pizero that allows me to make some testing while keeping my main server online.
So I tried a fresh install based on YunoHost_v251_rpi.img.
Unfortunately, I meet the same segmentation faults with rmilter.
I tried some recipes on this fresh image too, without success.

So For me I have resolved the problem doing the changes given by @opi
But also I have change the raspbery, putting te SD card from the rapsberry B+ to a new Raspberry 3

I installed some package rmilter and ecryption lib in debug, and try to understand the problem…
My conclusion but not confirmed is that some lib used are not compatible with raspberry B+ (libcrypto.so.1.0.0, armv6)

I have fixed everything, but I have no time to go back to raspberry pi B+ to confirm my suspicion.
May be next month …

Thanks a lot for your experience report… I was about to become crazy !
I only own raspberry pi B and zero, so I suppose I’m stucked at the moment…
Is there an easy way to avoid the problem ? (for example, a custom build with an older but working lib)

We’re investigating this the support chat. At this point, we think we understood that the rmiler / rspamd packages both come from yunohost’s repo. It’s probably that they aren’t compiled properly for RPi 1 and 0 (armv6 stuff ?). I’ll try to catch @opi which knows this stuff better than me to see what we can do.

Issue created to track the problem