?

Log in

No account? Create an account
Two weeks without mail and I'm desperate - Baxil [bakh-HEEL'], n. My Sites [Tomorrowlands] [The TTU Wiki] [Photos]
View My LJ [By Tag]


December 22nd, 2006
06:38 pm
[User Picture]

[Link]

Previous Entry Share Next Entry
Two weeks without mail and I'm desperate
Alright, I need some big geek juju. I know I have many Unix wizards and friends-of-wizards on my friends list. Please give me a hand.

Tlands' host stopped being able to send outgoing e-mail about two weeks ago. We're running exim (4.54 #1) with xinetd (Version 2.3.14 libwrap loadavg) on Linux (Linux 2.6.15-27-server #1 i686 GNU/Linux). Incoming mail is smooth as silk, but any time I try to send a message beyond localhost (even directly using exim -v), it gives me an error:
==any.address@any.domain.com R=lookuphost T=remote_smtp defer (-1): TCP port "smtp" is not defined for remote_smtp transport

I'm at my wits' end here. I've been researching this for the better part of a week and have spent probably eight hours combing through documentation (half of it tonight, and it didn't fix the problem). I'm starting to run around in circles.

I've made sure there's an smtp entry in /etc/services --
smtp             25/tcp                mail

I've added the missing smtp entry to /etc/xinetd.d (and changed its permissions to 644):
service smtp
{
socket_type = stream
protocol = tcp
wait = no
user = root
server = /usr/sbin/exim
server_args = -bs
}


Here's the version and config summary from exim, which also says its config file syntax is OK:
$> exim -bV
Exim version 4.54 #1 built 04-Oct-2005 14:00:25
Copyright (c) University of Cambridge 2005
Berkeley DB: Sleepycat Software: Berkeley DB 3.2.9: (May 26, 2004)
Support for: crypteq iconv() Perl OpenSSL Content_Scanning Old_Demime
Lookups: lsearch wildlsearch nwildlsearch iplsearch cdb dbm dbmnz
Authenticators: cram_md5 plaintext spa
Routers: accept dnslookup ipliteral manualroute queryprogram redirect
Transports: appendfile/maildir/mailstore/mbx autoreply lmtp pipe smtp
Configuration file is /etc/exim.conf

exim.conf has the following router and transport set up for outgoing mail:
# This router routes to remote hosts over SMTP using a DNS lookup. Any domain
# that resolves to an IP address on the loopback interface (127.0.0.0/8) is
# treated as if it had no DNS entry.

lookuphost:
driver = dnslookup
domains = ! +local_domains
ignore_target_hosts = 127.0.0.0/8
condition = "${perl{check_limits}}"
transport = remote_smtp
no_more


(snip)

# This transport is used for delivering messages over SMTP connections.

remote_smtp:
driver = smtp


Both xinetd and exim were restarted after config changes were made.

As far as I can tell, that should be more than enough to have it working. I can't even figure out what else I need to rule out. What else would help troubleshoot this? Netstat listings? xinetd config? Lists of file permissions?

I really appreciate any assistance here, even if it's just pointing me at a Linux users mailing list I can beg for aid.

Current Location: ~yuba
Tags: ,

(12 comments | Leave a comment)

Comments
 
[User Picture]
From:baxil
Date:December 23rd, 2006 03:21 am (UTC)

eight hours of condensed web research

(Link)
so everyone who wants to help doesn't have to lay the same groundwork I did:

* http://www.troubleshooters.com/codecorn/sockets/
good socket tutorial, offers xinetd tips, creating new sockets, /etc/services

* O'Reilly Linux guide Chap 19 - Getting exim running
http://www.oreilly.com/catalog/linag2/book/ch19.html

* Complete exim documentation:
http://www.exim.org/exim-html-4.50/doc/html/spec.html

exim with xinetd ON DEBIAN:
http://pkg-exim4.alioth.debian.org/README/README.Debian.html#id224274

testing exim
http://www.exim.org/eximwiki/TestingExim


** investigate these **
... is chroot necessary? at fault?
http://www.hjackson.org/blog/archives/2005/12/index.html

... is this a sporadic bug in exim? (but it's too consistent ...)
http://www.exim.org/mail-archives/exim-users/Week-of-Mon-20021021/msg00169.html

... Too many open files?
http://www.exim.org/mail-archives/exim-users/Week-of-Mon-20040301/msg00101.html
[User Picture]
From:tangaroa
Date:December 23rd, 2006 04:34 am (UTC)
(Link)
Not an exim user, but the chroot suggestion sounds most likely out of the first few explanations I've been able to google up. If the conf file lists any kind of exim home directory that the server might be chrooted to, try copying the /etc/services file there.

Or you can try doing it the hard way and find out where the program looks for port "smtp" and put in 25 there instead.
[User Picture]
From:baxil
Date:December 23rd, 2006 06:18 am (UTC)
(Link)
Thanks for the suggestion. I don't think anything is chrooted, but I'm not totally certain what to look for. Is there anything in http://www.nobaloney.net/downloads/spamblocker/DirectAdmin/exim.conf.spamblocked -- which is what our config file seems to be based on -- that would indicate directory switching?
[User Picture]
From:alynna
Date:December 23rd, 2006 10:34 am (UTC)
(Link)
Try adding 'port = 25' to the remote_smtp: section of your conf file.
AIM or ICQ me if this doesnt fix it.
[User Picture]
From:baxil
Date:December 23rd, 2006 09:24 pm (UTC)
(Link)
I'll try that this afternoon, when I'll have time to reverse the change if that screws anything up. I'l let you know if it has any effect.
[User Picture]
From:baxil
Date:December 25th, 2006 02:12 am (UTC)
(Link)
Holy shit, it worked. I can't believe that's all I needed. Thank you! :-D
[User Picture]
From:necama
Date:December 23rd, 2006 06:39 pm (UTC)
(Link)
Have you tried telneting to the port from the console of the machine in question? For that matter, do you even have console access?
[User Picture]
From:baxil
Date:December 23rd, 2006 09:22 pm (UTC)
(Link)
baxil@aku:~$ telnet localhost 25
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
220 aku.ksilebo.net ESMTP Exim 4.54 Sat, 23 Dec 2006 13:16:05 -0800
HELO looks.like.its.working.net
250 aku.ksilebo.net Hello localhost [127.0.0.1]
QUIT
221 aku.ksilebo.net closing connection
Connection closed by foreign host.


... And, as I've said, incoming mail is delivered flawlessly.
[User Picture]
From:elynne
Date:December 23rd, 2006 07:56 pm (UTC)
(Link)
I sent email from my gmail to your gmail several days ago; I take it this is related to why I haven't heard back from you? ;)
[User Picture]
From:baxil
Date:December 23rd, 2006 09:20 pm (UTC)
(Link)
Ah! OK. I auto-forward mail from gmail to tlands, so I hadn't noticed you sent it there. I'll get on gmail after kadyg and I return from Christmas shopping and answer the questions.
[User Picture]
From:elynne
Date:December 23rd, 2006 09:30 pm (UTC)
(Link)
Neo problemo; and what, you're going Xmas shopping *today*?? Yikes. =O.O= Be careful out there!
From:(Anonymous)
Date:January 16th, 2007 03:44 pm (UTC)

Other solution

(Link)
I'd got the same problem, due to bad permissions on /etc/services (640 root:root where 644 root:root was expected). May strace be with you.
Tomorrowlands Powered by LiveJournal.com