• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

qmail & greylisting spam control

Greylisting ...

Well I must say Im impressed. Very nice and very simple and most of all very effective !!!

Is there any PHP script or other that can print out some statistics ?

SW-SOFT should include this simple feature in future releases.

One question remains ... can the spammers know this and retry after x ammount of minutes ? This would bring this greylist useless.

--

I installed and its running perfectly so far. I notice less spam allready and can see the huge ammount caught in the logs. !


Best regards
Joao Correia
 
Then an queue should be created... most spamservers dont have a queue because else they will run out of free space.. thats the nice thing about greylisting.

Regarding the statistics. I only created a page that will show all the records with the passed_count set to 0.

$query = "SELECT * FROM `relaytofrom` WHERE `passed_count` = 0 ORDER BY id
 
I'm still not able to make blacklists and whitelists... could someone show me an example query howto make those. The once noticed earlier arent working.

THanks!
 
bandurao, could you please stop spamming this forum with your own restricted forum. Its going to look like you are replying on posts with the purpose of getting new registrations on your own forum. Thanks...
 
Hi,

I try to compile greylist on SuSE 9.3 and het the follow error.

./compile qmail-remote.c
qmail-remote.c:36:25: openssl/ssl.h: No such file or directory
qmail-remote.c:37:25: openssl/err.h: No such file or directory
qmail-remote.c:38: error: syntax error before '*' token
qmail-remote.c:38: warning: data definition has no type or storage class
qmail-remote.c: In function `ssl_timeoutread':
qmail-remote.c:135: error: `SSL_ERROR_WANT_READ' undeclared (first use in this function)
qmail-remote.c:135: error: (Each undeclared identifier is reported only once
qmail-remote.c:135: error: for each function it appears in.)
qmail-remote.c:136: error: `SSL_ERROR_NONE' undeclared (first use in this function)
qmail-remote.c: In function `ssl_timeoutwrite':
qmail-remote.c:160: error: `SSL_ERROR_WANT_WRITE' undeclared (first use in this function)
qmail-remote.c:161: error: `SSL_ERROR_NONE' undeclared (first use in this function)
qmail-remote.c: At top level:
qmail-remote.c:178: error: syntax error before '*' token
qmail-remote.c:184: error: syntax error before "X509_STORE_CTX"
qmail-remote.c: In function `smtp':
qmail-remote.c:347: error: `SSL_CTX' undeclared (first use in this function)
qmail-remote.c:347: error: `ctx' undeclared (first use in this function)
qmail-remote.c:405: error: `SSL_FILETYPE_PEM' undeclared (first use in this function)
qmail-remote.c:419: error: `SSL_VERIFY_PEER' undeclared (first use in this function)
qmail-remote.c:422: warning: assignment makes pointer from integer without a cast
qmail-remote.c:455: error: `X509_V_OK' undeclared (first use in this function)
qmail-remote.c:463: error: `NID_commonName' undeclared (first use in this function)
qmail-remote.c: In function `main':
qmail-remote.c:591: warning: return type of `main' is not `int'
make: *** [qmail-remote.o] Error 1


have some one a idea how to fix this error ?
 
Well.. when reading your error message it says at the first 2 lines:

qmail-remote.c:36:25: openssl/ssl.h: No such file or directory
qmail-remote.c:37:25: openssl/err.h: No such file or directory

The rest of the errors are related to this. In the tarball there is a directory called openssl. This directory should be placed in: /usr/include

So after that it should look like:
/usr/include/openssl/ssl.h
 
Sorry i has pasted the wrong error. The obove erro have i fixed whit installing openssl-devel.

The right error that i have is:
./load qmail-envelope-scanner -lz -lm local_scan.o /usr/lib/mysql/libmysqlclient.a
/usr/lib/gcc-lib/i586-suse-linux/3.3.5/../../../../i586-suse-linux/bin/ld: cannot find -lz
collect2: ld returned 1 exit status
make: *** [qmail-envelope-scanner] Error 1

What means cannot find -lZ ?? Where is he looking for ??

i dont understand this messages.
 
Brent Meshier, thanks for this post! Its very useful.... I have installed the greylist on a test server without any problems. Only mysql doesn't work directly. This problem i solved by setting the password to old style:

SET PASSWORD FOR 'user'@'localhost' = OLD_PASSWORD('password');

I’m really crazy of spam… I can’t wait for installing the greylist on a productionserver.
But one question, if I get unexpected problems by using this. How can I completely undone the installation?
 
Originally posted by w0uter
Sorry i has pasted the wrong error. The obove erro have i fixed whit installing openssl-devel.

What means cannot find -lZ ?? Where is he looking for ??


I missed some packages form zlib so it wil be compiled now...
 
First, thanks to bmeshier for posting this. I have been waiting for something like this for a while.
Second what would keep the debug file from being created in /tmp?
I got no compile errors and copied the two files over as directed but when I restart qmail the debug/log file does not get created. I also don't get any entries in the DB. I did login to the db and inserted a row manually with the login and password I used in my local_scan.c so I know that the login and password work. Any ideas would be appreciated. Thanks
 
Originally posted by PhilM
First, thanks to bmeshier for posting this. I have been waiting for something like this for a while.
Second what would keep the debug file from being created in /tmp?
Check Step 7 carefully.
 
Thank you for helping. . .
I redid step 7 again (output below) and I still don't get the debug/log file. What am I missing?
*****SNIP*****
[root@www1 qmail-1.03]# /etc/rc.d/init.d/qmail stop
[root@www1 qmail-1.03]# cp qmail-envelope-scanner /var/qmail/bin/.
cp: overwrite `/var/qmail/bin/./qmail-envelope-scanner'? y
[root@www1 qmail-1.03]# cp -f qmail-smtpd /var/qmail/bin/.
cp: overwrite `/var/qmail/bin/./qmail-smtpd'? y
[root@www1 qmail-1.03]# chown root.qmail /var/qmail/bin/qmail-envelope-scanner
[root@www1 qmail-1.03]# chown root.qmail /var/qmail/bin/qmail-smtpd
[root@www1 qmail-1.03]# /etc/rc.d/init.d/qmail start
Starting qmail: [ OK ]
[root@www1 qmail-1.03]# ls -la /tmp
drwxrwxrwt 4 root root 20480 Jan 23 15:20 .
drwxr-xr-x 21 root root 4096 Jan 23 13:56 ..
-rw------- 1 apache apache 109884 Jan 23 15:26 sess_3d2a8490a971cf9f2b5a48489a39ef2c
-rw------- 1 apache apache 191939 Jan 23 15:27 sess_c271299bbb43e065e3281fbdf8278e85
srw-rw-rw- 1 root root 0 Jan 23 15:20 spamd_full.sock
srw-rw-rw- 1 root root 0 Jan 23 15:20 spamd_light.sock
*****SNIP*****
 
Originally posted by PhilM
Thank you for helping. . .
I redid step 7 again (output below) and I still don't get the debug/log file. What am I missing?
Just a thought.. and this might be necessary... try restarting xinetd.
 
Thanks for the quick response.
I restarted xinetd without any luck:
*****SNIP*****
[root@www1 qmail-1.03]# service xinetd restart
Stopping xinetd: [ OK ]
Starting xinetd: [ OK ]
[root@www1 qmail-1.03]# ls -la /tmp
drwxrwxrwt 4 root root 20480 Jan 23 15:36 .
drwxr-xr-x 21 root root 4096 Jan 23 13:56 ..
-rw------- 1 apache apache 114255 Jan 23 15:37 sess_3d2a8490a971cf9f2b5a48489a39ef2c
-rw------- 1 apache apache 191939 Jan 23 15:37 sess_c271299bbb43e065e3281fbdf8278e85
srw-rw-rw- 1 root root 0 Jan 23 15:20 spamd_full.sock
srw-rw-rw- 1 root root 0 Jan 23 15:20 spamd_light.sock
*****SNIP*****
 
Originally posted by bmeshier
Code:
tail -f /tmp/greylist_dbg.txt
And watch incoming email.

I see nothing in /tmp/greylist_dbg.txt. I have already restart xinted....

And my databse is also empty... I think greylist i do nothing. Any ideas how to fix ?
 
It´s the same for me: the code compiles without error,
the specified user has write access to the table qmail.
xinetd and qmail restarted, but the file under tmp is empty (it exists) and I´m able to send mails over telnet without being rejected (no DB-entries)

my System: SuSE 9.3, Plesk 7.5.4

any Idea?
thx Björn
 
Does someone have the whitelisting working? I'm trying to whitelist some domains who are not resending there queue within 5 minutes.
 
thanks bmeshier for this post.
However, it seems you don't have all plesk patches. One patch missing is the qmail-spp pathc without which "reject mail to non-existent user" feature doesn't work :(

I found out from some other thread where to look for all plesk patches and now trying to patch your tarball with the spp patch from there. Hopefully, I'll get it to work. here's thread that gives link to pplesk qmail patches
http://forum.plesk.com/showthread.php?threadid=20668
 
Back
Top