Connections are dropped immediately
Hi group,
I'm having a problem with my Exim configuration: all connections to
the daemon are dropped immediately. I've tried from the localhost, and
from an external IP address. No message is printed to the socket, and
no message is printed to the log. The connection is definitely
successfully made, according to tcpdump. I _can_ stay connected to
other services running on this box. iptables is not running.
I'm using exim 4.68 on Gentoo Linux, compiled with the X, ipv6, mysql,
pam, perl, ssl and tcpd USE flags. I've only just installed it, so
there is no previous working exim configuration.
Following is a list of all the files I imagine are likely to be
relevant to figuring out what's wrong.
My exim.conf is
<<EOF
hostlist local_hosts = 127. 192.168.1.
domainlist local_domains = ${lookup mysql{select domain from
domains}}
auth_advertise_hosts = *
daemon_smtp_ports = 25
log_selector = +all
smtp_banner = "Yo."
acl_smtp_rcpt = acl_check_rcpt
acl_smtp_mail = acl_check_sender
acl_smtp_connect = acl_check_host
hide mysql_servers = localhost/mail/exim/exim
begin acl
acl_check_host:
deny
log_message = host blacklisted
hosts = ${lookup mysql{select host from
host_blacklist}}
accept
acl_check_sender:
deny
log_message = sender blacklisted
senders = ${lookup mysql{select sender from
sender_blacklist}}
accept
verify = sender
deny
acl_check_rcpt:
accept
hosts = +local_hosts
require
log_message = no relay
domains = +local_domains
accept
message = unrouteable address
verify = recipient
begin routers
relay:
driver = dnslookup
domains = ! +local_domains
transport = remote_smtp
ignore_target_hosts = 0.0.0.0 : 127.0.0.0/8
no_more
alias:
driver = redirect
allow_fail
allow_defer
data = ${lookup mysql{ \
select recipients from aliases \
where local_part = '${quote_mysql:$
{local_part}}' \
and domain = '${quote_mysql:$
{domain}}'}}
user:
driver = accept
domains = ${lookup mysql{ \
select domain from domains \
where domain = '${quote_mysql:$
{domain}}'}}
local_parts = ${lookup mysql{ \
select login from users \
where local_part = '${quote_mysql:$
{local_part}}' \
and domain = '${quote_mysql:$
{domain}}'}}
transport = local_delivery
begin transports
remote_smtp:
driver = smtp
local_delivery:
driver = appendfile
check_string = ""
create_directory
delivery_date_add
directory = /var/mail/$domain/$local_part
directory_mode = 770
envelope_to_add
group = mail
maildir_format
maildir_tag = ,S=$message_size
message_prefix = ""
message_suffix = ""
mode = 0660
return_path_add
begin authenticators
auth_plain:
driver = plaintext
public_name = PLAIN
server_condition = ${lookup mysql{ \
select login from users \
where login = '${quote_mysql:${local_part:
$2}}' \
and domain = '${quote_mysql:$
{domain:$2}}' \
and password = '${quote_mysql:$3}'}
{yes}{no}}
server_prompts = :
server_set_id = $2
auth_login:
driver = plaintext
public_name = LOGIN
server_condition = ${lookup mysql{ \
select login from users \
where login = '${quote_mysql:$
{local_part:$1}}' \
and domain = '${quote_mysql:${domain:
$1}}' \
and password = '${quote_mysql:$2}'}
{yes}{no}}
server_set_id = $1
EOF
My exim_mainlog is
<<EOF
2008-01-25 22:22:56 [372] cwd=/ 3 args: /usr/sbin/exim -bd -q15m
2008-01-25 22:22:56 [374] exim 4.68 daemon started: pid=374, -q15m,
listening for SMTP on port 25 (IPv6 with IPv4)
2008-01-25 22:22:56 [375] cwd=/var/spool/exim 2 args: /usr/sbin/exim -
q
2008-01-25 22:22:56 [375] Start queue run: pid=375
2008-01-25 22:22:56 [375] End queue run: pid=375
EOF
The panic log is empty.
netstat says: tcp 0 0 :::
25 :::* LISTEN 374/
exim
/var/mail is owned by the mail user.
tcpdump -i lo says:
<<EOF
22:25:58.269591 IP localhost.36036 > localhost.smtp: S
651256053:651256053(0) win 32792 <mss 16396,sackOK,timestamp 181083530
0,nop,wscale 7>
22:25:58.269610 IP localhost.smtp > localhost.36036: S
645074077:645074077(0) ack 651256054 win 32768 <mss
16396,sackOK,timestamp 181083530 181083530,nop,wscale 7>
22:25:58.269864 IP localhost.36036 > localhost.smtp: . ack 1 win 257
<nop,nop,timestamp 181083530 181083530>
22:25:58.270661 IP localhost.34525 > localhost.auth: S
653868475:653868475(0) win 32792 <mss 16396,sackOK,timestamp 181083531
0,nop,wscale 7>
22:25:58.270685 IP localhost.auth > localhost.34525: R 0:0(0) ack
653868476 win 0
22:25:58.270876 IP localhost.33763 > localhost.domain: 61129+ PTR?
1.0.0.127.in-addr.arpa. (40)
22:25:58.271072 IP localhost.domain > localhost.33763: 61129 NXDomain*
0/1/0 (75)
22:25:58.271173 IP localhost.33763 > localhost.domain: 61547+ PTR?
1.0.0.127.in-addr.arpa. (40)
22:25:58.271252 IP localhost.domain > localhost.33763: 61547 NXDomain*
0/1/0 (75)
22:25:58.271535 IP localhost.smtp > localhost.36036: F 1:1(0) ack 1
win 256 <nop,nop,timestamp 181083532 181083530>
22:25:58.271644 IP localhost.36036 > localhost.smtp: F 1:1(0) ack 2
win 257 <nop,nop,timestamp 181083532 181083532>
22:25:58.271663 IP localhost.smtp > localhost.36036: . ack 2 win 256
<nop,nop,timestamp 181083532 181083532>
EOF
The SQL database is probably not relevant, but nonetheless: it's
currently empty and was created with:
<<EOF
drop database if exists `mail`;
create database `mail`;
use `mail`;
grant all on `mail`.* to 'mail'@'localhost' identified by 'mail';
create table `users`
(
`login` varchar(64) not null,
`domain` varchar(64) not null,
`password` varchar(128),
primary key (`login`, `domain`)
);
create view `domains` as select distinct `domain` from `users`;
create table `aliases`
(
`local_part` varchar(64) not null,
`domain` varchar(64),
`recipients` text,
primary key (`local_part`, `domain`)
);
create table `host_blacklist`
(
`host` varchar(64) not null,
`blacklister` varchar(64) not null,
`note` text not null,
primary key (`host`)
);
create table `sender_blacklist`
(
`sender` varchar(64) not null,
`blacklister` varchar(64) not null,
`note` text not null,
primary key (`sender`)
);
EOF
|