C
ClausVB
Guest
I installed Greylisting in 2006. I have translated Brent Meshier HowTo: Adding Greylisting support to qmail on Plesk 8 into german.
deutsche Uebersetzung: Greylisting mit Plesk und Qmail
I tested it on:
Plesk: 8.0
SuSE: 10.1
Kernel: 2.6.13-15.11-default (installed by strato.de)
There some small mistakes in Brent's guide. He uses three different users to access MySQL. I fixed this in my translation. But there are major bugs in his Tarball. I fixed some of them.
Updates
Here is a short installation guide, after I installed "mysql-devel" and "openssl-devel" with YaST. Create backups first!
Download qmail-1.05_greylisting_plesk8.tar.gz and copy it to "/usr/src".
vi "local_scan.c" and change defaults:
Edit "qmail.sql", create database and table "relaytofrom":
Check your installation:
Use "install.sh" to check for missing RPMs and execute "make":
Most warnings are ok, but it's better to take a closer look and google all warnings and errors.
Afterwards I activated CATCH-ALL for my domain. You should send some short messages to your (mail)accounts. After a short while you should get:
Done! Greylisting is working! My mails from "Yahoo -> clausvb.de -> Gmail" are greylisted within in seconds and successfully delivered in about 7 minutes. (Unknown providers like "xemail.de" need about 45 to 60 minutes.)
I activated CATCH-ALL to get a lot of SPAM. If you have a new server, I suggest you send a lot of mails from different servers (GMX, hotmail, GMAIL, Yahoo, etc.) to your new domain.
Best regards,
Claus
deutsche Uebersetzung: Greylisting mit Plesk und Qmail
I tested it on:
Plesk: 8.0
SuSE: 10.1
Kernel: 2.6.13-15.11-default (installed by strato.de)
There some small mistakes in Brent's guide. He uses three different users to access MySQL. I fixed this in my translation. But there are major bugs in his Tarball. I fixed some of them.
Updates
- Bugfix 2007-09-22: »error: conflicting types for 'write' readwrite.h:5: error: previous declaration of 'write' was here
make: *** [qmail-pw2u.o] Error 1« - Bugfix 2007-08-16: Fixed »warning: pointer targets in initialization differ in signedness«
- Bugfix 2007-08-03: Fixed »warning: conflicting types for built-in function "malloc"«
- Bugfix 2007-07-24: Fixed »warning: pointer/integer type mismatch in conditional expression«
- 2007-07-22: Tarball 1.05 released
- Bugfix 2007-07-15: Created missing "ssl.lib"
Bugfix 2007-06-23: Fixed »warning: conflicting types for built-in function "puts"« - Bugfix 2007-06-02: Fixed »return type of `main' is not `int'«
Here is a short installation guide, after I installed "mysql-devel" and "openssl-devel" with YaST. Create backups first!
Download qmail-1.05_greylisting_plesk8.tar.gz and copy it to "/usr/src".
Code:
strato:~ # cd /usr/src
strato:/usr/src # tar xvfz qmail-1.05_greylisting_plesk8.tar.gz
qmail-1.05/
qmail-1.05/BLURB
qmail-1.05/BLURB2
qmail-1.05/BLURB3
(...)
qmail-1.05/qmail-smtpd.c.rej
qmail-1.05/qmail-spp.o
Code:
strato:/usr/src # cd qmail-1.05
strato:/usr/src/qmail-1.05 # vi local_scan.c
---
#define MYSQLHOST "localhost"
#define MYSQLUSER "greylist"
#define MYSQLPASS "topSecret"
#define MYSQLDB "qmail"
#define BLOCK_EXPIRE 5 /* minutes until email is accepted */
#define RECORD_EXPIRE 1500 /* minutes until record expires */
#define RECORD_EXPIRE_GOOD 36 /* days until record expires after accepting email */
---
Code:
strato:/usr/src/qmail-1.05 # vi qmail.sql
strato:/usr/src/qmail-1.05 # mysql -u admin -p < qmail.sql
Enter password:
strato:/usr/src/qmail-1.05 #
Code:
strato:/usr/src/qmail-1.05 # mysql -u admin -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 8974 to server version: 4.1.13
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql> USE mysql;
Database changed
mysql> SELECT User, Password FROM user WHERE User = 'greylisting';
+-------------+-------------------------------------------+
| User | Password |
+-------------+-------------------------------------------+
| greylist | *930DAB011CE31AB33910A8A1F011CE98AA9D40FB |
+-------------+-------------------------------------------+
1 row in set (0.00 sec)
mysql> SHOW COLUMNS FROM qmail.relaytofrom;
+----------------+-----------------------+------+-----+---------------------+----------------+
| Field | Type | Null | Key | Default | Extra |
+----------------+-----------------------+------+-----+---------------------+----------------+
| id | bigint(20) | | PRI | NULL | auto_increment |
| relay_ip | varchar(16) | YES | MUL | NULL | |
| mail_from | varchar(255) | YES | MUL | NULL | |
| rcpt_to | varchar(255) | YES | MUL | NULL | |
| block_expires | datetime | | | 0000-00-00 00:00:00 | |
| record_expires | datetime | | | 0000-00-00 00:00:00 | |
| blocked_count | bigint(20) | | | 0 | |
| passed_count | bigint(20) | | | 0 | |
| aborted_count | bigint(20) | | | 0 | |
| origin_type | enum('MANUAL','AUTO') | | | MANUAL | |
| create_time | datetime | | | 0000-00-00 00:00:00 | |
| last_update | timestamp | YES | | CURRENT_TIMESTAMP | |
+----------------+-----------------------+------+-----+---------------------+----------------+
12 rows in set (0.00 sec)
mysql> quit
Bye
Code:
strato-server-germany:/usr/src/qmail-1.05 # ./install.sh
( cat warn-auto.sh; \
echo CC=\'`head -1 conf-cc`\'; \
echo LD=\'`head -1 conf-ld`\' \
) > auto-ccld.sh
cat auto-ccld.sh make-load.sh > make-load
(...)
./load spfquery spf.o ip.o ipme.o ipalloc.o strsalloc.o \
now.o dns.o datetime.a stralloc.a alloc.a str.a substdio.a \
case.a error.a fs.a `cat dns.lib` `cat socket.lib`
###################################
'make' finished. Please check for critical errors!
###################################
Most warnings are ok, but it's better to take a closer look and google all warnings and errors.
Afterwards I activated CATCH-ALL for my domain. You should send some short messages to your (mail)accounts. After a short while you should get:
Code:
strato-server-germany:~ # tail /tmp/greylist_dbg.txt
---
protocol = notneeded4qmail increase at blindsz.com
increase at blindsz.com -> cloidtd at clausvb.de (62.227.194.124) Doesn't Exists Block
---
protocol = notneeded4qmail Scott at blueskyimages.co.uk
Scott at blueskyimages.co.uk -> christo at clausvb.de (86.196.215.34) Doesn't Exists Block
---
strato-server-germany:~ #
I activated CATCH-ALL to get a lot of SPAM. If you have a new server, I suggest you send a lot of mails from different servers (GMX, hotmail, GMAIL, Yahoo, etc.) to your new domain.
Best regards,
Claus