Spamdyke: Can't enable excessive logging

Forum for getting help with Project Gamera, Spamassassin, Clamav, qmail-scanner and other anti-spam tools.
Choji
Forum User
Forum User
Posts: 28
Joined: Mon Sep 10, 2012 10:00 am
Location: United Kingdom

Spamdyke: Can't enable excessive logging

Unread post by Choji »

Hi guys,

I've been trying to allow Spamdyke to make full SMTP logs by re-compiling it.

I noticed at the end it of the ./configure output says "config.h is unchanged" - could this be indicating that it's going wrong somewhere?
After I ran make, I copied spamdyke to /usr/bin/
[root@server spamdyke]# ./configure --with-excessive-output
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for stdint.h... (cached) yes
checking sys/inttypes.h usability... no
checking sys/inttypes.h presence... no
checking for sys/inttypes.h... no
checking for sys/types.h... (cached) yes
checking for stdint.h... (cached) yes
checking for sys/inttypes.h... (cached) no
checking whether time.h and sys/time.h may both be included... yes
checking for int16_t... yes
checking for int32_t... yes
checking for int64_t... yes
checking for uint16_t... yes
checking for uint32_t... yes
checking for uint64_t... yes
checking for dirent.h that defines DIR... yes
checking for library containing opendir... none required
checking for struct dirent.d_type... yes
checking whether DT_WHT is declared... yes
checking whether S_IFWHT is declared... no
checking whether INADDR_LOOPBACK is declared... yes
checking whether to include debugging symbols (for gdb)... no
checking for strip... strip spamdyke
checking whether to include excessive debugging output... yes
checking whether to include some debugging output... yes
checking whether to include configuration tests... yes
checking if openssl/ssl.h will include without additional include directories... yes
checking for library containing RSA_sign... -lssl
checking for library containing SSL_library_init... none required
checking for OpenSSL libraries (for TLS support)... yes
checking for library containing inet_aton... none required
checking for library containing bind... none required
checking for library containing inet_ntoa... none required
checking for library containing getopt_long... none required
checking whether anonymous inner functions are supported by default... yes
checking whether struct option is defined in getopt.h... yes
checking whether GCC diagnostic pragma directives are supported... no
checking whether pid_t is an unsigned int or an unsigned long... unsigned int
checking whether uid_t is an unsigned int or an unsigned long... unsigned int
checking whether gid_t is an unsigned int or an unsigned long... unsigned int
checking whether time_t is an int or a long... long
checking whether int64_ts are supported in a test program... yes
checking whether printf()/scanf() uses %ld for 64-bit integers... yes
checking whether __func__ is available... yes
checking whether socklen_t is available... yes
configure: creating ./config.status
config.status: creating Makefile
config.status: creating config.h
config.status: config.h is unchanged
[root@server spamdyke]# make
gcc -Wall -O2 -funsigned-char -c spamdyke.c
gcc -E -Wall -O2 -funsigned-char configuration.c | gcc -Wall -O2 -funsigned-char -x c -c -o configuration.o -
gcc -Wall -O2 -funsigned-char -c dns.c
gcc -Wall -O2 -funsigned-char -c environment.c
gcc -Wall -O2 -funsigned-char -c usage.c
gcc -Wall -O2 -funsigned-char -c search_fs.c
gcc -Wall -O2 -funsigned-char -c exec.c
gcc -Wall -O2 -funsigned-char -c base64.c
gcc -Wall -O2 -funsigned-char -c tls.c
gcc -Wall -O2 -funsigned-char -c log.c
gcc -Wall -O2 -funsigned-char -c config_test.c
gcc -Wall -O2 -funsigned-char -c md5.c
gcc -Wall -O2 -funsigned-char -c filter.c
gcc -Wall -O2 -funsigned-char -o spamdyke spamdyke.o configuration.o dns.o environment.o usage.o search_fs.o exec.o base64.o tls.o log.o config_test.o md5.o filter.o -lssl -lssl
strip spamdyke
I also have on /etc/xinetd.d/smtp_psa the full-log-dir option
service smtp
{
socket_type = stream
protocol = tcp
wait = no
disable = no
user = root
flags = IPv6
instances = UNLIMITED
env = SMTPAUTH=1
server = /var/qmail/bin/tcp-env
server_args = -Rt0 /var/qmail/bin/relaylock /usr/local/bin/spamdyke -f /etc/spamdyke.conf -L /root/smtp_full_log/ /var/qmail/bin/qmail-smtpd /var/qmail/bin/smtp_auth /var/qmail/bin/true /var/qmail/bin/cmd5checkpw /var/qmail/bin/true
}
Although the user is defined as root in this file, it seems qmaild seems to call the spamdyke process. Should it be root? How would I change this?

I've also tried adding the line
full-log-dir=/root/smtp_full_log
in /etc/spamdyke.conf as well.

Any help would be greatly appreciated.

Choji
Choji
Forum User
Forum User
Posts: 28
Joined: Mon Sep 10, 2012 10:00 am
Location: United Kingdom

Re: Spamdyke: Can't enable excessive logging

Unread post by Choji »

Turns out that relaylock that runs before spamdyke had changed the user from root to qmaild.
I changed the full-log-dir to /tmp/smtp_full_log, created that directory and changed permission/ownership so qmaild can write to it.
Then I started logs being generated!
faris
Long Time Forum Regular
Long Time Forum Regular
Posts: 2321
Joined: Thu Dec 09, 2004 11:19 am

Re: Spamdyke: Can't enable excessive logging

Unread post by faris »

spamdyke should be the first thing on the line after -Rt0 not relaylock

But I don't think that will have any effect on logging.
--------------------------------
<advert>
If you want to rent a UK-based VPS that comes with friendly advice and support from a fellow ART fan, please get in touch.
</advert>
Post Reply