• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 596
  • Last Modified:

Simple postfix setup

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?
  • 2
  • 2
1 Solution
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.
BentFranklinAuthor Commented:
I realized since I do not want to receive emails, all i need is a simple SMTP client.  I chose sendemail:  

BentFranklinAuthor Commented:
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.
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.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now