2

I have installed and configured OpenDKIM in my Ubuntu 16.04 digitalocean vps and enabled the DKIM Plugin in SpamAssassin with loadplugin Mail::SpamAssassin::Plugin::DKIM in one of the .pre files located in /etc/spamassassin/ I have also installed theMail::DKIM perl module by Jason Long and all its dependencies, and I can verify that the module has been installed succesfully by browsing through this location /usr/share/perl5/Mail/DKIM/. After I've installed the Perl Module, I restarted spamassassin. I have also tested everything, and I can verify that DKIM verification is working fine, just as it should. I can verify this with this header:

X-Spam-Status: No, score=0.6 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
    DKIM_VALID_AU,FREEMAIL_FROM,HTML_MESSAGE,MPART_ALT_DIFF,SPF_PASS,
    TVD_SPACE_RATIO autolearn=no autolearn_force=no version=3.4.1



But my problem starts after I reboot/restart/poweroff my VPS. All incoming emails will be marked as T_DKIM_INVALID unless you restart spamassassin again. What I mean restart spamassassin is, executing this command via ssh: service spamassassin restart.. After restarting spamassassin, everything works fine. Here's the email header before restarting spamassassin and after rebooting:

X-Spam-Status: No, score=0.0 required=5.0 tests=FREEMAIL_FROM,HTML_MESSAGE,
    SPF_PASS,T_DKIM_INVALID autolearn=ham autolearn_force=no version=3.4.1

I want it to work properly, bacause whenever my server encounters an unexpected downtime, I don't have to restart spamassassin again. I want it to work immediately after booting. Manually restarting it everytime i reboot the machine is ridiculous. This thing is making me crazy! Can you please tell me what's wrong with my Email Server?

0 Answers0