• 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

I have openssl-devel-0.9.7a-33.17 installed and this is the last part of the reply when I try to make in the qmail-1.03 dir.
can anyone help me with this?
thats in advance.

> &&./auto-uid auto_uidd `head -2 conf-users | tail -1` \
> &&./auto-uid auto_uidl `head -3 conf-users | tail -1` \
> &&./auto-uid auto_uido `head -4 conf-users | tail -1` \
> &&./auto-uid auto_uidp `head -5 conf-users | tail -1` \
> &&./auto-uid auto_uidq `head -6 conf-users | tail -1` \
> &&./auto-uid auto_uidr `head -7 conf-users | tail -1` \
> &&./auto-uid auto_uids `head -8 conf-users | tail -1` \
> &&./auto-gid auto_gidq `head -1 conf-groups` \
> &&./auto-gid auto_gidn `head -2 conf-groups | tail -1` \
> ) > auto_uids.c.tmp && mv auto_uids.c.tmp auto_uids.c
./compile auto_uids.c
./load qmail-lspawn spawn.o prot.o slurpclose.o coe.o \
sig.a wait.a case.a cdb.a fd.a open.a stralloc.a alloc.a \
substdio.a error.a str.a fs.a auto_qmail.o auto_uids.o \
mv: overwrite `auto_uids.c'? @thecyprusgroup:/usr/src/qmail-1.03[root@thecyprusgroup qmail-1.03]# ./load qmail-lspawn spawn.o prot.o slurpclose.o coe.o \
> sig.a wait.a case.a cdb.a fd.a open.a stralloc.a alloc.a \
> substdio.a error.a str.a fs.a auto_qmail.o auto_uids.o \
> auto_spawn.o
./compile qmail-getpw.c
qmail-getpw.c: In function `main':
qmail-getpw.c:61: warning: return type of `main' is not `int'
./auto-str auto_break \
@thecyprusgroup:/usr/src/qmail-1.03[root@thecyprusgroup qmail-1.03]# ./compile qmail-getpw.c
"`head -1 conf-break`" > auto_break.c
qmail-getpw.c: In function `main':
qmail-getpw.c:61: warning: return type of `main' is not `int'
@thecyprusgroup:/usr/src/qmail-1.03[root@thecyprusgroup qmail-1.03]# qmail-getpw.c: In function `main':
> qmail-getpw.c:61: warning: return type of `main' is not `int'
-bash: command substitution: line 1: unexpected EOF while looking for matching `''
-bash: command substitution: line 3: syntax error: unexpected end of file
-bash: qmail-getpw.c:: command not found
@thecyprusgroup:/usr/src/qmail-1.03[root@thecyprusgroup qmail-1.03]# ./auto-str auto_break \
> "`head -1 conf-break`" > auto_break.c
@thecyprusgroup:/usr/src/qmail-1.03[root@thecyprusgroup qmail-1.03]# ./compile auto_break.c
@thecyprusgroup:/usr/src/qmail-1.03[root@thecyprusgroup qmail-1.03]# ./auto-str auto_usera `head -1 conf-users` > auto_usera.c
@thecyprusgroup:/usr/src/qmail-1.03[root@thecyprusgroup qmail-1.03]# ./compile auto_usera.c
./load qmail-getpw case.a substdio.a error.a str.a fs.a \
auto_break.o auto_usera.o
./compile qmail-remote.c
In file included from /usr/include/openssl/ssl.h:179,
@thecyprusgroup:/usr/src/qmail-1.03[root@thecyprusgroup qmail-1.03]# ./load qmail-getpw case.a substdio.a error.a str.a fs.a \
> auto_break.o auto_usera.o
In file included from /usr/include/openssl/ssl.h:179,
@thecyprusgroup:/usr/src/qmail-1.03[root@thecyprusgroup qmail-1.03]# ./compile qmail-remote.c
from qmail-remote.c:36:
/usr/include/openssl/kssl.h:134: syntax error before "krb5_enctype"
/usr/include/openssl/kssl.h:136: syntax error before '*' token
/usr/include/openssl/kssl.h:137: syntax error before '}' token
/usr/include/openssl/kssl.h:149: syntax error before "kssl_ctx_setstring"
In file included from /usr/include/openssl/ssl.h:179,
from qmail-remote.c:36:
/usr/include/openssl/kssl.h:72:18: krb5.h: No such file or directory
In file included from /usr/include/openssl/ssl.h:179,
from qmail-remote.c:36:
/usr/include/openssl/kssl.h:134: syntax error before "krb5_enctype"
/usr/include/openssl/kssl.h:136: syntax error before '*' token
/usr/include/openssl/kssl.h:137: syntax error before '}' token
/usr/include/openssl/kssl.h:149: syntax error before "kssl_ctx_setstring"
/usr/include/openssl/kssl.h:149: syntax error before '*' token
/usr/include/openssl/kssl.h:150: syntax error before '*' token
/usr/include/openssl/kssl.h:151: syntax error before '*' token
/usr/include/openssl/kssl.h:151: syntax error before '*' token
/usr/include/openssl/kssl.h:152: syntax error before '*' token
/usr/include/openssl/kssl.h:153: syntax error before "kssl_ctx_setprinc"
/usr/include/openssl/kssl.h:153: syntax error before '*' token
/usr/include/openssl/kssl.h:155: syntax error before "kssl_cget_tkt"
/usr/include/openssl/kssl.h:155: syntax error before '*' token
/usr/include/openssl/kssl.h:157: syntax error before "kssl_sget_tkt"
/usr/include/openssl/kssl.h:157: syntax error before '*' token
/usr/include/openssl/kssl.h:159: syntax error before "kssl_ctx_setkey"
/usr/include/openssl/kssl.h:159: syntax error before '*' token
/usr/include/openssl/kssl.h:161: syntax error before "context"
/usr/include/openssl/kssl.h:162: syntax error before "kssl_build_principal_2"
/usr/include/openssl/kssl.h:162: syntax error before "context"
/usr/include/openssl/kssl.h:165: syntax error before "kssl_validate_times"
/usr/include/openssl/kssl.h:165: syntax error before "atime"
/usr/include/openssl/kssl.h:167: syntax error before "kssl_check_authent"
/usr/include/openssl/kssl.h:149: syntax error before '*' token
/usr/include/openssl/kssl.h:150: syntax error before '*' token
/usr/include/openssl/kssl.h:167: syntax error before '*' token
/usr/include/openssl/kssl.h:169: syntax error before "enctype"
In file included from qmail-remote.c:36:
/usr/include/openssl/ssl.h:909: syntax error before "KSSL_CTX"
/usr/include/openssl/ssl.h:931: syntax error before '}' token
/usr/include/openssl/kssl.h:151: syntax error before '*' token
/usr/include/openssl/kssl.h:151: syntax error before '*' token
/usr/include/openssl/kssl.h:152: syntax error before '*' token
qmail-remote.c: In function `main':qmail-remote.c:591: warning: return type of `main' is not `int'
make: *** [qmail-remote.o] Error 1
 
The answer to this one is hidden on page 5 of this topic.

The poster suggests that if you are using redhat or similar,
do the following:

code:--------------------------------------------------------------------------------
ln -s /usr/kerberos/include/com_err.h /usr/include/
ln -s /usr/kerberos/include/profile.h /usr/include/
ln -s /usr/kerberos/include/krb5.h /usr/include/
--------------------------------------------------------------------------------

I had this problem and doing the above did, if I remember correctly, resolve the issue for me.

But if you continue to have problems after that, have a look at page 8 or 9 of this topic for additional problems I had and how I solved them.

Faris.
 
thank you very much, I read through the forum but forgot about that post be the time I had tried to instal. Ill give it a shot and see how things turn out
 
This is a VERY long topic. It is easy to get lost in all the posts :)

Faris.
 
Any idea what Im doing wrong now?
I'm using redhat and did what was suggested above, but here is the last part of the output when I 'make'

d qmail-qmtpd rcpthosts.o control.o constmap.o \
received.o date822fmt.o now.o qmail.o cdb.a fd.a wait.a \
datetime.a open.a getln.a sig.a case.a env.a stralloc.a \
alloc.a substdio.a error.a str.a fs.a auto_qmail.o
./compile qmail-smtpd.c
qmail-smtpd.c: In function `main':
qmail-smtpd.c:1079: warning: return type of `main' is not `int'
./compile base64.c
./load qmail-smtpd rcpthosts.o commands.o timeoutread.o \
timeoutwrite.o ip.o ipme.o ipalloc.o control.o constmap.o \
received.o date822fmt.o now.o qmail.o cdb.a fd.a wait.a \
datetime.a getln.a open.a sig.a case.a env.a stralloc.a \
alloc.a substdio.a error.a str.a fs.a auto_qmail.o base64.o `cat \
socket.lib` `cat ssl.lib`
./compile qmail-envelope-scanner.c
./compile local_scan.c
local_scan.c:15:25: mysql/mysql.h: No such file or directory
local_scan.c:33: syntax error before '*' token
local_scan.c: In function `mysql_query_wrapper':
local_scan.c:37: `mysql' undeclared (first use in this function)
local_scan.c:37: (Each undeclared identifier is reported only once
local_scan.c:37: for each function it appears in.)
local_scan.c:37: `sqltext' undeclared (first use in this function)
local_scan.c: At top level:
local_scan.c:64: syntax error before '*' token
local_scan.c: In function `checkWhiteListIP':
local_scan.c:66: `MYSQL_RES' undeclared (first use in this function)
local_scan.c:66: `myres' undeclared (first use in this function)
local_scan.c:67: `MYSQL_ROW' undeclared (first use in this function)
local_scan.c:67: syntax error before "myrow"
local_scan.c:79: `mysql' undeclared (first use in this function)
local_scan.c:81: `myrow' undeclared (first use in this function)
local_scan.c:93: `action' undeclared (first use in this function)
local_scan.c: At top level:
local_scan.c:107: syntax error before '*' token
local_scan.c: In function `checkWhiteListDomain':
local_scan.c:109: `MYSQL_RES' undeclared (first use in this function)
local_scan.c:109: `myres' undeclared (first use in this function)
local_scan.c:110: `MYSQL_ROW' undeclared (first use in this function)
local_scan.c:110: syntax error before "myrow"
local_scan.c:115: `i' undeclared (first use in this function)
local_scan.c:121: `mysql' undeclared (first use in this function)
local_scan.c:123: `myrow' undeclared (first use in this function)
local_scan.c:135: `action' undeclared (first use in this function)
local_scan.c: At top level:
local_scan.c:170: syntax error before '*' token
local_scan.c: In function `checkGreylist':
local_scan.c:172: `MYSQL_RES' undeclared (first use in this function)
local_scan.c:172: `myres' undeclared (first use in this function)
local_scan.c:173: `MYSQL_ROW' undeclared (first use in this function)
local_scan.c:173: syntax error before "myrow"
local_scan.c:179: `i' undeclared (first use in this function)
local_scan.c:180: `mysql' undeclared (first use in this function)
local_scan.c:182: `myrow' undeclared (first use in this function)
local_scan.c:197: `action' undeclared (first use in this function)
local_scan.c: In function `local_scan':
local_scan.c:223: `MYSQL' undeclared (first use in this function)
local_scan.c:223: `mysql' undeclared (first use in this function)
make: *** [local_scan.o] Error 1


Any help with this would be great\
thanks
 
johnson4 -- are you absolutely sure you have installed mysql-devel? Those errors look to me as though the compiler can't find any of the mysql header stuff.

Faris.
 
is there a way to clearly determine that if it is installed properly?
I'll double check and see what I can find
Thanks for the reply
 
try:

rpm -qa mysql*

This should list mysql and mysql-devel (and maybe something else)

if mysql-devel is not there then you'll definitely need to install it:

yum install mysql-devel

(assuming you are on a distro that uses yum)

Faris
 
Heres what I got:

mysql-3.23.58-16.RHEL3.1
mysql-server-3.23.58-16.RHEL3.1

I can't use yum so is there a specifid version of mysql-devel that I need to install?
Thanks again
 
Try:

up2date mysql-devel (or is it up2date -i mysql-devel ?)

Alternatively try a google search for "mysql-devel-3.23.58-16.RHEL3.1", download it and then use :

rpm -Uvh mysql-devel-3.23.58-16.RHEL3.1.rpm (or whatever the actual filename is)

www.rpmfind.com may help you find the required RPM

But really you should use whatever repository system your OS has at its disposal.

Faris.
 
turns out that that was my problem,
I've got it running now and looks like all is well.
I'm watching the database, It's fun to see all those suckers not getting thru HAHAA
Anyway thanks for all the help, it's greatly appreciated.
sj
 
I have lost count of how many times I've been helped by other people on this forum so it is nice to occasionally be able to help others (even though I didn't do anything in your case -- I'm just glad it is working for you!)

Faris.
 
Is there any really easy way to add this list to the db, without a lot of repatition.
Or do I have to copy/paste every IP in?
Thanks again

I used the following (you may discard the info field if you want)
Code:
grep -vE '^#|^ *$' whitelist_ip.txt | awk -F '[ \t]*# ' "{gsub(/'/,\"\\\\'\",\$2); print \"insert into greylisting.relaytofrom (relay_ip, record_expires, origin_type, create_time, info) values ('\"\$1\"', '9999-12-31 23:59:59','MANUAL',NOW(),'\"\$2\"');\"}" | mysql -u SQL_USER -p
 
When I ran this code it worked for me, Thanks a lot
Code:
grep -vE '^#|^ *$' whitelist.txt | awk -F '[ \t]*# ' "{gsub(/'/,\"\\\'\",\$2); print \"insert into qmail.relaytofrom (relay_ip, record_expires, origin_type, create_time) values ('\"\$1\"', '9999-12-31 23:59:59','MANUAL',NOW());\"}" | mysql -u greylist -p

Is there any way to make certain that the perl script in cron.daily is working ?

Thanks again
sj
 
Is there any way to make certain that the perl script in cron.daily is working ?
Simply write some dummy text in /tmp/greylist_dbg.txt
Each time the perl script is run, the content of this file is cleared.
(I prefer keeping the N last line in the logs, see attached file)
 
Originally posted by rvdmeer
I'm wondering how greylisting is working for the people who are currently using it (after this thread). I'm working with it 1 month now and i must say; no spam is delivered anymore.'

What is your experience...

I startet on 01.07.2006 with greylisting on a production system. Since this time today a got the first spammail. I can live with that. One thing do i have to test. A mailinglist on that system seems not to mail anymore. I'll test it.
 
Hi

which plesk /qmail version are you running?
I had it running fine with 7.5 and it even worked after the upgrade to 8.0. Now I have a new machine with 8.0.1 and would like to know whether that works before sendning my machin in the nirvana.

thanks

Andre
 
Mailing lists definitely seem to be the things that have the most problems with greylisting :-(

Faris.
 
Back
Top