LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 07-17-2015, 08:51 AM   #1
Alex90
LQ Newbie
 
Registered: Jul 2015
Posts: 20

Rep: Reputation: Disabled
email not send with sendmail


Hello guys

I'm a newbie with ubuntu and unix system and i have problems with sendmail comunication

I have 2 PC with ubuntu SO and try to send a email with sendmail with the 1 first pc called alex@aniki. When alex@aniki send email to itself the email delivered succesfully in my email directory in spool. But when Alex@aniki send a email to another PC called alex@alex-VirtualBox the email not send and return to me this error

Code:
 550 5.1.2 <alex@alex-VirtualBox>... Host Unknown (Name Server : alex-VirtualBox : Host not found
for send email i write on the command line

Code:
     echo "test email" | /usr/sbin/sendmail alex@alex-VirtualBox
What i am wrong? Help me please
 
Old 07-17-2015, 12:36 PM   #2
ceyx
Member
 
Registered: May 2009
Location: Fort Langley BC
Distribution: Kubuntu,Free BSD,OSX,Windows
Posts: 342

Rep: Reputation: 59
can
Quote:
alex@alex-VirtualBox
send an email to 'himself' ?

Does your VirtualBox computer have a static IP, or is it using DHCP from the host ?
I suspect DHCP, and if so, the sending computer may not have a record of where 'alex-Virtualbox' is.

You may want to set up a static IP in Virtualbox, then put it's IP in the /etc/hosts file, so your sender knows where to send it !

Last edited by ceyx; 07-17-2015 at 12:40 PM.
 
Old 07-17-2015, 01:32 PM   #3
Alex90
LQ Newbie
 
Registered: Jul 2015
Posts: 20

Original Poster
Rep: Reputation: Disabled
I have set DHCP in my computer and I modded the /etc/hosts file to link IP address with host , but nothing t.t
 
Old 07-17-2015, 01:40 PM   #4
ceyx
Member
 
Registered: May 2009
Location: Fort Langley BC
Distribution: Kubuntu,Free BSD,OSX,Windows
Posts: 342

Rep: Reputation: 59
1. can alex@alex-VirtualBox send an email to 'himself' ?
2. Does the Virtualbox computer have a static IP ?
 
Old 07-17-2015, 02:00 PM   #5
Alex90
LQ Newbie
 
Registered: Jul 2015
Posts: 20

Original Poster
Rep: Reputation: Disabled
1) Yes, It can

2)No, it has a dynamic IP, but in this session i change the hosts file , and resolve Address 192.168.0.9 to alex-VirtualBox
 
Old 07-17-2015, 02:20 PM   #6
ceyx
Member
 
Registered: May 2009
Location: Fort Langley BC
Distribution: Kubuntu,Free BSD,OSX,Windows
Posts: 342

Rep: Reputation: 59
Try this :

Open /etc/mail/sendmail.cf

Find the line starting with DaemonPortOptions and then replace Addr=127.0.0.1 to Addr=0.0.0.0

Note: 0.0.0.0 means all active interfaces.

then restart sendmail and Verify that everything is working fine:

netstat -tulpn | grep 25
tail -f /var/log/maillog
 
Old 07-17-2015, 04:29 PM   #7
Alex90
LQ Newbie
 
Registered: Jul 2015
Posts: 20

Original Poster
Rep: Reputation: Disabled
Nothing to do...

in the log of the sender sendmail dosen't return to me any errors, but the email doesn't arrive to receiver and with this config the email dosen't arrive also the same host when it sent to itself.

# SMTP daemon options

O DaemonPortOptions=Family=inet, Name=MTA-v4, Port=smtp, Addr=0.0.0.0
O DaemonPortOptions=Family=inet, Name=MSP-v4, Port=submission, M=Ea, Addr=0.0.0.0

It's the config file of the sender alex@aniki

P.S:I'm in Ubuntu 14.04 TLS

Last edited by Alex90; 07-17-2015 at 04:41 PM.
 
Old 07-17-2015, 04:41 PM   #8
Alex90
LQ Newbie
 
Registered: Jul 2015
Posts: 20

Original Poster
Rep: Reputation: Disabled
Strange problem....

Last edited by Alex90; 07-17-2015 at 05:32 PM.
 
Old 07-17-2015, 06:41 PM   #9
ceyx
Member
 
Registered: May 2009
Location: Fort Langley BC
Distribution: Kubuntu,Free BSD,OSX,Windows
Posts: 342

Rep: Reputation: 59
But it is the receiver that is having the problem, no ?

Check the virtualbox firewall, make sure 25 is open.

and set sendmail to listen on 0.0.0.0 in Virtual box.

Try traceroute or ping to 192.168.0.9, the error messages can be informative.

Last edited by ceyx; 07-17-2015 at 06:44 PM.
 
Old 07-21-2015, 10:31 AM   #10
Alex90
LQ Newbie
 
Registered: Jul 2015
Posts: 20

Original Poster
Rep: Reputation: Disabled
I try to erase the Addr from the line of code of sendmail.mc

DAEMON_OPTIONS(`Family=inet, Name=MTA-v4, Port=smtp, Addr=127.0.0.1')dnl

and become

DAEMON_OPTIONS(`Family=inet, Name=MTA-v4, Port=smtp')dnl

In this way i can receive from any interface

bute also i try to restart the service and update sendmail.cf trought mr4. Sendmail return to me same problem, the host aniki amd alex-VirtualBox for the other PC are unknown
 
Old 07-21-2015, 02:27 PM   #11
ceyx
Member
 
Registered: May 2009
Location: Fort Langley BC
Distribution: Kubuntu,Free BSD,OSX,Windows
Posts: 342

Rep: Reputation: 59
Quote:
Check the virtualbox firewall, make sure 25 is open.

and set sendmail to listen on 0.0.0.0 in Virtual box.

Try traceroute or ping to 192.168.0.9, the error messages can be informative.
And what is the status of this ? Have you tried it ? It would help us to help you if there was some kind of feedback on your end as to what was suggested for you to try. It seems like there are two conversations here rather than one
 
Old 07-22-2015, 11:23 AM   #12
Alex90
LQ Newbie
 
Registered: Jul 2015
Posts: 20

Original Poster
Rep: Reputation: Disabled
Sorry form mi missing response ^^'

Now, i try the your tricks
 
Old 07-22-2015, 11:59 AM   #13
Alex90
LQ Newbie
 
Registered: Jul 2015
Posts: 20

Original Poster
Rep: Reputation: Disabled
port 25 is OPEN

I use netstat -nap | grep LISTEN

and the output about port 25 is

tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN 2165/sendmail: MTA:
tcp 0 0 127.0.0.1:587 0.0.0.0:* LISTEN 2165/sendmail: MTA:

Last edited by Alex90; 07-22-2015 at 12:17 PM.
 
Old 07-22-2015, 12:18 PM   #14
Alex90
LQ Newbie
 
Registered: Jul 2015
Posts: 20

Original Poster
Rep: Reputation: Disabled
I try to send to other host another message, but sendmail return my the same error....

alex@aniki try to send a mail to alex@alex-VirtualBox

The error is this...

Quote:
From MAILER-DAEMON Wed Jul 22 19:16:00 2015
Return-Path: <MAILER-DAEMON>
Received: from localhost (localhost)
by aniki (8.14.4/8.14.4/Debian-4.1ubuntu1) id t6MHG0iw003323;
Wed, 22 Jul 2015 19:16:00 +0200
Date: Wed, 22 Jul 2015 19:16:00 +0200
From: Mail Delivery Subsystem <MAILER-DAEMON>
Message-Id: <201507221716.t6MHG0iw003323@aniki>
To: <alex@aniki>
MIME-Version: 1.0
Content-Type: multipart/report; report-type=delivery-status;
boundary="t6MHG0iw003323.1437585360/aniki"
Subject: Returned mail: see transcript for details
Auto-Submitted: auto-generated (failure)

This is a MIME-encapsulated message

--t6MHG0iw003323.1437585360/aniki

The original message was received at Wed, 22 Jul 2015 19:15:59 +0200
from localhost [127.0.0.1]

----- The following addresses had permanent fatal errors -----
<alex@alex-VirtualBox>
(reason: 550 Host unknown)

----- Transcript of session follows -----
550 5.1.2 <alex@alex-VirtualBox>... Host unknown (Name server: alex-virtualbox: host not found)

--t6MHG0iw003323.1437585360/aniki
Content-Type: message/delivery-status

Reporting-MTA: dns; aniki
Received-From-MTA: DNS; localhost
Arrival-Date: Wed, 22 Jul 2015 19:15:59 +0200

Final-Recipient: RFC822; alex@alex-VirtualBox
Action: failed
Status: 5.1.2
Remote-MTA: DNS; alex-virtualbox
Diagnostic-Code: SMTP; 550 Host unknown
Last-Attempt-Date: Wed, 22 Jul 2015 19:16:00 +0200

--t6MHG0iw003323.1437585360/aniki
Content-Type: text/rfc822-headers

Return-Path: <alex@aniki>
Received: from aniki (localhost [127.0.0.1])
by aniki (8.14.4/8.14.4/Debian-4.1ubuntu1) with ESMTP id t6MHFwiw003321
for <alex@alex-VirtualBox>; Wed, 22 Jul 2015 19:15:59 +0200
Received: (from alex@localhost)
by aniki (8.14.4/8.14.4/Submit) id t6MHFvIN003320
for alex@alex-VirtualBox; Wed, 22 Jul 2015 19:15:57 +0200
Date: Wed, 22 Jul 2015 19:15:57 +0200
From: Alex <alex@aniki>
Message-Id: <201507221715.t6MHFvIN003320@aniki>

--t6MHG0iw003323.1437585360/aniki--


 
Old 07-22-2015, 01:20 PM   #15
ceyx
Member
 
Registered: May 2009
Location: Fort Langley BC
Distribution: Kubuntu,Free BSD,OSX,Windows
Posts: 342

Rep: Reputation: 59
and if you ping alex-VirtualBox and aniki ip(s) ?

what is the output ?

Quote:
ping -c2 192.168.0.XXX
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Sendmail will not send email alwayslearning Linux - Software 3 05-06-2008 10:32 AM
send email with sendmail from out stigmata Linux - Software 1 12-20-2005 02:35 PM
can't send email, smtp or sendmail dtra Linux - Software 1 11-19-2005 06:00 PM
ppl can't send email to me... sendmail ultrax Linux - Networking 3 07-15-2005 03:37 PM
Can't send email outside my server with sendmail rocketman3245 Mandriva 1 07-28-2004 10:01 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 11:25 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