How to get mail to local destinations delivered?

John Summerfield debian at herakles.homelinux.org
Mon Nov 12 21:42:34 UTC 2007


Chris G wrote:
> On Mon, Nov 12, 2007 at 01:33:49PM -0500, Tony Nelson wrote:
>> At 1:53 PM +0000 11/12/07, Chris G wrote:
>>  ...
>>> But mail to home.isbd.net fails.
>> Try sending an entire message?  Type the following:
>>
>> $ telnet 127.0.0.1 25
>> helo localhost.localdomain
>> mail from: home at locahost
>> rcpt to: root
>> data
>> test message
>> .
>> quit
>>
> OK, here you go:-
> 
>     home$ telnet 127.0.0.1 25
>     Trying 127.0.0.1...
>     Connected to 127.0.0.1.
>     Escape character is '^]'.
>     220 home.isbd.net ESMTP Sendmail 8.14.1/8.14.1; Mon, 12 Nov 2007
>     19:00:53 GMT
>     helo localhost.localdomain
>     250 home.isbd.net Hello localhost.localdomain [127.0.0.1], pleased to meet you
>     mail from: chris at home.isbd.net
>     250 2.1.0 chris at home.isbd.net... Sender ok
>     rcpt to: root
>     250 2.1.5 root... Recipient ok
>     data
>     354 Enter mail, end with "." on a line by itself
>     This is a message
>     and more
>     .
>     250 2.0.0 lACJ0rrT027280 Message accepted for delivery
>     quit
>     221 2.0.0 home.isbd.net closing connection
>     Connection closed by foreign host.
> 
> 
> ... and that has been delivered to root.   Similarly mail sent to
> 'chris' works too.  Huh!?
> 
> Just a minute.....
> 
> Ah, I'm beginning to understand, mail to 'chris' and 'root' works, but
> sendmail would appear to add a hostname to what's sent by an MUA and
> anything with a hostname after the username is sent out, which doesn't
> work.
> 

Well I'm flummoxed.

You can send mail directly with sendmail too, and there are some very 
fancy debugging options you can read up on, Chris.

But first, how to send mail with netcat. This is slightly obfuscated:
06:33 [summer at numbat ~]$ cat /home/summer/testmail | sed -e 's=ei=ie='
#!/bin/bash
nc <<Z $1 25
ehlo corridors.wa.edu.au
MAIL FROM: summer at coco.mersiene.nu
rcpt to:summer at cds.mersiene.nu
rcpt to:summer at coco.mersiene.nu
data
From: joe at example.com
Subject: undisclosed
to: summer at coco.mersiene.nu
mail from: gigaspammer at yahoo.com.au
rcpt to: mystocksoftware-unsubscribe at yahoogroups.com

data

.
Z
06:34 [summer at numbat ~]$

cat /home/summer/testmail2 | sendmail -t -v

[summer at potoroo ~]$ cat /home/summer/testmail2 | sed -e 's=ei=ie='
to:summer at cds.mersiene.nu
to:summer at coco.mersiene.nu
From: joe at example.com
Subject: undisclosed

to: summer at coco.mersiene.nu
mail from: gigaspammer at yahoo.com.au
rcpt to: mystocksoftware-unsubscribe at yahoogroups.com

data

[summer at potoroo ~]$


-- 

Cheers
John

-- spambait
1aaaaaaa at coco.merseine.nu  Z1aaaaaaa at coco.merseine.nu
-- Advice
http://webfoot.com/advice/email.top.php
http://www.catb.org/~esr/faqs/smart-questions.html
http://support.microsoft.com/kb/555375

Please do not reply off-list




More information about the fedora-list mailing list