Sending mail from the command line only

Easy question.

I'm running a fairly fresh install of Debian, which comes with Exim installed by default (along with a strange lack of a config file). However, I'm unable to send any outgoing emails from the command line with that.

All I'd like is a very unobtrusive MTA (?) that will let me send mail from the command line and nothing else - I don't need to be able to connect from Outlook or have any ports listening to outside connections, etc.

I think I'm making this harder than it should be!

Edit - I'm also not sure on the DNS settings for this - does it require MX records?

4 Replies

IIRC, you should be able to send mail from the command line with either mail or mutt.

mail -s "My Subject" < message.txt
dmesg | mutt -s "My Subject" 


Thanks for the reply John.

Using either mail or mutt simply results in the error:

> unrouteable mail domain ""

I've a feeling this is something to do with my DNS configuration, but I don't have any experience with the mail side of things :(

Have you tried running eximconfig?


Have you tried running eximconfig?

Thanks! ;)


Please enter an answer

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct