May 19, 2012, 5:07 am GMT  

Postings

mutt: changing sender mail address on the fly

Had a need today to adjust the sender email address for a notification script. Since the script uses mutt to send the emails, that change was fairly straight-forward. Instead of modifying .muttrc, simply export the EMAIL environmental variable. On the command line it looks something like this:

$ export EMAIL=’account@domain’
$ mutt <the rest of the mutt command line directives here…>

You can always combine the above into a single line if needed:

$ export EMAIL=’account@domain’; mutt <the rest of the mutt command line directives here…>

Btw, mutt is only a MUA (Mail User Agent) and not a MTA (Mail Transport Agent) and it relies on the underlying MTA to perform the mail delivery. In this case sendmail for us.

Filed under: cli-fu — Tags: , , — appgirl @ 7:19 am
Comments (1)

1 Comment »

  1. Great tip. Saved me tons of research. Thanks.

    Comment by Luis — October 7, 2010 @ 8:05 am

RSS feed for comments on this post. TrackBack URL

Leave a comment

My Tweets

Fans

AppGirl on Facebook

See What I'm Uncorking

Powered by WordPress