Results 1 to 7 of 7

Thread: Easiest way to get email reports up and running?

  1. #1
    Join Date
    Jul 2009
    Location
    Kalamazoo, MI, USA
    Beans
    71
    Distro
    Ubuntu 11.04 Natty Narwhal

    Easiest way to get email reports up and running?

    Hey everybody, I'm almost embarassed to ask this, but whenever I attempt to use mail or mutt to send mail from my server to any other email inbox, it never gets received. mutt logs the mail in the "sent" file in my home directory, but it never shows up in the mailbox on the other end. I've never experimented with command-line mail before, but if I can make it work, the possibilities are endless!

    I do use iptables, but even with all the rules flushed, no dice. What could be wrong? I'm curious to know if the fact the mail is being sent "from" an address called "nerr@mydomain.hsd1.mi.comcast.net" could be the problem, since Comcast's server is listed instead of my own domain. Can anybody point a new user in the right direction? It'd be much appreciated.

    Example commands I've tried:

    Code:
    df -Th | mail -s "testmail" me@mydomain.com
    apcaccess status | mutt -s "testing" me@mydomain.com

  2. #2
    Join Date
    Dec 2006
    Beans
    6,979

    Re: Easiest way to get email reports up and running?

    Hi nerr,

    Quote Originally Posted by nerr View Post
    Hey everybody, I'm almost embarassed to ask this, but whenever I attempt to use mail or mutt to send mail from my server to any other email inbox, it never gets received. mutt logs the mail in the "sent" file in my home directory, but it never shows up in the mailbox on the other end.
    You would normally use a sending agent like msmtp to actually send the mail that is composed by mutt. Do you have something like this in place? Once this is set you can reference it from your ~/.muttrc with:

    Code:
    set sendmail="/usr/bin/msmtp"  # Use msmtp rather than sendmail
    which is my own setting. My apologies if you already have something like this in place .

    Andrew
    You think that's air you're breathing now?

  3. #3
    Join Date
    Jul 2009
    Location
    Kalamazoo, MI, USA
    Beans
    71
    Distro
    Ubuntu 11.04 Natty Narwhal

    Re: Easiest way to get email reports up and running?

    Actually I do not have anything like that in place. Hahaha, see, I knew I was missing something. I thought mail/mutt were all-in-one solutions, but I suppose I forgot that Ubuntu Server is only meant to have what you want to have on it, and not another load of software you might not need.

    Thanks for the advice, I will have to do some work on it when I get home today.

  4. #4
    Join Date
    Apr 2009
    Beans
    130

    Re: Easiest way to get email reports up and running?

    In the windows world, it's normal for all mail programs to speak SMTP directly, and be configured to send through your email provider's SMTP server.

    In the linux world, your computer runs it's own mail server and every program uses that. The mail server is either configured to send out through the internet directly to the recipient, or (in the case of a home server, especially ones with a dynamic IP address as they are usually in spam blacklists) to send through your email or ISP's SMTP server.

    The great thing about this is you only have to set that up once - then every program on the system can send mail.

  5. #5
    Join Date
    Nov 2008
    Beans
    3

    Re: Easiest way to get email reports up and running?

    or (in the case of a home server, especially ones with a dynamic IP address as they are usually in spam blacklists) to send through your email or ISP's SMTP server.
    I am setting up an Ubuntu server that sits behind our router with a private IP address for intranet access. Reading your post it sounds like I need to configure sendmail to send mail via our email host's SMTP server (because right now the one test email I've sent is stuck, deferred, in the queue). How do I configure this?

    I have Ubuntu 9.04 installed with webmin.

  6. #6
    Join Date
    Dec 2006
    Beans
    6,979

    Re: Easiest way to get email reports up and running?

    Hi grantemsley,

    Quote Originally Posted by grantemsley View Post
    In the windows world, it's normal for all mail programs to speak SMTP directly, and be configured to send through your email provider's SMTP server.
    Mind you I believe that newer versions of mutt can be compiled with direct smtp support but I will admit that I have not experimented with this, for the most part because I am a firm believer in the old ways . And of course mutt supports IMAP as well these days....

    In the linux world, your computer runs it's own mail server and every program uses that. The mail server is either configured to send out through the internet directly to the recipient, or (in the case of a home server, especially ones with a dynamic IP address as they are usually in spam blacklists) to send through yourr email or ISP's SMTP server.
    I have always been too lazy to set this all up but perhaps one day . The lazy linux way to do this has been to set up a small Mail Sending Agent (MSA) such as ssmtp, msmtp or esmtp and probably a few others I cannot think of and leave an external server to do the grunt work. An example on these forums is this guide:

    [Howto] Use Mutt with Gmail
    http://ubuntuforums.org/showthread.php?t=1021746

    But my hat is off to anybody who sets the whole thing up properly. Perhaps when I have my next vacation I should too...

    Andrew
    You think that's air you're breathing now?

  7. #7
    Join Date
    Mar 2006
    Location
    Williams Lake
    Beans
    Hidden!
    Distro
    Ubuntu Development Release

    Re: Easiest way to get email reports up and running?

    Install logwatch, and it will automagically install an MTA for you, it will even pop up an ncurses app that will make setting it up pretty easy.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •