LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 02-19-2011, 05:14 AM   #1
madamsonrkc
LQ Newbie
 
Registered: Feb 2011
Posts: 5

Rep: Reputation: 0
Can't get mail command (or equivalent) to work


I am teaching using an Ubuntu 10 server. The course stipulates the students use the mail command to send me assessment work, however I can't get mail to work (I did have to install it in the first place). After I end the message with a dot I get the message "send-mail: cannot open mail:25".
Can anyone help me?
 
Old 02-19-2011, 07:19 AM   #2
goodhombre
Member
 
Registered: Mar 2010
Location: Ungheni, Rep. Moldova
Distribution: Ubuntu
Posts: 89

Rep: Reputation: 22
Hi,

Check if mailserver is running on port 25 :
Code:
sudo netstat -taenp | grep -i listen|  grep :25
Also please provide the command you are running to send email.

Last edited by goodhombre; 02-19-2011 at 07:20 AM.
 
Old 02-20-2011, 03:24 PM   #3
madamsonrkc
LQ Newbie
 
Registered: Feb 2011
Posts: 5

Original Poster
Rep: Reputation: 0
Checked for port 25

I used the command and got no reply so I assume nothing is happening on port 25.
I am trying to use the actual mail command (because it is stipulated in the students' assessment).

>maureen@ubuntu:~$ mail maureen
>Subject: text
>more text
>.
>EOT
>maureen@ubuntu:~$ send-mail: Cannot open mail:25

I have now also found that I can install mailutils and get the mail command to run if I use Ubuntu 9.04 Desktop. So if nothing else works at least I have a solution.

Thanks for your help
 
Old 02-21-2011, 01:39 PM   #4
goodhombre
Member
 
Registered: Mar 2010
Location: Ungheni, Rep. Moldova
Distribution: Ubuntu
Posts: 89

Rep: Reputation: 22
Hi,

You can install mailutils on ubuntu 10 server too.
It will install also exim mailserver .
If the serve will not start automatically you can try to start it using :
Code:
sudo service exim4
 
Old 02-22-2011, 04:36 AM   #5
madamsonrkc
LQ Newbie
 
Registered: Feb 2011
Posts: 5

Original Poster
Rep: Reputation: 0
Thanks

The errors I am getting currently follow on from installing heirloom-mailx.

I was using it because when I try to install mailutils I get this this:

maureen@ubuntu:~$ sudo apt-get install mailutils
>[sudo] password for maureen:
>Reading package lists... Done
>Building dependency tree
>Reading state information... Done
>Some packages could not be installed. This may mean that you have
>requested an impossible situation or if you are using the unstable
>distribution that some required packages have not yet been created
>or been moved out of Incoming.
>The following information may help to resolve the situation:

>The following packages have unmet dependencies:
> mailutils: Depends: libmailutils2 (> 1:2.1) but it is not going to be installed
> Depends: libmysqlclient16 (>= 5.1.21-1) but it is not installable
>E: Broken packages

If I then try to install these last 2 packages I get more errors.

>maureen@ubuntu:~$ sudo apt-get install libmailutils2
>Reading package lists... Done
>Building dependency tree
>Reading state information... Done
>Some packages could not be installed. This may mean that you have
>requested an impossible situation or if you are using the unstable
>distribution that some required packages have not yet been created
>or been moved out of Incoming.
>The following information may help to resolve the situation:

>The following packages have unmet dependencies:
> libmailutils2: Depends: libmysqlclient16 (>= 5.1.21-1) but it is not installable
>E: Broken packages
>maureen@ubuntu:~$ sudo apt-get install libmysqlclient16
>Reading package lists... Done
>Building dependency tree
>Reading state information... Done
>Package libmysqlclient16 is not available, but is referred to by another package.
>This may mean that the package is missing, has been obsoleted, or
>is only available from another source
>E: Package libmysqlclient16 has no installation candidate
>maureen@ubuntu:~$

I am wondering if there is an inherent problem in the version of Ubuntu I am using?
It seems strange that I can get it to work on Ubuntu 9.04 with no problems, while every effort in Ubuntu 10.4 just brings up fresh errors.

Thank you for spending time on this with me. I really appreciate your efforts - even if I don't get it to work I am learning more about Linux Admin.
 
Old 02-22-2011, 04:57 AM   #6
goodhombre
Member
 
Registered: Mar 2010
Location: Ungheni, Rep. Moldova
Distribution: Ubuntu
Posts: 89

Rep: Reputation: 22
Hi,

Strange, I didn't have any issues installing mailutils on Ubuntu 10.04
What returns :
Code:
aptitude search libmysqlclient16
?
 
Old 02-23-2011, 03:10 AM   #7
madamsonrkc
LQ Newbie
 
Registered: Feb 2011
Posts: 5

Original Poster
Rep: Reputation: 0
Nothing:
>maureen@ubuntu:~$ aptitude search libmysqlclient16
>maureen@ubuntu:~$

Thanks again
 
Old 02-24-2011, 11:20 AM   #8
goodhombre
Member
 
Registered: Mar 2010
Location: Ungheni, Rep. Moldova
Distribution: Ubuntu
Posts: 89

Rep: Reputation: 22
Hi,

This package is included in main ubuntu repo.
I don't know why apt didn't find it .

What version of ubuntu you have 10.10 or 10.04 ?
Try to check /etc/apt/sources.list file, and search if there exists :
Code:
deb http://us.archive.ubuntu.com/ubuntu/ maverick main
if you have installed 10.10 version or
Code:
deb http://us.archive.ubuntu.com/ubuntu/ lucid main
if you have 10.04
 
  


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 (mailserver) -- sending mail with the mail command -- doesn't work :-( carolinevdh Linux - Server 1 08-13-2009 09:43 PM
Debian etch - Unable to send mail from command line or from php mail command lqforumuser Linux - Newbie 1 03-01-2009 06:56 AM
can mail command be used to send mail onto global mail servers like yahoo etc dale_chip Linux - Newbie 4 08-12-2008 08:33 AM
Require Linux/Perl equivalent command for windows Command alix123 Programming 7 08-19-2005 02:23 AM
sending mail from command line won't work disorderly Linux - General 2 06-09-2005 11:29 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

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