How can I change the default “save” folder in Mutt?

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
4
down vote

favorite












By default, Mutt wants to archive messages to folders by sender name. So when I hit s it prompts me with Save to mailbox ('?' for list): =sendername. I'd like to have it default to =INBOX.Archives.2015 instead.



I don't think I need a macro, which is how this one was solved: mutt: save message to specific folder



I just want to set a default so that the prompt is always =INBOX.Archives.2015 (I can reset it once a year, the year doesn't need to update.)










share|improve this question



























    up vote
    4
    down vote

    favorite












    By default, Mutt wants to archive messages to folders by sender name. So when I hit s it prompts me with Save to mailbox ('?' for list): =sendername. I'd like to have it default to =INBOX.Archives.2015 instead.



    I don't think I need a macro, which is how this one was solved: mutt: save message to specific folder



    I just want to set a default so that the prompt is always =INBOX.Archives.2015 (I can reset it once a year, the year doesn't need to update.)










    share|improve this question

























      up vote
      4
      down vote

      favorite









      up vote
      4
      down vote

      favorite











      By default, Mutt wants to archive messages to folders by sender name. So when I hit s it prompts me with Save to mailbox ('?' for list): =sendername. I'd like to have it default to =INBOX.Archives.2015 instead.



      I don't think I need a macro, which is how this one was solved: mutt: save message to specific folder



      I just want to set a default so that the prompt is always =INBOX.Archives.2015 (I can reset it once a year, the year doesn't need to update.)










      share|improve this question















      By default, Mutt wants to archive messages to folders by sender name. So when I hit s it prompts me with Save to mailbox ('?' for list): =sendername. I'd like to have it default to =INBOX.Archives.2015 instead.



      I don't think I need a macro, which is how this one was solved: mutt: save message to specific folder



      I just want to set a default so that the prompt is always =INBOX.Archives.2015 (I can reset it once a year, the year doesn't need to update.)







      mutt






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Apr 13 '17 at 12:37









      Community♦

      1




      1










      asked Nov 9 '15 at 23:47









      Amanda

      396114




      396114




















          2 Answers
          2






          active

          oldest

          votes

















          up vote
          3
          down vote



          accepted










          You need to add a line such as the following to your .muttrc:



          save-hook . '=INBOX.Archives.2015'





          share|improve this answer




















          • I read the save-hook documentation three times and got the impression it would automatically move messages into the folder, without waiting until I save.
            – Amanda
            Nov 10 '15 at 22:54










          • mutt does nothing like that by itself, for that functionality you need procmail or something like that (I personally have exim as MTA and use its filtering features in my .forward file instead of procmail).
            – wurtel
            Nov 11 '15 at 7:51










          • So save-hook will just tweak the folder that Mutt suggests when I hit <kbd>s</kbd>?
            – Amanda
            Nov 13 '15 at 7:04










          • Yes. You can still modify it, of course.
            – wurtel
            Nov 13 '15 at 7:47

















          up vote
          0
          down vote













          As explained in the HTML mutt manual, it is possible to apply the same expandos as those used in the $index_format.



          Hence for your use case it is possible to define



          save-hook . =INBOX.Archives.%[%Y]


          where %[%Y] would expand to the year (local time) the message was sent.



          If you only care about the current local time, not the time of the message, use the %<%Y> pattern instead (with the <>).



          %Y could be any format supported by the strftime(3) function, which for instance would allow to setup a monthly based archive with



          save-hook . =INBOX.Archives.%[%Y.%m]





          share|improve this answer








          New contributor




          ovmjm is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
          Check out our Code of Conduct.

















            Your Answer








            StackExchange.ready(function()
            var channelOptions =
            tags: "".split(" "),
            id: "106"
            ;
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function()
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled)
            StackExchange.using("snippets", function()
            createEditor();
            );

            else
            createEditor();

            );

            function createEditor()
            StackExchange.prepareEditor(
            heartbeatType: 'answer',
            convertImagesToLinks: false,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: null,
            bindNavPrevention: true,
            postfix: "",
            imageUploader:
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            ,
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            );



            );













             

            draft saved


            draft discarded


















            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f241994%2fhow-can-i-change-the-default-save-folder-in-mutt%23new-answer', 'question_page');

            );

            Post as a guest






























            2 Answers
            2






            active

            oldest

            votes








            2 Answers
            2






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes








            up vote
            3
            down vote



            accepted










            You need to add a line such as the following to your .muttrc:



            save-hook . '=INBOX.Archives.2015'





            share|improve this answer




















            • I read the save-hook documentation three times and got the impression it would automatically move messages into the folder, without waiting until I save.
              – Amanda
              Nov 10 '15 at 22:54










            • mutt does nothing like that by itself, for that functionality you need procmail or something like that (I personally have exim as MTA and use its filtering features in my .forward file instead of procmail).
              – wurtel
              Nov 11 '15 at 7:51










            • So save-hook will just tweak the folder that Mutt suggests when I hit <kbd>s</kbd>?
              – Amanda
              Nov 13 '15 at 7:04










            • Yes. You can still modify it, of course.
              – wurtel
              Nov 13 '15 at 7:47














            up vote
            3
            down vote



            accepted










            You need to add a line such as the following to your .muttrc:



            save-hook . '=INBOX.Archives.2015'





            share|improve this answer




















            • I read the save-hook documentation three times and got the impression it would automatically move messages into the folder, without waiting until I save.
              – Amanda
              Nov 10 '15 at 22:54










            • mutt does nothing like that by itself, for that functionality you need procmail or something like that (I personally have exim as MTA and use its filtering features in my .forward file instead of procmail).
              – wurtel
              Nov 11 '15 at 7:51










            • So save-hook will just tweak the folder that Mutt suggests when I hit <kbd>s</kbd>?
              – Amanda
              Nov 13 '15 at 7:04










            • Yes. You can still modify it, of course.
              – wurtel
              Nov 13 '15 at 7:47












            up vote
            3
            down vote



            accepted







            up vote
            3
            down vote



            accepted






            You need to add a line such as the following to your .muttrc:



            save-hook . '=INBOX.Archives.2015'





            share|improve this answer












            You need to add a line such as the following to your .muttrc:



            save-hook . '=INBOX.Archives.2015'






            share|improve this answer












            share|improve this answer



            share|improve this answer










            answered Nov 10 '15 at 9:02









            wurtel

            9,53511325




            9,53511325











            • I read the save-hook documentation three times and got the impression it would automatically move messages into the folder, without waiting until I save.
              – Amanda
              Nov 10 '15 at 22:54










            • mutt does nothing like that by itself, for that functionality you need procmail or something like that (I personally have exim as MTA and use its filtering features in my .forward file instead of procmail).
              – wurtel
              Nov 11 '15 at 7:51










            • So save-hook will just tweak the folder that Mutt suggests when I hit <kbd>s</kbd>?
              – Amanda
              Nov 13 '15 at 7:04










            • Yes. You can still modify it, of course.
              – wurtel
              Nov 13 '15 at 7:47
















            • I read the save-hook documentation three times and got the impression it would automatically move messages into the folder, without waiting until I save.
              – Amanda
              Nov 10 '15 at 22:54










            • mutt does nothing like that by itself, for that functionality you need procmail or something like that (I personally have exim as MTA and use its filtering features in my .forward file instead of procmail).
              – wurtel
              Nov 11 '15 at 7:51










            • So save-hook will just tweak the folder that Mutt suggests when I hit <kbd>s</kbd>?
              – Amanda
              Nov 13 '15 at 7:04










            • Yes. You can still modify it, of course.
              – wurtel
              Nov 13 '15 at 7:47















            I read the save-hook documentation three times and got the impression it would automatically move messages into the folder, without waiting until I save.
            – Amanda
            Nov 10 '15 at 22:54




            I read the save-hook documentation three times and got the impression it would automatically move messages into the folder, without waiting until I save.
            – Amanda
            Nov 10 '15 at 22:54












            mutt does nothing like that by itself, for that functionality you need procmail or something like that (I personally have exim as MTA and use its filtering features in my .forward file instead of procmail).
            – wurtel
            Nov 11 '15 at 7:51




            mutt does nothing like that by itself, for that functionality you need procmail or something like that (I personally have exim as MTA and use its filtering features in my .forward file instead of procmail).
            – wurtel
            Nov 11 '15 at 7:51












            So save-hook will just tweak the folder that Mutt suggests when I hit <kbd>s</kbd>?
            – Amanda
            Nov 13 '15 at 7:04




            So save-hook will just tweak the folder that Mutt suggests when I hit <kbd>s</kbd>?
            – Amanda
            Nov 13 '15 at 7:04












            Yes. You can still modify it, of course.
            – wurtel
            Nov 13 '15 at 7:47




            Yes. You can still modify it, of course.
            – wurtel
            Nov 13 '15 at 7:47












            up vote
            0
            down vote













            As explained in the HTML mutt manual, it is possible to apply the same expandos as those used in the $index_format.



            Hence for your use case it is possible to define



            save-hook . =INBOX.Archives.%[%Y]


            where %[%Y] would expand to the year (local time) the message was sent.



            If you only care about the current local time, not the time of the message, use the %<%Y> pattern instead (with the <>).



            %Y could be any format supported by the strftime(3) function, which for instance would allow to setup a monthly based archive with



            save-hook . =INBOX.Archives.%[%Y.%m]





            share|improve this answer








            New contributor




            ovmjm is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
            Check out our Code of Conduct.





















              up vote
              0
              down vote













              As explained in the HTML mutt manual, it is possible to apply the same expandos as those used in the $index_format.



              Hence for your use case it is possible to define



              save-hook . =INBOX.Archives.%[%Y]


              where %[%Y] would expand to the year (local time) the message was sent.



              If you only care about the current local time, not the time of the message, use the %<%Y> pattern instead (with the <>).



              %Y could be any format supported by the strftime(3) function, which for instance would allow to setup a monthly based archive with



              save-hook . =INBOX.Archives.%[%Y.%m]





              share|improve this answer








              New contributor




              ovmjm is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
              Check out our Code of Conduct.



















                up vote
                0
                down vote










                up vote
                0
                down vote









                As explained in the HTML mutt manual, it is possible to apply the same expandos as those used in the $index_format.



                Hence for your use case it is possible to define



                save-hook . =INBOX.Archives.%[%Y]


                where %[%Y] would expand to the year (local time) the message was sent.



                If you only care about the current local time, not the time of the message, use the %<%Y> pattern instead (with the <>).



                %Y could be any format supported by the strftime(3) function, which for instance would allow to setup a monthly based archive with



                save-hook . =INBOX.Archives.%[%Y.%m]





                share|improve this answer








                New contributor




                ovmjm is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                Check out our Code of Conduct.









                As explained in the HTML mutt manual, it is possible to apply the same expandos as those used in the $index_format.



                Hence for your use case it is possible to define



                save-hook . =INBOX.Archives.%[%Y]


                where %[%Y] would expand to the year (local time) the message was sent.



                If you only care about the current local time, not the time of the message, use the %<%Y> pattern instead (with the <>).



                %Y could be any format supported by the strftime(3) function, which for instance would allow to setup a monthly based archive with



                save-hook . =INBOX.Archives.%[%Y.%m]






                share|improve this answer








                New contributor




                ovmjm is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                Check out our Code of Conduct.









                share|improve this answer



                share|improve this answer






                New contributor




                ovmjm is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                Check out our Code of Conduct.









                answered 21 mins ago









                ovmjm

                1061




                1061




                New contributor




                ovmjm is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                Check out our Code of Conduct.





                New contributor





                ovmjm is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                Check out our Code of Conduct.






                ovmjm is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                Check out our Code of Conduct.



























                     

                    draft saved


                    draft discarded















































                     


                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function ()
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f241994%2fhow-can-i-change-the-default-save-folder-in-mutt%23new-answer', 'question_page');

                    );

                    Post as a guest













































































                    Popular posts from this blog

                    Peggy Mitchell

                    Palaiologos

                    The Forum (Inglewood, California)