Security Consulting
  Unix Administration     Firewall     Intrusion Detection     Network Security     Hacking     MORE     HOME    

Emails out of Scripts

  • To generate an email out of a script, let it output the following lines:
             sendmail -t << END
             From: myaccount@myhost.com
             Subject: This is the subject.
             To: intended_recipient@somewhere.com
             Cc: other_person@somewhere.com
             Bcc: my_records@myhost.com
      
             Hello.  This is the message.  Goodbye.
             END
      
  • Setup Email on your Ubuntu Desktop

    If you don't want to have an entire MTA running, which means that you won't have queuing and such in case the mail server is not reachable, you do the following:
      apt-get install nullmailer
      dpkg-reconfigure nullmailer
      



    CopyLeft (l) 2003 by Raffael Marty