jovie |
10-09-2007 06:49 AM |
A bit further forward. I found this command to test the mailer...
Code:
[root@localhost html]# echo "test" | mail -v -s test joe.bloggs@somewhere.co.uk
joe.bloggs@somewhere.co.uk... Connecting to [127.0.0.1] via relay...
220 localhost.localdomain ESMTP Sendmail 8.14.1/8.14.1; Tue, 9 Oct 2007 11:35:43 +0100
>>> EHLO localhost.localdomain
250-localhost.localdomain Hello localhost.localdomain [127.0.0.1], pleased to meet you
250 ENHANCEDSTATUSCODES
>>> MAIL From:<root@localhost.localdomain>
550 5.0.0 Access denied
root... Using cached ESMTP connection to [127.0.0.1] via relay...
>>> RSET
250 2.0.0 Reset state
>>> MAIL From:<>
550 5.0.0 Access denied
postmaster... Using cached ESMTP connection to [127.0.0.1] via relay...
>>> RSET
250 2.0.0 Reset state
>>> MAIL From:<>
550 5.0.0 Access denied
Closing connection to [127.0.0.1]
>>> QUIT
221 2.0.0 localhost.localdomain closing connection
[root@localhost html]# gedit /etc/hosts.allow &
[1] 23194
[root@localhost html]#
and I found this http://www.linuxquestions.org/questi...s-denied-5893/ thread which says fix it by adding sendmail : ALL to my hosts.allow file. That solves the access denied issue But is it safe?.
Now when I do...
Code:
[joe@localhost Music]$ echo "test" | mail -v -s test joe.bloggs@somewhere.co.uk
joe.bloggs@somewhere.co.uk... Connecting to [127.0.0.1] via relay...
220 localhost.localdomain ESMTP Sendmail 8.14.1/8.14.1; Tue, 9 Oct 2007 12:23:37 +0100
>>> EHLO localhost.localdomain
250-localhost.localdomain Hello localhost.localdomain [127.0.0.1], pleased to meet you
250-ENHANCEDSTATUSCODES
250-PIPELINING
250-8BITMIME
250-SIZE
250-DSN
250-ETRN
250-AUTH DIGEST-MD5 CRAM-MD5
250-DELIVERBY
250 HELP
>>> MAIL From:<joe@localhost.localdomain> SIZE=44 AUTH=joe@localhost.localdomain
250 2.1.0 <joe@localhost.localdomain>... Sender ok
>>> RCPT To:<joe.bloggs@somewhere.co.uk>
>>> DATA
250 2.1.5 <joe.bloggs@somewhere.co.uk>... Recipient ok
354 Enter mail, end with "." on a line by itself
>>> .
250 2.0.0 l99BNb4t023621 Message accepted for delivery
joe.bloggs@somewhere.co.uk... Sent (l99BNb4t023621 Message accepted for delivery)
Closing connection to [127.0.0.1]
>>> QUIT
221 2.0.0 localhost.localdomain closing connection
Which looks good to me but I don't get an email to the address used. I do get a message in /var/spool/mail/joe which says...
Code:
From MAILER-DAEMON@localhost.localdomain Tue Oct 9 12:23:37 2007
Return-Path: <MAILER-DAEMON@localhost.localdomain>
Received: from localhost (localhost)
by localhost.localdomain (8.14.1/8.14.1) id l99BNb4t023623;
Tue, 9 Oct 2007 12:23:37 +0100
Date: Tue, 9 Oct 2007 12:23:37 +0100
From: Mail Delivery Subsystem <MAILER-DAEMON@localhost.localdomain>
Message-Id: <200710091123.l99BNb4t023623@localhost.localdomain>
To: <joe@localhost.localdomain>
MIME-Version: 1.0
Content-Type: multipart/report; report-type=delivery-status;
boundary="l99BNb4t023623.1191929017/localhost.localdomain"
Subject: Returned mail: see transcript for details
Auto-Submitted: auto-generated (failure)
This is a MIME-encapsulated message
--l99BNb4t023623.1191929017/localhost.localdomain
The original message was received at Tue, 9 Oct 2007 12:23:37 +0100
from localhost.localdomain [127.0.0.1]
----- The following addresses had permanent fatal errors -----
<joe.bloggs@somewhere.co.uk>
(reason: 553 5.1.8 <joe.bloggs@somewhere.co.uk>... Domain of sender address joe@localhost.localdomain does not exist)
----- Transcript of session follows -----
... while talking to renko.ucs.ed.ac.uk.:
>>> DATA
<<< 553 5.1.8 <joe.bloggs@somewhere.co.uk>... Domain of sender address joe@localhost.localdomain does not exist
550 5.1.1 <joe.bloggs@somewhere.co.uk>... User unknown
<<< 503 5.0.0 Need RCPT (recipient)
--l99BNb4t023623.1191929017/localhost.localdomain
Content-Type: message/delivery-status
Reporting-MTA: dns; localhost.localdomain
Received-From-MTA: DNS; localhost.localdomain
Arrival-Date: Tue, 9 Oct 2007 12:23:37 +0100
Final-Recipient: RFC822; joe.bloggs@somewhere.co.uk
Action: failed
Status: 5.1.8
Remote-MTA: DNS; renko.ucs.ed.ac.uk
Diagnostic-Code: SMTP; 553 5.1.8 <joe.bloggs@somewhere.co.uk>... Domain of sender address joe@localhost.localdomain does not exist
Last-Attempt-Date: Tue, 9 Oct 2007 12:23:37 +0100
--l99BNb4t023623.1191929017/localhost.localdomain
Content-Type: message/rfc822
Return-Path: <joe@localhost.localdomain>
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by localhost.localdomain (8.14.1/8.14.1) with ESMTP id l99BNb4t023621
for <joe.bloggs@somewhere.co.uk>; Tue, 9 Oct 2007 12:23:37 +0100
Received: (from joe@localhost)
by localhost.localdomain (8.14.1/8.14.1/Submit) id l99BNbIx023620
for joe.bloggs@somewhere.co.uk; Tue, 9 Oct 2007 12:23:37 +0100
Date: Tue, 9 Oct 2007 12:23:37 +0100
From: joe@localhost.localdomain
Message-Id: <200710091123.l99BNbIx023620@localhost.localdomain>
To: joe.bloggs@somewhere.co.uk
Subject: test
test
--l99BNb4t023623.1191929017/localhost.localdomain--
Now I'm stuck what does it mean "Domain of sender address joe@localhost.localdomain does not exist"?
I have these jobs set up on another machine and the sender address is joe@machineID.co.uk so why does this setup use localhost and how do I change it?
Many thanks for a response.
|