Biju,
Option 1A: Does not work, at least in my experiments, as qmail-queue
reads input from file descriptor 0 and 1 which rspamc does not facilitate.
Option 2B: If you could write something up on that it would be great.
The instructions in step 3 are not clear.
Option 3: You can run rspamc with simscan. Look at the bottom of this
page http://wiki.qmailtoaster.org/index.php?title=Simscan#Filtering
You can also run rspam in .qmail per user or in .qmail-default per domain.
Eric
On 8/25/2025 11:22 AM, Biju Jose WHITES Systems wrote:
Rspamd is already installed and enabled in QMT EL10*
Test Rspamd*
You can test with rspamc:
echo "Test email content" | rspamc
You should see the spam score and rules applied.
------------------------------------------------------------------------
*1 Option A: Replace qmail-queue with rspamc*
This approach is called *“queue replacement”*, where Rspamd scans mail
before passing it back to qmail-queue.
*Steps:*
1. Backup the original qmail-queue:
sudo mv /var/qmail/bin/qmail-queue /var/qmail/bin/qmail-queue.orig
2. Create a wrapper script:
sudo tee /var/qmail/bin/qmail-queue <<'EOF'
#!/bin/bash
# pipe mail through rspamc before feeding qmail
/usr/bin/rspamc -e /var/qmail/bin/qmail-queue.orig
EOF
3. Make it executable:
sudo chmod +x /var/qmail/bin/qmail-queue
4. Test by sending an email; it will now go through Rspamd before
being queued.
------------------------------------------------------------------------
*2 Option B: Use Rspamd Milter (Recommended)*
Instead of replacing qmail-queue, you can use *Rspamd milter*, which
is cleaner and easier to maintain:
1. Install *milter* support (if not already):
sudo dnf install rspamd-milter
2. Edit /etc/rspamd/local.d/milter.conf:
milter = yes;
socket = "inet:[email protected]";
3. Configure Qmail to use the milter:
* If using qmail-smtpd, set the -m option to connect to Rspamd milter:
qmail-smtpd -m inet:[email protected]
4. Restart Qmail and Rspamd.
------------------------------------------------------------------------
*3 Adjust simcontrol*
Since Rspamd is handling spam:
:clam=yes,spam=no,attach=.mp3:.src:.bat:.pif:.exe:.iso:.mpeg:.mov:.wmv:.wav:.com
* spam=no → disables SpamAssassin in Simscan.
* clam=yes → keep ClamAV for virus scanning.
* Attachments → same as before.
------------------------------------------------------------------------
✅ *Summary*
* *Fastest and modern*: Use Rspamd milter.
* *Legacy approach*: Replace qmail-queue with rspamc -e
/var/qmail/bin/qmail-queue.
* Disable SpamAssassin in Simscan (spam=no).
I guess, we have to go with Rspamd milter, I have not tested this yet.
Biju Jose
*From:*Eric Broch <[email protected]>
*Sent:* 25 August 2025 22:33
*To:* [email protected]
*Subject:* Re: [qmailtoaster] EL10 - Spam Filtering
How would you implement this
Replace qmail-queue with rspamc -e /var/qmail/bin/qmail-queue
On 8/25/2025 4:08 AM, Biju Jose WHITES Systems wrote:
Hi,
I was thinking about spam filtering in QMT EL10
Please see the attached file, and share your views.
Biju Jose
---------------------------------------------------------------------
To unsubscribe, e-mail:[email protected]
For additional commands, e-mail:[email protected]