Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

We have a server, we are using this for backups and other cronjobs. I would like to send mail to the users when one of their cronjobs or backups has ended. Is it possible this if I don't have a domain name?

share|improve this question
use a regular mail service? like gmail? – Alvar Feb 21 '12 at 10:25
Or just buy a domain name, they aren't expensive. – Alvar Feb 21 '12 at 10:26
up vote 3 down vote accepted

Yes it is possible to send emails without having a domain name, if you currently make use of Gmail you can use your existing Gmail account to send emails as desired. This is a great tutorial which can help you configure it all:

This is one example of how to do it, you can use other email accounts it is not restricted to Gmail, but I believe this to be the most common.

share|improve this answer
Your link is dead. Any chance you could find a new one? Or even better, incorporate the steps into the answer itself :) – Seth Dec 6 '14 at 22:50
Here is the archived version:… – Majid Fouladpour Apr 25 at 5:29
did not work for me. after setting up exim4 it gave error "grep: /etc/inetd.conf: No such file or directory" – user13107 May 19 at 10:16

Is it possible this if I don't have a domain name?

The sort answer is Yes. You don't need a domain name to send email and my servers regularly send me emails (through postfix - you do need a MTA) about things from their hostname and my computer does the same. I'm constantly getting emails from root@bert (bert is my hostname).

The "problem" is that the emails might be blocked without a fully-qualified domain name because lots of anti-spam stuff relies on FQDNs to score emails' spamminess. I personally don't have any problems sending mail to myself on Gmail but you might have problems with Gmail or other providers.

The most professional solution would be to get a proper domain and set things up but if don't want to stretch the $10 or so, you can get a free email account with Google, Hotmail, etc and most of them will let you send email via SMTP. And then postfix can relay those emails

The email sending is solved here: How to send mail from the command line?

share|improve this answer
The spam problem seems worse if your recipients use Outlook. I find that my internal-only emails from servers get flagged as spam, but also that Outlook will not allow white-listing of email addresses without a domain name (it says they are invalid) – Colin Pickard Feb 21 '12 at 13:10

The easiest way to send an email without the complexity is to use the sendemail package. Assuming your server can see some kind of SMTP account, it's a breeze.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.