LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 06-20-2021, 12:59 AM   #1
mfoley
Senior Member
 
Registered: Oct 2008
Location: Columbus, Ohio USA
Distribution: Slackware
Posts: 2,555

Rep: Reputation: 177Reputation: 177
Can I override .muttrc?


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=yes
Normally, 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.

Last edited by mfoley; 06-20-2021 at 01:00 AM.
 
Old 06-20-2021, 06:26 AM   #2
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,702

Rep: Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896
Use a different muttrc file. Copy the old, change sender address and specify that new file using -F option.

Last edited by michaelk; 06-20-2021 at 02:00 PM. Reason: corrected option.
 
1 members found this post helpful.
Old 06-20-2021, 12:40 PM   #3
mfoley
Senior Member
 
Registered: Oct 2008
Location: Columbus, Ohio USA
Distribution: Slackware
Posts: 2,555

Original Poster
Rep: Reputation: 177Reputation: 177
That worked, but the option is -F not -f. Thanks!
 
Old 06-20-2021, 12:47 PM   #4
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,702

Rep: Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896
Quote:
Originally Posted by mfoley View Post
That worked, but the option is -F not -f. Thanks!
Oops sorry about that...
 
  


Reply

Tags
mutt, muttrc



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Show Your muttrc poetgrant Slackware 15 08-08-2019 09:58 AM
Mutt experts - Mutt won't use the Maildir I specify in .muttrc moistTowelette Debian 2 08-24-2009 08:04 AM
What does /etc/Muttrc do? whittycat Linux - Software 2 11-03-2005 06:28 AM
MUTT reconfigure (no ~/.muttrc) blizunt7 Linux - Software 1 08-21-2005 01:33 AM
.muttrc example + IMAP Anibal Linux - Software 0 02-04-2004 03:50 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 11:56 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration