LinuxQuestions.org
Help answer threads with 0 replies.
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 05-02-2014, 05:24 PM   #1
usr345
Member
 
Registered: Jan 2012
Distribution: Slackware
Posts: 204
Blog Entries: 1

Rep: Reputation: Disabled
Sendmail doesn't work on Ubuntu


I have an Ubuntu 13.10 server, where I need to install sendmail. I installed it, using commands:

Quote:
sudo apt-get install sendmail

sudo sendmailconfig
It installed, but the email is not being sent, when I run the command:

Quote:
echo "My test email being sent from sendmail" | /usr/sbin/sendmail my_email@example.com
The program just hangs, and nothing happens. Then I stopped sendmail:

Quote:
sudo service sendmail stop
* Stopping Mail Transport Agent (MTA) sendmail
It stops, but when I tried to start it - doesn't run, just hangs, no errors.

Quote:
sudo service sendmail start
* Starting Mail Transport Agent (MTA) sendmail
What could be wrong?
 
Old 05-02-2014, 05:43 PM   #2
Firerat
Senior Member
 
Registered: Oct 2008
Distribution: Debian sid
Posts: 2,683

Rep: Reputation: 783Reputation: 783Reputation: 783Reputation: 783Reputation: 783Reputation: 783Reputation: 783
Quote:
Originally Posted by usr345 View Post
What could be wrong?
The configuration!

First thing to check is the logs

If you still have problems, post config and logs,, be sure to obscure sensitive information!
 
Old 05-03-2014, 06:52 AM   #3
usr345
Member
 
Registered: Jan 2012
Distribution: Slackware
Posts: 204

Original Poster
Blog Entries: 1

Rep: Reputation: Disabled
Quote:
Originally Posted by Firerat View Post
First thing to check is the logs
I looked at the log:

Quote:
less /var/log/mail.err
And found this

Quote:
May 3 10:40:01 openvpnas2 sm-msp-queue[20209]: My unqualified host name (openvpnas2) unknown; sleeping for retry
May 3 10:41:01 openvpnas2 sm-msp-queue[20209]: unable to qualify my own domain name (openvpnas2) -- using short name
The error was fixed by adding this to /etc/hosts:

Quote:
127.0.0.1 openvpnas2 openvpnas2.#<- I added domain with dot
Now sendmail starts, but I still can't send emails. I created a file ~/text.txt:

(my real email address on gmail is changed here)
Quote:
To: my_email@gmail.com
Subject: Put a subject here
From: my_email@gmail.com

Of cause, here's the place to put the body
Then I ran:

Quote:
sendmail -vt < ~/text.txt
And got this response:

Quote:
openvpn@openvpnas2:/usr/local/openvpn_as/etc/db$ sendmail -vt < ~/text.txt
my_email@gmail.com... Connecting to [127.0.0.1] via relay...
220 openvpnas2. ESMTP Sendmail 8.14.4/8.14.4/Debian-2.1ubuntu4; Sat, 3 May 2014 11:40:55 GMT; (No UCE/UBE) logging access from: openvpnas2(OK)-openvpnas2 [127.0.0.1]
>>> EHLO openvpnas2.
250-openvpnas2. Hello openvpnas2 [127.0.0.1], pleased to meet you
250-ENHANCEDSTATUSCODES
250-PIPELINING
250-EXPN
250-VERB
250-8BITMIME
250-SIZE
250-DSN
250-ETRN
250-AUTH DIGEST-MD5 CRAM-MD5
250-DELIVERBY
250 HELP
>>> VERB
250 2.0.0 Verbose mode
>>> MAIL From:<openvpn@openvpnas2> SIZE=116 AUTH=openvpn@openvpnas2.
250 2.1.0 <openvpn@openvpnas2>... Sender ok
>>> RCPT To:<my_email@gmail.com>
>>> DATA
553 5.1.8 <my_email@gmail.com>... Domain of sender address openvpn@openvpnas2 does not exist
503 5.0.0 Need RCPT (recipient)
>>> RSET
250 2.0.0 Reset state
/home/openvpn/dead.letter... Saved message in /home/openvpn/dead.letter
Closing connection to [127.0.0.1]
>>> QUIT
221 2.0.0 openvpnas2. closing connection
So, it doesn't like this: "Domain of sender address openvpn@openvpnas2 does not exist"

What to do?
 
  


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
Sendmail SMTP send doesn't work with OS X 10.6 mail.app clients tedcox Linux - Server 4 09-19-2011 02:13 AM
sendmail email sending doesn't work correctly fabtk Linux - Software 5 08-29-2011 03:37 AM
My sendmail + Dovecot doesn't work ericyao Linux - Server 3 01-29-2010 03:30 AM
Sendmail (mailserver) -- sending mail with the mail command -- doesn't work :-( carolinevdh Linux - Server 1 08-13-2009 09:43 PM
Internet doesn't work on Ubuntu 9.04 Kubuntu Linux - Networking 2 06-16-2009 06:31 AM

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

All times are GMT -5. The time now is 05:51 AM.

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