Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want to be able to send a text file through an SMTP server of my ISP (port 25) to an email address on the internet, like my Office email address, or my GMail address. I have a basic Ubuntu 9.04 server setup on my DSL connection.

How can I use, say, Postfix, to send the .LOG file, on a bash script ? What would be the packages to install on that server, given it was never used to send email in the past ?

Thanks :-)

share|improve this question
up vote 6 down vote accepted

SendEmail seems like a nice tool for that. From what I get from the documentation it would be just a call like this:

sendEmail -f <myadress> -t <destination> -u <subject> -m <message> -a <pathtofile> -s <serveradress> -xu <username> -xp <password>
share|improve this answer

Another option is the ssmtp package. Since it's a sendmail emulator, it is highly compatible with all kinds of stuff that might want to send email.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .