Can I override .muttrc?
by mfoley from LinuxQuestions.org on (#5K9M7)
I know how to specify a "From:" address on the command line with mutt:
Code:EMAIL="thisuser@mydom.com" mutt ....But, I also have a .muttrc file in the sending user's home directory with:
Code:set from="noreply@mydom.com"
set use_from=yesNormally, the setting in .muttrc should be the usual sender, but there is one cron job script that needs to override that to thisuser@mydom.com. However, even if I attempt to do that using the command line syntax shown at top, it does not work and always sends as noreply@mydom.com.
Is there a way to override the .muttrc setting with a command line option or does the cron script need to temporarily rename .muttrc to something else, and rename it back after the cron job runs? I really hate to do that as it is both messy and potentially a problem if the cron job fails and never renames the file back to .muttrc.
Code:EMAIL="thisuser@mydom.com" mutt ....But, I also have a .muttrc file in the sending user's home directory with:
Code:set from="noreply@mydom.com"
set use_from=yesNormally, the setting in .muttrc should be the usual sender, but there is one cron job script that needs to override that to thisuser@mydom.com. However, even if I attempt to do that using the command line syntax shown at top, it does not work and always sends as noreply@mydom.com.
Is there a way to override the .muttrc setting with a command line option or does the cron script need to temporarily rename .muttrc to something else, and rename it back after the cron job runs? I really hate to do that as it is both messy and potentially a problem if the cron job fails and never renames the file back to .muttrc.