LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 10-29-2008, 04:40 PM   #1
sporkit
Member
 
Registered: Feb 2004
Posts: 71

Rep: Reputation: 15
Help Sending Mail


I'm trying to get my server to send email from the command line. It looks as if the message is being sent correctly. However, I'm not getting anything at several different accounts ive tested with (or in spam boxes either). Does this output help any?

My server runs behind a firewall which is publically accessible at sporkit.hopto.org using a dynamic ip address.

Code:
root@spokrit.hopto.org-> mail -v jm*****@***.org
Subject: test message
testing....
.
EOT
jm****@***.org... Connecting to [127.0.0.1] via relay...
220 spokrit.hopto.org ESMTP Sendmail 8.13.6/8.13.6; Wed, 29 Oct 2008 16:30:43 -0500 (CDT)
>>> EHLO spokrit.hopto.org
250-spokrit.hopto.org Hello localhost [127.0.0.1], pleased to meet you
250-ENHANCEDSTATUSCODES
250-PIPELINING
250-8BITMIME
250-SIZE
250-DSN
250-ETRN
250-DELIVERBY
250 HELP
>>> MAIL From:<john@spokrit.hopto.org> SIZE=56
250 2.1.0 <john@spokrit.hopto.org>... Sender ok
>>> RCPT To:<jm*****@***.org>
>>> DATA
250 2.1.5 <jm*****@***.org>... Recipient ok
354 Enter mail, end with "." on a line by itself
>>> .
250 2.0.0 m9TLUhU7012647 Message accepted for delivery
jm*****@***.org... Sent (m9TLUhU7012647 Message accepted for delivery)
Closing connection to [127.0.0.1]
>>> QUIT
221 2.0.0 spokrit.hopto.org closing connection
Code:
Oct 29 16:30:43 spokrit sendmail[12646]: m9TLUhAj012646: from=john, size=56, class=0, nrcpts=1, msgid=<200810292130.m9TLUhAj012646@spokrit.hopto.org>, relay=root@localhost
Oct 29 16:30:43 spokrit sm-mta[12647]: m9TLUhU7012647: from=<john@spokrit.hopto.org>, size=379, class=0, nrcpts=1, msgid=<200810292130.m9TLUhAj012646@spokrit.hopto.org>, proto=ESMTP, daemon=Daemon0, relay=localhost [127.0.0.1]
Oct 29 16:30:43 spokrit sendmail[12646]: m9TLUhAj012646: to=jm*****@***.org, ctladdr=john (1010/1010), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30056, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (m9TLUhU7012647 Message accepted for delivery)
 
Old 10-29-2008, 04:59 PM   #2
sporkit
Member
 
Registered: Feb 2004
Posts: 71

Original Poster
Rep: Reputation: 15
Here's an update. It seems like my box is trying to communicate with the smtp server but eventually times out. I know i have port 25 open right now.

Code:
From MAILER-DAEMON Wed Oct 29 16:36:58 2008
Date: Wed, 29 Oct 2008 16:36:58 -0500 (CDT)
From: Mail Delivery Subsystem <MAILER-DAEMON>
To: <john@spokrit.hopto.org>
MIME-Version: 1.0
Content-Type: multipart/report; report-type=delivery-status;
        boundary="m9TLLqj8012605.1225316218/spokrit.hopto.org"
Subject: Warning: could not send message for past 4 hours
Auto-Submitted: auto-generated (warning-timeout)

This is a MIME-encapsulated message

--m9TLLqj8012605.1225316218/spokrit.hopto.org

    **********************************************
    **      THIS IS A WARNING MESSAGE ONLY      **
    **  YOU DO NOT NEED TO RESEND YOUR MESSAGE  **
    **********************************************

The original message was received at Wed, 29 Oct 2008 12:19:36 -0500 (CDT)
from localhost [127.0.0.1]

   ----- Transcript of session follows -----
<jm******@***.org>... Deferred: Operation timed out with smtp2.***.org.
Warning: message still undelivered after 4 hours
Will keep trying until message is 5 days old

--m9TLLqj8012605.1225316218/spokrit.hopto.org
Content-Type: message/delivery-status

Reporting-MTA: dns; spokrit.hopto.org
Arrival-Date: Wed, 29 Oct 2008 12:19:36 -0500 (CDT)

Final-Recipient: RFC822; jm******@***.org
Action: delayed
Status: 4.4.1
Remote-MTA: DNS; smtp2.***.org
Last-Attempt-Date: Wed, 29 Oct 2008 16:36:58 -0500 (CDT)
Will-Retry-Until: Mon, 3 Nov 2008 11:19:36 -0500 (CDT)

--m9TLLqj8012605.1225316218/spokrit.hopto.org
Content-Type: message/rfc822

Return-Path: <john@spokrit.hopto.org>
Received: from spokrit.hopto.org (localhost [127.0.0.1])
        by spokrit.hopto.org (8.13.6/8.13.6) with ESMTP id m9THJZQr011587
        for <jm******@***.org>; Wed, 29 Oct 2008 12:19:36 -0500 (CDT)
        (envelope-from john@spokrit.hopto.org)
Received: (from john@localhost)
        by spokrit.hopto.org (8.13.6/8.13.6/Submit) id m9THJZxZ011586
        for jm******@***.org; Wed, 29 Oct 2008 12:19:35 -0500 (CDT)
        (envelope-from john)
Date: Wed, 29 Oct 2008 12:19:35 -0500 (CDT)
From: User John <john@spokrit.hopto.org>
Message-Id: <200810291719.m9THJZxZ011586@spokrit.hopto.org>
To: jm******@***.org
Subject: test

asdf asdf asdf

--m9TLLqj8012605.1225316218/spokrit.hopto.org--
 
Old 10-30-2008, 10:19 AM   #3
sporkit
Member
 
Registered: Feb 2004
Posts: 71

Original Poster
Rep: Reputation: 15
A quick fix to this problem.

//in rc.conf
sendmail_enable="YES"

//restart sendmail
/etc/rc.d/sendmail restart

//test
telnet yourdomain.com 25
 
Old 10-30-2008, 11:05 AM   #4
sporkit
Member
 
Registered: Feb 2004
Posts: 71

Original Poster
Rep: Reputation: 15
Sending mail to the server was generating a 550 Relaying Denied error message. Needed to update /etc/hosts...

127.0.0.1 sporkit.hopto.org sporkit

I believe the problem is sendmail was trying to relay the message to sporkit.hopto.org but didnt realize sporkit.hopto.org was itself. So it returned the 550 stating it cant foward email to other machines....
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Mailserver sending but not sending mail from outside. simango Linux - Newbie 1 10-28-2008 08:51 AM
Squirrel Mail is not sending mail in INBOX MajazKhan Linux - Server 1 04-08-2007 06:57 AM
Postfix mail transfer agent not sending mail locally or to other servers sketelsen Linux - Software 3 02-09-2006 11:16 AM
Cron mail sending using outside SMTP mail server Utah Linux - Software 6 08-24-2005 07:44 PM
Sending an automatic mail using bash + mail Minuteman Linux - Software 4 08-21-2003 12:49 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 07:01 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration