Learn how to a build a cloud-first strategyRegister Now


Simple postfix setup

Posted on 2012-08-26
Medium Priority
Last Modified: 2012-08-27
Ubuntu Server 12.04

Want to set up ability to send mail from shell scripts.  Postfix setup is confusing.  If I don't have a domain, what is my FQDN?  Just my hostname?  Or should I use my dyndns address?  If I am not receiving emails, do I even care?

How do I just set it up so I can do:  mail -s "Something wrong" recipient

I have a gmail account set up for this.  Can I SMTP to it like any email client?
Question by:BentFranklin
  • 2
  • 2
LVL 13

Expert Comment

ID: 38334969
Best to use dyndns adress. Sometimes only hostname doesn't work.

For the mail -s command you need sendmail installed.
You can do it with:
$ sudo apt-get install sendmail
$ sudo sendmailconfig
Answer to the configuration questions posted during the installation.
The main files that gets written into during the installation process are

To verify you've configured it correctly, run the mail -s command.

Accepted Solution

BentFranklin earned 2000 total points
ID: 38335175
I realized since I do not want to receive emails, all i need is a simple SMTP client.  I chose sendemail:  


Author Comment

ID: 38335430
I've requested that this question be closed as follows:

Accepted answer: 0 points for BentFranklin's comment #a38335175

for the following reason:

The offered answer would have me configure sendmail, so too complicated.
LVL 13

Expert Comment

ID: 38335431
Gave a correct answer how he could use the syntax mail -s. He finds the installation to complecated so he goes to a different e-mail client + syntax.

But I've provided the correct answer, I can't do a thing about he thinks the installation is to complicated.

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This process describes the steps required to Import and Export data from and to .pst files using Exchange 2010. We can use these steps to export data from a user to a .pst file, import data back to the same or a different user, or even import data t…
Sometimes clients can lose connectivity with the Lotus Notes Domino Server, but there's not always an obvious answer as to why it happens.   Read this article to follow one of the first experiences I had with Lotus Notes on a client's machine, my…
In this video we show how to create a Distribution Group in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.: First we need to log into the Exchange Admin Center. Navigate to the Recipients >>…
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…
Suggested Courses

810 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question