Misc Tips

DB files cleanup

e.g.

exim_tidydb -t 7d /var/spool/exim retry

Local Delivery

The domains that will be processed locally without DNS lookup are defined by the local_domains configuration setting. E.g. (DirectAdmin default):

domainlist local_domains = lsearch;/etc/virtual/domains

TLS

CONFIG

/etc/exim.conf LOGS : /var/log/exim PID

POP hosts

The /etc/virtual/pophosts file will add all IP's who've access their pop accounts within the last 30 minutes.

COMMANDS

kill -HUP `cat /var/run/exim.pid` 

exim -bV : verifies config file & shows some info

exim -bV -C exim.new.conf : verifies a given config file

exim -bp : outputs queue eximwhat : what it's doing now

RUNNING PROCESSES

- exim -bd : STMP listening daemon

/usr/sbin/exim -bd -q15m -oP /var/run/exim.pid

-- daemon that processes queue every 15 minutes

/var/run/exim.pid : process id of the first daemon running (others are childs of it )

- exim -q : queue processor

- exim -Mc <msgid>

-- related to the delivery of the specified message

SPAMBLOCKER TIPS

- DOMAINS to be filtered must be added to /etc/virtual/use_rbl_domains

STATISTICS

nice eximstats -nr /var/log/exim/mainlog.1 > est1 & perldoc /usr/sbin/eximstats

Version

telnet localhost smtp

Warning

Performance Tips

command: system load

Exim 4.69 / 4.71 / 4.82

This is to get MySQL support for greylisting

[root@s3 depot]# wget ftp://ftp.freenet.de/pub/ftp.csx.cam.ac.uk/pub/software/email/exim/exim4/exim-4.69.tar.gz
[root@s3 depot]# tar xvfz exim-4.69.tar.gz
[root@s3 depot]# cd exim-4.69

OR:
[root@s7 depot]# wget http://dl.ambiweb.de/mirrors/ftp.exim.org/exim/exim4/exim-4.71.tar.bz2
[root@s7 depot]# tar xvfj exim-4.71.tar.bz2
[root@s7 depot]# cd exim-4.71
[root@s7 depot]# make

OR whatever the latest version is


[root@s3 exim-4.69]# make

*** Please create Local/Makefile by copying src/EDITME and making
*** appropriate changes for your site.

make: *** [Local/Makefile] Error 1

[root@s3 exim-4.82]# cp src/EDITME Local/Makefile

[root@s3 exim-4.82]# vi Local/Makefile

(see content below)

if db.h is missing (error in make), you will need:

yum install db4-devel.i386

make 
make install
mv /usr/sbin/exim /usr/sbin/exim.old
ln /usr/sbin/exim-4.69-2 /usr/sbin/exim

Verify - restart - verify

[root@s3 exim-4.82]# exim -bV | grep mysql
Lookups (built-in): lsearch wildlsearch nwildlsearch iplsearch dbm dbmjz dbmnz dnsdb mysql
[root@s3 exim-4.82]# kill -HUP `cat /var/run/exim.pid` 
[root@s3 exim-4.82]# telnet localhost smtp

iconv

You may get errors like:

#make 
...
gcc -o exim
rfc2047.o: In function `rfc2047_decode2':
rfc2047.c:(.text+0x395): undefined reference to `libiconv_open'
rfc2047.c:(.text+0x45a): undefined reference to `libiconv'
rfc2047.c:(.text+0x539): undefined reference to `libiconv_close'

In such case check if you have libiconv installed, and if .h file is on /usr/local/include and .o files on /usr/local/lib.

You make need to install it (download & compile, there's no rpm/yum)

Alternatively you may not use it. However it should be there for PHP5, DirectAdmin installs it and PHP5 needs it.

Local/Makefile

# Default in exim 4.71

PCRE_LIBS=-lpcre
LOOKUP_DNSDB=yes

# OR default in exim 4.82

PCRE_CONFIG=yes
# PCRE_LIBS=-lpcre

### ADDITIONAL LIBRARIES

# Commented default
# LOOKUP_INCLUDE=-I /usr/local/ldap/include -I /usr/local/mysql/include -I /usr/local/pgsql/include
# LOOKUP_LIBS=-L/usr/local/lib -lldap -llber -lmysqlclient -lpq

# MySQL using default iconv
# LOOKUP_INCLUDE=-I /usr/include/mysql
# LOOKUP_LIBS=-L/usr/lib/mysql -lmysqlclient

# MySQL using GNU's libiconv
HAVE_ICONV=yes
LOOKUP_INCLUDE=-I /usr/include/mysql -I /usr/local/include
LOOKUP_LIBS=-L/usr/lib/mysql -lmysqlclient -L/usr/local/lib -liconv

### 

#EXPERIMENTAL_DOMAINKEYS=yes
#CFLAGS  += -I/home/tom/exim-cvs/extra/libdomainkeys
#LDFLAGS += -ldomainkeys -L/home/tom/exim-cvs/extra/libdomainkeys
#http://www.directadmin.com/forum/showthread.php?s=&threadid=13847


WITH_CONTENT_SCAN=yes
WITH_OLD_DEMIME=yes
BIN_DIRECTORY=/usr/sbin
CONFIGURE_FILE=/etc/exim.conf
SYSTEM_ALIASES_FILE=/etc/aliases
EXIM_USER=mail
# EXIM_GROUP=
SPOOL_DIRECTORY=/var/spool/exim

ROUTER_ACCEPT=yes
ROUTER_DNSLOOKUP=yes
ROUTER_IPLITERAL=yes
ROUTER_MANUALROUTE=yes
ROUTER_QUERYPROGRAM=yes
ROUTER_REDIRECT=yes
# ROUTER_IPLOOKUP=yes

TRANSPORT_APPENDFILE=yes
TRANSPORT_AUTOREPLY=yes
TRANSPORT_PIPE=yes
TRANSPORT_SMTP=yes
TRANSPORT_LMTP=yes

SUPPORT_MAILDIR=yes
SUPPORT_MAILSTORE=yes
SUPPORT_MBX=yes

LOOKUP_DBM=no
LOOKUP_LSEARCH=yes
LOOKUP_CDB=no
#LOOKUP_DSEARCH=yes
#LOOKUP_LDAP=yes
LOOKUP_MYSQL=yes
#LOOKUP_NIS=yes
#LOOKUP_NISPLUS=yes
#LOOKUP_ORACLE=yes
#LOOKUP_PGSQL=yes
#LOOKUP_WHOSON=yes

# LDAP_LIB_TYPE=OPENLDAP1
# LDAP_LIB_TYPE=OPENLDAP2
# LDAP_LIB_TYPE=NETSCAPE
# LDAP_LIB_TYPE=SOLARIS

#ADDED#EXIM_MONITOR=eximon.bin

AUTH_CRAM_MD5=yes
AUTH_PLAINTEXT=yes
AUTH_SPA=yes

SUPPORT_TLS=yes
TLS_LIBS=-lssl -lcrypto
TLS_LIBS=-L/usr/local/openssl/lib -lssl -lcrypto
TLS_INCLUDE=-I/usr/local/openssl/include/ -I/usr/kerberos/include

#EXTRALIBS=-static

INFO_DIRECTORY=/usr/share/info

LOG_FILE_PATH=/var/log/exim/%slog

EXICYCLOG_MAX=10

COMPRESS_COMMAND=/usr/bin/gzip
COMPRESS_SUFFIX=gz
ZCAT_COMMAND=/usr/bin/zcat

EXIM_PERL=perl.o

# SUPPORT_PAM=yes
# RADIUS_CONFIG_FILE=/etc/radiusclient/radiusclient.conf
# CYRUS_PWCHECK_SOCKET=/var/pwcheck/pwcheck
# USE_TCP_WRAPPERS=yes

NO_SYMLINK=yes

# CHOWN_COMMAND=/usr/bin/chown
# CHGRP_COMMAND=/usr/bin/chgrp
# MV_COMMAND=/bin/mv
# RM_COMMAND=/bin/rm
# PERL_COMMAND=/usr/bin/perl
# AR=ar cq

# APPENDFILE_MODE=0600
# APPENDFILE_DIRECTORY_MODE=0700
# APPENDFILE_LOCKFILE_MODE=0600
# CONFIGURE_FILE_USE_NODE=yes
# CONFIGURE_FILE_USE_EUID=yes
# DELIVER_BUFFER_SIZE=8192
# EXIMDB_DIRECTORY_MODE=0750
# EXIMDB_MODE=0640
# EXIMDB_LOCKFILE_MODE=0640

# HEADER_MAXSIZE="(1024*1024)"
# INPUT_DIRECTORY_MODE=0750

LOG_DIRECTORY_MODE=0755
LOG_MODE=0644

# LOOKUP_TESTDB=yes
# MAKE_SHELL=/bin/sh
# MAX_NAMED_LIST=16
# MAXINTERFACES=250
# MSGLOG_DIRECTORY_MODE=0750
# PERL_CC=
# PERL_CCOPTS=
# PERL_LIBS=

PID_FILE_PATH=/var/run/exim.pid

# SPOOL_DIRECTORY_MODE=0750
# SPOOL_MODE=0640
SUPPORT_MOVE_FROZEN_MESSAGES=yes

Exim (last edited 2016-10-02 06:56:27 by JaumeSola)