Simple postfix setup

Posted on 2012-08-26
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
    LVL 13

    Expert Comment

    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.
    LVL 1

    Accepted Solution

    I realized since I do not want to receive emails, all i need is a simple SMTP client.  I chose sendemail:
    LVL 1

    Author Comment

    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

    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.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Are your corporate email signatures appalling?

    Is it scary how unprofessional your email signatures look? Do users create their own terrible designs and give themselves stupid job titles? You can make this a lot easier for yourself by choosing an email signature management solution from Exclaimer today.

    Email signatures have numerous marketing benefits. Here are 8 top reasons to turn your email signature into a marketing channel.
    Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
    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 >>…

    779 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

    Need Help in Real-Time?

    Connect with top rated Experts

    10 Experts available now in Live!

    Get 1:1 Help Now