think tank forum

technology » sendmail not sending

lucas's avatar
15 years ago
link
lucas
i ❤ demo
i've been running sendmail on a local box. it wasn't running any sendmail services, though, so i have a stack of crap in /var/spool/mqueue.

i'd like to deliver this mail, but sendmail isn't able to.

euterpe% cat /root/.forward
lucasreddinger@gmail.com
euterpe% cat /home/lucas/.forward
lucasreddinger@gmail.com
euterpe% tail /var/log/maillog
Dec 13 00:59:15 euterpe sm-mta[686]: mBD6RSCG000596: to=<lucasreddinger@gmail.com>, delay=01:31:44, xdelay=00:00:00, mailer=esmtp, pri=486741, relay=gsmtp147.google.com., dsn=4.0.0, stat=Deferred: Operation timed out with gsmtp147.google.com.
Dec 13 00:59:15 euterpe sm-mta[686]: mBD6RSC2000596: to=<lucasreddinger@gmail.com>, delay=01:31:45, xdelay=00:00:00, mailer=esmtp, pri=486751, relay=gsmtp183.google.com., dsn=4.0.0, stat=Deferred: Operation timed out with gsmtp183.google.com.
Dec 13 00:59:15 euterpe sm-mta[686]: mBD6RSCm000596: to=<lucasreddinger@gmail.com>, delay=01:31:42, xdelay=00:00:00, mailer=esmtp, pri=486920, relay=gsmtp183.google.com., dsn=4.0.0, stat=Deferred: Operation timed out with gsmtp183.google.com.
Dec 13 00:59:15 euterpe sm-mta[686]: mBD6RSC4000596: to=<lucasreddinger@gmail.com>, delay=01:31:45, xdelay=00:00:00, mailer=esmtp, pri=487248, relay=gsmtp147.google.com., dsn=4.0.0, stat=Deferred: Operation timed out with gsmtp147.google.com.
Dec 13 00:59:15 euterpe sm-mta[686]: mBD6RSCY000596: to=<lucasreddinger@gmail.com>, delay=01:31:43, xdelay=00:00:00, mailer=esmtp, pri=487446, relay=gsmtp147.google.com., dsn=4.0.0, stat=Deferred: Operation timed out with gsmtp147.google.com.
Dec 13 00:59:15 euterpe sm-mta[686]: mBD6RSC6000596: to=<lucasreddinger@gmail.com>, delay=01:31:45, xdelay=00:00:00, mailer=esmtp, pri=487707, relay=gsmtp183.google.com., dsn=4.0.0, stat=Deferred: Operation timed out with gsmtp183.google.com.
Dec 13 00:59:15 euterpe sm-mta[686]: mBD6RSCI000596: to=<lucasreddinger@gmail.com>, delay=01:31:44, xdelay=00:00:00, mailer=esmtp, pri=487978, relay=gsmtp147.google.com., dsn=4.0.0, stat=Deferred: Operation timed out with gsmtp147.google.com.
Dec 13 00:59:15 euterpe sm-mta[686]: mBD6RSC8000596: to=<lucasreddinger@gmail.com>, delay=01:31:45, xdelay=00:00:00, mailer=esmtp, pri=488506, relay=gsmtp183.google.com., dsn=4.0.0, stat=Deferred: Operation timed out with gsmtp183.google.com.
Dec 13 00:59:15 euterpe sm-mta[686]: mBD6RSD4000596: to=<lucasreddinger@gmail.com>, delay=01:31:41, xdelay=00:00:00, mailer=esmtp, pri=490732, relay=gsmtp183.google.com., dsn=4.0.0, stat=Deferred: Operation timed out with gsmtp183.google.com.
Dec 13 00:59:15 euterpe sm-mta[686]: mBD6RSCo000596: to=<lucasreddinger@gmail.com>, delay=01:31:42, xdelay=00:00:00, mailer=esmtp, pri=492521, relay=gsmtp147.google.com., dsn=4.0.0, stat=Deferred: Operation timed out with gsmtp147.google.com.
euterpe%


here's an example piece of mail:

euterpe% sudo cat /var/spool/mqueue/qfmBD7wCJh001679
V8
T1229155092
K1229155093
N1
P30617
MDeferred: Connection refused by host-69-146-93-86.bzm-mt.client.bresnan.net.
Fbs
$_localhost [127.0.0.1]
$rESMTP
$seuterpe.wingedleopard.net
${daemon_flags}
${if_addr}127.0.0.1
S<lucas@euterpe.wingedleopard.net>
MDeferred: Connection refused by host-69-146-93-86.bzm-mt.client.bresnan.net.
rRFC822; lucas@host-69-146-93-86.bzm-mt.client.bresnan.net
RPFD:<lucas@host-69-146-93-86.bzm-mt.client.bresnan.net>
H?P?Return-Path: <g>
H??Received: from euterpe.wingedleopard.net (localhost [127.0.0.1])
        by euterpe.wingedleopard.net (8.14.3/8.14.3) with ESMTP id mBD7wCJh001679
        for <lucas@host-69-146-93-86.bzm-mt.client.bresnan.net>; Sat, 13 Dec 2008 00:58:12 -0700 (MST)
        (envelope-from lucas@host-69-146-93-86.bzm-mt.client.bresnan.net)
H??Received: (from lucas@localhost)
        by euterpe.wingedleopard.net (8.14.3/8.14.3/Submit) id mBD7wCfX001678
        for lucas@euterpe.wingedleopard.net; Sat, 13 Dec 2008 00:58:12 -0700 (MST)
        (envelope-from lucas)
H??Date: Sat, 13 Dec 2008 00:58:12 -0700
H??From: lucas <lucas@host-69-146-93-86.bzm-mt.client.bresnan.net>
H??To: lucas <lucas@host-69-146-93-86.bzm-mt.client.bresnan.net>
H??Subject: hi
H??Message-ID: <20081213075812.GA1670@euterpe.wingedleopard.net>
H??Mime-Version: 1.0
H??Content-Type: text/plain; charset=us-ascii
H??Content-Disposition: inline
H??User-Agent: Mutt/1.4.2.3i
.
euterpe% sudo cat /var/spool/mqueue/dfmBD7wCJh001679
my name is lucas@euterpe.

i'm mailing lucas@euterpe.

bye!
euterpe%


do you know why google hates me?
lucas's avatar
15 years ago
link
lucas
i ❤ demo
nevermind. i just deleted the queue and installed postfix.
bluet's avatar
15 years ago
link
bluet
maybe your isp is blocking outbound smtp?
lucas's avatar
15 years ago
link
lucas
i ❤ demo
maybe. i don't know what sendmail was doing.

but i installed postfix and it relays the mail to my isp's smtp server. all is well. :)
maple's avatar
15 years ago
link
maple
i like large datasets
sendmail sucks.
DaGr8Gatzby's avatar
15 years ago
link
DaGr8Gatzby
Drunk by Myself
Lol so does ubuntu .

Sorry :(
Carpetsmoker's avatar
15 years ago
link
Carpetsmoker
Martin
> nevermind. i just deleted the queue and installed postfix.

The best solution for all your sendmail problems!
lucas's avatar
15 years ago
link
lucas
i ❤ demo
i just glanced at the piece of mail, and now i totally see what sendmail was doing:

i wanted to send mail to lucas@euterpe.
default search domain is wingedleopard.net, and hostname is euterpe.wingedleopard.net.

instead of realizing that it should deliver the mail locally, sendmail looks up "euterpe.wingedleopard.net" with my isp's dns server (i do not run a dns server in-house for internal ip addresses). my isp's dns server tells sendmail that euterpe.wingedleopard.net is a cname to host-69-146-93-86.bzm-mt.client.bresnan.net, which is the rdns hostname of the external nat ip.

sendmail tries to talk to the external ip of my router on port 25. port 25 isn't forwarded inward because i only wanted outbound smtp, and i didn't think that sendmail would lookup the hostname of the host on which it runs.

--

postfix realizes that it just needs to deliver the mail locally. so it attempts this, finds /home/lucas/.forward, and it simply sends the email to google instead. (fin.)