• 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

B

bmeshier

Guest
For those looking for a simple, maintenance free spam solution, check out greylisting. It's highly effective (far more than spamassasin and the like). Before you continue, I suggest reading the white paper to get a firm grasp of what greylisting is:
http://projects.puremagic.com/greylisting/whitepaper.html

I've rolled together qmail 1.03 with greylisting support specifically compiled for Plesk servers (includes SW Soft's qmail patches). I've tested on 7.1.x, 7.5.x and 8.0.x systems. I've been running it on 4 production servers for the last 18 months, without problems. It will reduce server load dramatically on systems with high mail volume. I've repackaged qmail in to a tarball and will provide the source code upon request. I can also install on your server.

Instructions and source here:
http://meshier.com/2006/09/18/adding-greylisting-support-to-qmail-on-plesk-8/

Brent Meshier
http://carbonblock.net/
[email protected]
 
What is the basic retry queue time from an healty mail server?
Some told me its around 4 hours. This means that the server is not accepting the email for the first 4 hours. Unhandy if an customer is waiting for an subscripe mail..

What is your experience with this?
 
That patch WILL NOT work with Plesk servers. My HOW-TO is for Plesk users as the forum suggests. From the qgreylist page, it clearly states that qgreylist is not compatable with SMTP AUTH., which is just one of many reasons why it doesn't work with Plesk. Also, qgreylist is not a true implementation as developed by Evan Harris (puremagic.com)
 
bmeshier, thanks for your howto, i'll test it on the test server asap. Are you able to put this tar ball on the internet
 
Ok, did some testing but i dont get it running.
I really do need some more security because of the current mail load. Greylisting would be perfect.. if its working.

ANy other greylisting plugins for qmail? (plesk configuration compatible)
 
I really do need some more security because of the current mail load. Greylisting would be perfect.. if its working.

ANy other greylisting plugins for qmail? (plesk configuration compatible) [/B]
What part of the installation were you having problems with? My plesk implementation is the only that exists.
 
well.. i did everything according to the howto...
but if i do a telnet locally its accepting like it should. Also from other connections its accepting it.

... [root@extre qmail-1.03]# cp qmail-envelope-scanner /var/qmail/bin/.
[root@extre qmail-1.03]# cp -f qmail-smtpd /var/qmail/bin/.
[root@extre qmail-1.03]# chown root.qmail /var/qmail/bin/qmail-envelope-scanner
[root@extre qmail-1.03]# chown root.qmail /var/qmail/bin/qmail-smtpd
[root@extre qmail-1.03]# /etc/init.d/qmail start
Starting qmail: [ OK ]
[root@extre qmail-1.03]# telnet localhost 25
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
220 extre.nl ESMTP
helo guest
250 extre.nl

Checked the table but no records in the table.
 
Originally posted by rvdmeer
well.. i did everything according to the howto...
but if i do a telnet locally its accepting like it should. Also from other connections its accepting it.



Checked the table but no records in the table.
Greylisting doesn't start that early in the connection. It waits until it has the sender's address:
Code:
-> MAIL FROM: <[email protected]>
<- 250 2.1.0 Sender ok
-> RCPT TO: <[email protected]>
<- 451 4.7.1 Please try again later

Remember, greylisting is done by a triplet (relay IP, sender, recipient)

I suggest reading the whitepaper:
http://projects.puremagic.com/greylisting/whitepaper.html
 
that i also checked.

[root@extre qmail]# telnet localhost 25
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
220 extre.nl ESMTP
helo guest
250 extre.nl
mail from: [email protected]
250 ok
rcpt to: [email protected]
250 ok
data
354 go ahead
test
.
250 ok 1132239632 qp 31179
quit
221 extre.nl
Connection closed by foreign host.
[root@extre qmail]#
 
Originally posted by rvdmeer
that i also checked.
Did you copy the newly compiled qmail-envelope-scanner and qmail-smtpd to your qmail/bin directory and restart qmail? If so, do you have a file called /tmp/greylist_dbg.txt?
 
Originally posted by rvdmeer
yes, and i do have that file.
Strange, you should see something like this:
Code:
--------
protocol = notneeded4qmail [email][email protected][/email]
SQL: ret=0  |SELECT id, block_expires > NOW(), block_expires < NOW() FROM relaytofrom WHERE record_expires > NOW()  AND mail_from IS NULL AND rcpt_to IS NULL AND (relay_ip = '69.64.46.29' OR relay_ip = '69.64.46' OR relay_ip = '69.64' OR relay_ip = '69') ORDER BY length(relay_ip)|
SQL: ret=0  |SELECT id, block_expires > NOW(), block_expires < NOW() FROM relaytofrom WHERE record_expires > NOW()  AND mail_from IS NULL AND relay_ip IS NULL AND rcpt_to = 'meshier.com'|
SQL: ret=0  |SELECT id, NOW() > block_expires FROM relaytofrom WHERE record_expires > NOW() AND mail_from = '[email protected]'  AND rcpt_to   = '[email protected]' AND relay_ip  like '69.64.46%' order by block_expires desc|
SQL: ret=0  |update relaytofrom set record_expires = NOW() + INTERVAL 36 DAY, passed_count = passed_count + 1 where id ='259503'|
[email][email protected][/email] -> [email][email protected][/email] (69.64.46.29) Exists Accept id = 259503  expire = 1
What entries do you have in the MySQL table?
 
Thats the problem perhaps.. it doesnt insert anything into the database. I'll checked the config several times before compiling and flushed all the permissions on sql.. still nothing...
 
Back
Top