You are not logged in. Login or Register for free.
Title only?
Strange sound and vision from here to the end of the world.
"We're fans first, journalists second."






  7 comments
  Email this

  


Posted on Monday, September 25th, 2006 19:34:12 GMT by: quietearth
Posted under: ubuntu mail

I needed to send email from the command line, specifically for cron jobs, and there are many programs which can do this. I'm going to use the gnu mailutils package so first off let's install the mailutils package:
# apt-get install mailutils

This will add a few extra packages, then bring us up into an exim4 configuration screen. My systems are behind a dsl router, and I'm not going to route the mail through any relay host, I just want everything sent direct (for some sendmail agents this might cause problems, but you'll have to look at your logfiles). In the exim4 config screen I pick "internet site... mail is sent and receieved directly using SMTP". On edgy you might have to answer a few more questions, but I had to run a dpkg-reconfigure.

At this point we have exim4 listening on port 25 and I don't need that, so I need to stop the daemon and remove the startup links:
# /etc/init.d/exim4 stop
# update-rc.d -f exim4 remove


The update-rc.d command removes inits startup/shutdown links, but unfortunately if the exim4 packages get updated the links will be back so we need to run that command again.

Now lets try sending a test mail:
# echo testing | mail -s Bla myemail@somewhere.com

and take a look at /var/log/exim4/mainlog. You should be good to go!

Tested under dapper and edgy.

RSS Feed for comments

Comments

An easiest way would have been to install the ssmtp package before mailutils. No big exim package would have been installed then.

Posted by: Anonymous | January 23, 2007 02:51:44 am | permalink

Under Feisty, just run 'aptitude install mailutils'

Posted by: Anonymous | March 18, 2008 01:37:24 am | permalink

Nice tip. But mail does not exit. In log says:
'Mailing to remote domains not supported'

Posted by: Posicionamiento | October 7, 2008 10:37:58 am | permalink

Ok i have to config exim4 with this:
'dpkg-reconfigure exim4-config'

Posted by: Posicionamiento | October 7, 2008 10:52:06 am | permalink

Another one:

apt-get install sendemail

sendemail is very lightweight

Posted by: Joe | October 16, 2008 02:44:28 pm | permalink

Nice One

Posted by: vikaskumarroy | March 31, 2009 07:04:50 am | permalink

If you have access to an open relay (usually on your local network) I recommend using the package "sendEmail" (note the capital E). It has no dependencies except perl so it's alot handier than setting up exim etc!

Posted by: Anonymous | July 24, 2009 04:57:41 pm | permalink

Post a comment

Name:
(default is Anonymous)
Contact:
(email or url, optional)
Comment:
(no html or bbcode)
Captcha:



Related articles
Posted on Monday, April 2nd, 2007 2:28:12 GMT by: quietearth |   4 comments

Posted on Monday, April 23rd, 2007 3:22:07 GMT by: quietearth |   0 comments

Posted on Wednesday, August 16th, 2006 19:07:02 GMT by: quietearth |   14 comments

Posted on Wednesday, August 16th, 2006 23:49:49 GMT by: quietearth |   12 comments

Posted on Monday, August 21st, 2006 18:41:02 GMT by: quietearth |   7 comments




rss | subscribe via email | the team | contact us | mobile
© 2006-2009 Don Neumann (except where applicable)
We are looking for free hosting with a cut of sales, you'll get a link right here.
If you want news of your film posted, use our contact page and we'll check it out
Permission is granted to use material from this site if you provide a reference to us via a link and DO NOT HOTLINK.


GenreBanners.com Banner Exchange