I-MSCP and rspamd

  • @UncleSam


    I'll push it into the 1.5.x branch and also provide updated version for i-MSCP 1.6.0 which is still under development. I'll give you the link once done.


    I'll also fix a little issue: If you install the SA plugin later on or disable it and re-enable it, the order will be wrong again. I'll so also fix that case ;)


    Thank you for your tests. That is much appreciated ;)


    BTW: If you look at the listener, you can see that this was not so difficult to implement right? I hope you'll learn for next time ;)

    badge.php?id=1239063037&bid=2518&key=1747635596&format=png&z=547451206

  • @UncleSam


    Listener fixed for the issue exposed in my previous answer. See https://gist.github.com/nuxwin…baae7d2482b68126e8206c534


    I'll push it asap in the 1.5.x branch.


    Note that the testing script has been updated as well.

    badge.php?id=1239063037&bid=2518&key=1747635596&format=png&z=547451206

  • Ok a new config file was created and howto updated according to it. Please see changelog what got changed.


    Additional information:
    Currently I am using rspamd as the only solution to fight against spam and with the last configuration it is working very good. As my mail server is not under heavy bombardement of spammers you might check it out first before doing it the same way.

  • There is a mistake in the current configuration which could prevent mail clients (e.g. Apple hardware) to connect to the server for mail sending (imap is still working).
    The main issue is, that the rspamd is added at the postfix main.cf config part non_smtpd_milters. Removing it from this part is not disabling any rspamd part.


    The listener file can be found in /etc/imscp/listeners.d/


    @Nuxwin
    Can you please modify the listener you built for me and remove this part?

  • There is a mistake in the current configuration which could prevent mail clients (e.g. Apple hardware) to connect to the server for mail sending (imap is still working).
    The main issue is, that the rspamd is added at the postfix main.cf config part non_smtpd_milters. Removing it from this part is not disabling any rspamd part.


    The listener file can be found in /etc/imscp/listeners.d/

    Sorry but I don't see how the non_smtpd_milters rspamd filter could prevent your mail client to send mail. Mail clients send mail through smtpd while non_smtpd_milters filters handle mail that arrives via the Postfix sendmail(1) command-line or via the Postfix qmqpd(8) server. Thus, I need more info, such as LOGS ;)


    Removing it from this part is not disabling any rspamd part.

    You're wrong. Please read http://www.postfix.org/MILTER_README.html


    BTW: Apple hardware is a mail client ?( It is not a diagnostic tool ?

    badge.php?id=1239063037&bid=2518&key=1747635596&format=png&z=547451206

  • @Nuxwin
    I do not have an Apple hardware but someone using my mail server tried to connect to the server and it was not working. I checked everything but only removing rspamd from the non_smtpd_milter was a solution which worked.


    I am talking about the default mail client from apple which is not able to send (only smtp). No matter if stationaire "pc" or iPhone. As I do not have such devices I cannot test this but it seems to be a problem with rspamd. If you want you can also check the rspamd page which says that smtpd_milters is all you need. As I checked it before writing this article I was confused too because this should not affect anything but as I tested it with the guy it does.


    rspamd page: https://rspamd.com/doc/integration.html

  • I do not have an Apple hardware but someone using my mail server tried to connect to the server and it was not working. I checked everything but only removing rspamd from the non_smtpd_milter was a solution which worked.

    I'm pretty sure that you're totally wrong here... See below.



    I am talking about the default mail client from apple which is not able to send (only smtp).

    So we are talking about smtp while non_smtpd_milter has nothing to do with smtp client...


    SO PLEASE, PROVIDE THE LOGS.


    If you want you can also check the rspamd page which says that smtpd_milters is all you need.

    Because most clients send mails through SMTP. On the Rspamd integration page, they don't considerate mail sent locally through sendmail here, as those sent via PHP mail() function. If you google a bit, you'll see that many people are adding non_smtpd_milter rspamd filter to cover the sendmail case ;) In shared hosting environments where customers can send mail through PHP mail() function, it is important to filter them too, unless you want be blacklisted because one of your client is sending SPAM. ;)

    badge.php?id=1239063037&bid=2518&key=1747635596&format=png&z=547451206

  • @Nuxwin
    Sorry I have no logs. The only thing logged is the imap part and a successfull login if the user wants to send a mail. Nothing more.
    (And a successfully logout a second after the login.)

  • Sorry I have no logs. The only thing logged is the imap part and a successfull login if the user wants to send a mail. Nothing more.

    I do not have an Apple hardware but someone using my mail server tried to connect to the server and it was not working.

    A failed connect attempt should produce a log in your mail.log file...

    badge.php?id=1239063037&bid=2518&key=1747635596&format=png&z=547451206