Using mutt to send mail from a Gmail account...

MannDude

Just a dude
vpsBoard Founder
Moderator
Nice and simple to follow guide.

When would sending emails via the console be practical?
 

drmike

100% Tier-1 Gogent
When would sending emails via the console be practical?
 

Ahh all the time - if this send messages directly out when configured and had some easy means to output a structured email... (as opposed to a one liner pipe).

I have a person I help with technical job aspects who lives in browser with 50 tabs open and bunches of other job-necessary crap (spreadsheets mainly).  It is a computer cruncher and especially the email part (Thunderbird + Gmail).  Being able to send like this from commandline many of the quick inner day things would save a bunch of time potentially.
 

Aldryic C'boas

The Pony
When would sending emails via the console be practical?
For those of us that don't use X very often :3

Another example that doesn't involve Mutt - say you're logged in to a server, and want to move... oh, I dunno, /var/log/lighttpd/access.log back to your machine.  You don't want to open another terminal, you don't want to exit out of where you are?  cat /var/log/lighttpd/access.log | mail -s "It's a logfile <_<" [email protected], and away it goes to your inbox.

I also use this all the time for note-to-self stuff when I'm in the middle of other work.. echo "Dammit.. Fran broke the API again, fix X and Y before you do Z" | mail [email protected]
 

stim

New Member
Nice and simple to follow guide.

When would sending emails via the console be practical?
I don't send mail from the command line, but I write scripts that do ;)

For example, you could have a cron job mail you daily server stats, or notify you of changes in the authlog file, or a ruby script that scrapes websites and mails you the results, or automatically sends mail to your Mum on her birthday...

Lot's of uses, your imagination is da limit :)

For me, mutt is preferable to setting-up a mailserver. I just pipe everything from all my VPS through a separate gmail account. It's a nice way to store info and keep organised. Just so simple.

BTW - I am pretty new to all this, but I've been documenting as I explore and keeping all the good bits here for my own perusal. You are welcome to dip-in. 
 
Last edited by a moderator:

eva2000

Active Member
...or other IMAP server...

Note: I removed the original text because the code tags were messing-up the formatting, and some configuration text wouldn't display properly. Hence it wouldn't work.

Here's link to a post with the same details:

http://bigchemdatabase.wordpress.com/sunday-linux/ 
Interesting idea, but that would mean if server is compromised, so would the password and details to your gmail a/c ? Guess you could setup a separate gmail a/c just for this though.
 

D. Strout

Resident IPv6 Proponent
echo "Dammit.. Fran broke the API again, fix X and Y before you do Z" | mail [email protected]
:D

Seriously, this does seem like a good way to send yourself notes or even log files without installing a whole mail stack. I like a lot of the other stuff that's in the linked article, especially the Dropbox thing. Need a file on the server for later? Dump it in a "to servers" folder.
 

stim

New Member
Interesting idea, but that would mean if server is compromised, so would the password and details to your gmail a/c ? Guess you could setup a separate gmail a/c just for this though.
Yeah, I just set-up a 'junk' gmail account to use for stuff like this, signing-up for boards etc. Anybody who compromised it would be sorely disappointed!  

:D

Seriously, this does seem like a good way to send yourself notes or even log files without installing a whole mail stack. I like a lot of the other stuff that's in the linked article, especially the Dropbox thing. Need a file on the server for later? Dump it in a "to servers" folder.
Dropbox is easy to set-up but I've moved-over to BTSync which is also very easy, not on cloud, and no data limits.
 
Last edited by a moderator:

D. Strout

Resident IPv6 Proponent
Yeah, I just set-up a 'junk' gmail account to use for stuff like this, signing-up for boards etc. Anybody who compromised it would be sorely disappointed!
...Then have it send the e-mail to a shell "forwarder" that goes through to your real e-mail.
 
Top