• Article for your preferred language does not exist. Below is international version of the article.

Article ID: 1877, created on May 23, 2007, last review on May 10, 2014

  • Applies to:
  • Operations Automation

Symptoms

Sometimes it is required to check whether spamassasin works for mailbox.

Resolution

1. Create two files with the following content on qmail host.

- the first file, named /root/spamtesting.empty
Received: (qmail 21927 invoked from network); 20 Dec 2006 02:53:15 -0000
Received: from unknown (HELO test.com?) ([127.0.0.1])
  by 127.0.0.1 with SMTP; 20 Dec 2006 02:53:03 -0000
Subject: testing
spamassasin testing

- the second file, named /root/spamtesting.gtube
Received: (qmail 21927 invoked from network); 20 Dec 2006 02:53:15 -0000
Received: from unknown (HELO test.com?) ([127.0.0.1])
  by 127.0.0.1 with SMTP; 20 Dec 2006 02:53:03 -0000
Subject: testing
XJS*C4JDBQADN1.NSBN3*2IDNEN*GTUBE-STANDARD-ANTI-UBE-TEST-EMAIL*C.34X
spamassasin testing

2. Execute the following commands
[root@mail3]# /usr/local/qmail/bin/qmail-local /usr/local/qmail/shared/mailnames/`/usr/local/qmail/bin/domainhash <domain>`/<localpart> <localpart> <domain> test@test.com < /root/spamtesting.empty
did 0+0+1
[root@mail3]# /usr/local/qmail/bin/qmail-local /usr/local/qmail/shared/mailnames/`/usr/local/qmail/bin/domainhash <domain>`/<localpart> <localpart> <domain> test@test.com < /root/spamtesting.gtube
did 0+0+1

After these commands are executed, 1 or 2 files will be created in the folder /usr/local/qmail/shared/mailnames/`/usr/local/qmail/bin/domainhash <domain>`/<localpart>/Maildir/new and you may analyze them.
Number of created files is depending of mailbox settings: if mailbox has option to delete spam messages - 1 file will be created, otherwise - 2 files.

AdditionalInformation

Please note that /usr/local/qmail/bin  should be listed in $PATH variable.

5356b422f65bdad1c3e9edca5d74a1ae caea8340e2d186a540518d08602aa065 e12cea1d47a3125d335d68e6d4e15e07

Email subscription for changes to this article
Save as PDF