Muttrc file for Gmail and Yandex

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











up vote
1
down vote

favorite












I have problems configuring mutt e-mail client on Lubuntu 18.04. 64 bit.



First I installed Mutt using command:



sudo apt install mutt


Everything was ok, but when I tried to add my e-mail account (Google or Yandex mail), I can't find muttrc configuration file?



I tried to locate it:



su-
updatedb
locate muttrc


This is the output:



/usr/lib/mutt/source-muttrc.d
/usr/share/doc/mutt/examples/ray.muttrc
/usr/share/doc/mutt/examples/sample.muttrc-compress
/usr/share/doc/mutt/examples/sample.muttrc-sidebar
/usr/share/doc/mutt/examples/sample.muttrc-tlr.gz
/usr/share/doc/mutt/examples/sample.muttrc.gz
/usr/share/man/man5/muttrc.5.gz


I went to all locations, I can't find muttrc file?

Can I create muttrc file in text editor and type in required data?
If yes, what I need to include in muttrc file (which information)?







share|improve this question





















  • Yes, it's a text file. Yes, you need to create it. No, we do not know what you need in the file.
    – thrig
    Jun 22 at 13:50














up vote
1
down vote

favorite












I have problems configuring mutt e-mail client on Lubuntu 18.04. 64 bit.



First I installed Mutt using command:



sudo apt install mutt


Everything was ok, but when I tried to add my e-mail account (Google or Yandex mail), I can't find muttrc configuration file?



I tried to locate it:



su-
updatedb
locate muttrc


This is the output:



/usr/lib/mutt/source-muttrc.d
/usr/share/doc/mutt/examples/ray.muttrc
/usr/share/doc/mutt/examples/sample.muttrc-compress
/usr/share/doc/mutt/examples/sample.muttrc-sidebar
/usr/share/doc/mutt/examples/sample.muttrc-tlr.gz
/usr/share/doc/mutt/examples/sample.muttrc.gz
/usr/share/man/man5/muttrc.5.gz


I went to all locations, I can't find muttrc file?

Can I create muttrc file in text editor and type in required data?
If yes, what I need to include in muttrc file (which information)?







share|improve this question





















  • Yes, it's a text file. Yes, you need to create it. No, we do not know what you need in the file.
    – thrig
    Jun 22 at 13:50












up vote
1
down vote

favorite









up vote
1
down vote

favorite











I have problems configuring mutt e-mail client on Lubuntu 18.04. 64 bit.



First I installed Mutt using command:



sudo apt install mutt


Everything was ok, but when I tried to add my e-mail account (Google or Yandex mail), I can't find muttrc configuration file?



I tried to locate it:



su-
updatedb
locate muttrc


This is the output:



/usr/lib/mutt/source-muttrc.d
/usr/share/doc/mutt/examples/ray.muttrc
/usr/share/doc/mutt/examples/sample.muttrc-compress
/usr/share/doc/mutt/examples/sample.muttrc-sidebar
/usr/share/doc/mutt/examples/sample.muttrc-tlr.gz
/usr/share/doc/mutt/examples/sample.muttrc.gz
/usr/share/man/man5/muttrc.5.gz


I went to all locations, I can't find muttrc file?

Can I create muttrc file in text editor and type in required data?
If yes, what I need to include in muttrc file (which information)?







share|improve this question













I have problems configuring mutt e-mail client on Lubuntu 18.04. 64 bit.



First I installed Mutt using command:



sudo apt install mutt


Everything was ok, but when I tried to add my e-mail account (Google or Yandex mail), I can't find muttrc configuration file?



I tried to locate it:



su-
updatedb
locate muttrc


This is the output:



/usr/lib/mutt/source-muttrc.d
/usr/share/doc/mutt/examples/ray.muttrc
/usr/share/doc/mutt/examples/sample.muttrc-compress
/usr/share/doc/mutt/examples/sample.muttrc-sidebar
/usr/share/doc/mutt/examples/sample.muttrc-tlr.gz
/usr/share/doc/mutt/examples/sample.muttrc.gz
/usr/share/man/man5/muttrc.5.gz


I went to all locations, I can't find muttrc file?

Can I create muttrc file in text editor and type in required data?
If yes, what I need to include in muttrc file (which information)?









share|improve this question












share|improve this question




share|improve this question








edited Jun 22 at 19:55









Gilles

502k1179921516




502k1179921516









asked Jun 22 at 10:02









Blue11440

814




814











  • Yes, it's a text file. Yes, you need to create it. No, we do not know what you need in the file.
    – thrig
    Jun 22 at 13:50
















  • Yes, it's a text file. Yes, you need to create it. No, we do not know what you need in the file.
    – thrig
    Jun 22 at 13:50















Yes, it's a text file. Yes, you need to create it. No, we do not know what you need in the file.
– thrig
Jun 22 at 13:50




Yes, it's a text file. Yes, you need to create it. No, we do not know what you need in the file.
– thrig
Jun 22 at 13:50










1 Answer
1






active

oldest

votes

















up vote
0
down vote



accepted










.muttrc



The Mutt configuration file is ~/.muttrc, i.e. the file called .muttrc in your home directory. It's up to you to create it and configure it. Mutt won't create it for you. With no configuration file, you just get the mail on your local machine (if you have local mail set up, which is not the case on Ubuntu by default).



Most email providers support IMAPS to read your mailbox and manage your emails, and SMTPS to send emails. Thus the bare minimum you need to use a remote account is to set smtp_url to the correct smtps:// URL and to navigate to a folder that is an imaps:// URL. You will probably want a few additional settings, including:




  • Caching.

  • Set the From: line with from and declare that same address as belonging to you with alternates.

Gmail



Note that for Gmail you'll need to either set up a per-application password (preferred) or enable plain IMAP access. What Gmail calls “less secure” is applications that use your “main” Gmail password to authenticate, as opposed to either the main password plus a second authentication factor or a per-application, non-memorable password.



Looking around I find a surprising number of incomplete tutorials. There's a lot of information in the Arch wiki, as usual, but it's a bit hard to digest. I'll try to be complete here but I don't actually use Mutt for Gmail so this is untested, comments welcome. Assuming that your Gmail address is johndoe@gmail.com and your application password is qwertyuiop, your .muttrc should contain something like this.



set my_address = johndoe@gmail.com
set smtp_pass = qwertyuiop

set imap_user = $my_address
set imap_pass = $smtp_pass
set smtp_url = smtps://$imap_user@smtp.gmail.com:465/
set folder = imaps://imap.gmail.com:993
set postpones = Drafts
unset record # Gmail does this automatically

set spoolfile = +INBOX
mailboxes +INBOX

set from = $my_address
alternates $my_address

set message_cachedir = ~/.cache/mutt
set header_cache = $message_cachedir


Accessing multiple accounts



Mutt is a bit awkward when it comes to having multiple accounts. The way it works is, you put all the commands to configure each account in hooks. When you switch from one account to another, Mutt runs the hook commands. The SMTP and IMAP configuration commands go in the account-hook while the rest (record, from, …) go into folder-hook. The alternates and mailboxes settings are a list that should contain one entry per account.



Alternatively, use a separate configuration file for each account. It's less convenient but simpler.



Alternatively, use OfflineIMAP to retrieve email from all your accounts, and use Mutt purely locally (except for sending).






share|improve this answer





















    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: false,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: null,
    bindNavPrevention: true,
    postfix: "",
    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%2f451259%2fmuttrc-file-for-gmail-and-yandex%23new-answer', 'question_page');

    );

    Post as a guest






























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes








    up vote
    0
    down vote



    accepted










    .muttrc



    The Mutt configuration file is ~/.muttrc, i.e. the file called .muttrc in your home directory. It's up to you to create it and configure it. Mutt won't create it for you. With no configuration file, you just get the mail on your local machine (if you have local mail set up, which is not the case on Ubuntu by default).



    Most email providers support IMAPS to read your mailbox and manage your emails, and SMTPS to send emails. Thus the bare minimum you need to use a remote account is to set smtp_url to the correct smtps:// URL and to navigate to a folder that is an imaps:// URL. You will probably want a few additional settings, including:




    • Caching.

    • Set the From: line with from and declare that same address as belonging to you with alternates.

    Gmail



    Note that for Gmail you'll need to either set up a per-application password (preferred) or enable plain IMAP access. What Gmail calls “less secure” is applications that use your “main” Gmail password to authenticate, as opposed to either the main password plus a second authentication factor or a per-application, non-memorable password.



    Looking around I find a surprising number of incomplete tutorials. There's a lot of information in the Arch wiki, as usual, but it's a bit hard to digest. I'll try to be complete here but I don't actually use Mutt for Gmail so this is untested, comments welcome. Assuming that your Gmail address is johndoe@gmail.com and your application password is qwertyuiop, your .muttrc should contain something like this.



    set my_address = johndoe@gmail.com
    set smtp_pass = qwertyuiop

    set imap_user = $my_address
    set imap_pass = $smtp_pass
    set smtp_url = smtps://$imap_user@smtp.gmail.com:465/
    set folder = imaps://imap.gmail.com:993
    set postpones = Drafts
    unset record # Gmail does this automatically

    set spoolfile = +INBOX
    mailboxes +INBOX

    set from = $my_address
    alternates $my_address

    set message_cachedir = ~/.cache/mutt
    set header_cache = $message_cachedir


    Accessing multiple accounts



    Mutt is a bit awkward when it comes to having multiple accounts. The way it works is, you put all the commands to configure each account in hooks. When you switch from one account to another, Mutt runs the hook commands. The SMTP and IMAP configuration commands go in the account-hook while the rest (record, from, …) go into folder-hook. The alternates and mailboxes settings are a list that should contain one entry per account.



    Alternatively, use a separate configuration file for each account. It's less convenient but simpler.



    Alternatively, use OfflineIMAP to retrieve email from all your accounts, and use Mutt purely locally (except for sending).






    share|improve this answer

























      up vote
      0
      down vote



      accepted










      .muttrc



      The Mutt configuration file is ~/.muttrc, i.e. the file called .muttrc in your home directory. It's up to you to create it and configure it. Mutt won't create it for you. With no configuration file, you just get the mail on your local machine (if you have local mail set up, which is not the case on Ubuntu by default).



      Most email providers support IMAPS to read your mailbox and manage your emails, and SMTPS to send emails. Thus the bare minimum you need to use a remote account is to set smtp_url to the correct smtps:// URL and to navigate to a folder that is an imaps:// URL. You will probably want a few additional settings, including:




      • Caching.

      • Set the From: line with from and declare that same address as belonging to you with alternates.

      Gmail



      Note that for Gmail you'll need to either set up a per-application password (preferred) or enable plain IMAP access. What Gmail calls “less secure” is applications that use your “main” Gmail password to authenticate, as opposed to either the main password plus a second authentication factor or a per-application, non-memorable password.



      Looking around I find a surprising number of incomplete tutorials. There's a lot of information in the Arch wiki, as usual, but it's a bit hard to digest. I'll try to be complete here but I don't actually use Mutt for Gmail so this is untested, comments welcome. Assuming that your Gmail address is johndoe@gmail.com and your application password is qwertyuiop, your .muttrc should contain something like this.



      set my_address = johndoe@gmail.com
      set smtp_pass = qwertyuiop

      set imap_user = $my_address
      set imap_pass = $smtp_pass
      set smtp_url = smtps://$imap_user@smtp.gmail.com:465/
      set folder = imaps://imap.gmail.com:993
      set postpones = Drafts
      unset record # Gmail does this automatically

      set spoolfile = +INBOX
      mailboxes +INBOX

      set from = $my_address
      alternates $my_address

      set message_cachedir = ~/.cache/mutt
      set header_cache = $message_cachedir


      Accessing multiple accounts



      Mutt is a bit awkward when it comes to having multiple accounts. The way it works is, you put all the commands to configure each account in hooks. When you switch from one account to another, Mutt runs the hook commands. The SMTP and IMAP configuration commands go in the account-hook while the rest (record, from, …) go into folder-hook. The alternates and mailboxes settings are a list that should contain one entry per account.



      Alternatively, use a separate configuration file for each account. It's less convenient but simpler.



      Alternatively, use OfflineIMAP to retrieve email from all your accounts, and use Mutt purely locally (except for sending).






      share|improve this answer























        up vote
        0
        down vote



        accepted







        up vote
        0
        down vote



        accepted






        .muttrc



        The Mutt configuration file is ~/.muttrc, i.e. the file called .muttrc in your home directory. It's up to you to create it and configure it. Mutt won't create it for you. With no configuration file, you just get the mail on your local machine (if you have local mail set up, which is not the case on Ubuntu by default).



        Most email providers support IMAPS to read your mailbox and manage your emails, and SMTPS to send emails. Thus the bare minimum you need to use a remote account is to set smtp_url to the correct smtps:// URL and to navigate to a folder that is an imaps:// URL. You will probably want a few additional settings, including:




        • Caching.

        • Set the From: line with from and declare that same address as belonging to you with alternates.

        Gmail



        Note that for Gmail you'll need to either set up a per-application password (preferred) or enable plain IMAP access. What Gmail calls “less secure” is applications that use your “main” Gmail password to authenticate, as opposed to either the main password plus a second authentication factor or a per-application, non-memorable password.



        Looking around I find a surprising number of incomplete tutorials. There's a lot of information in the Arch wiki, as usual, but it's a bit hard to digest. I'll try to be complete here but I don't actually use Mutt for Gmail so this is untested, comments welcome. Assuming that your Gmail address is johndoe@gmail.com and your application password is qwertyuiop, your .muttrc should contain something like this.



        set my_address = johndoe@gmail.com
        set smtp_pass = qwertyuiop

        set imap_user = $my_address
        set imap_pass = $smtp_pass
        set smtp_url = smtps://$imap_user@smtp.gmail.com:465/
        set folder = imaps://imap.gmail.com:993
        set postpones = Drafts
        unset record # Gmail does this automatically

        set spoolfile = +INBOX
        mailboxes +INBOX

        set from = $my_address
        alternates $my_address

        set message_cachedir = ~/.cache/mutt
        set header_cache = $message_cachedir


        Accessing multiple accounts



        Mutt is a bit awkward when it comes to having multiple accounts. The way it works is, you put all the commands to configure each account in hooks. When you switch from one account to another, Mutt runs the hook commands. The SMTP and IMAP configuration commands go in the account-hook while the rest (record, from, …) go into folder-hook. The alternates and mailboxes settings are a list that should contain one entry per account.



        Alternatively, use a separate configuration file for each account. It's less convenient but simpler.



        Alternatively, use OfflineIMAP to retrieve email from all your accounts, and use Mutt purely locally (except for sending).






        share|improve this answer













        .muttrc



        The Mutt configuration file is ~/.muttrc, i.e. the file called .muttrc in your home directory. It's up to you to create it and configure it. Mutt won't create it for you. With no configuration file, you just get the mail on your local machine (if you have local mail set up, which is not the case on Ubuntu by default).



        Most email providers support IMAPS to read your mailbox and manage your emails, and SMTPS to send emails. Thus the bare minimum you need to use a remote account is to set smtp_url to the correct smtps:// URL and to navigate to a folder that is an imaps:// URL. You will probably want a few additional settings, including:




        • Caching.

        • Set the From: line with from and declare that same address as belonging to you with alternates.

        Gmail



        Note that for Gmail you'll need to either set up a per-application password (preferred) or enable plain IMAP access. What Gmail calls “less secure” is applications that use your “main” Gmail password to authenticate, as opposed to either the main password plus a second authentication factor or a per-application, non-memorable password.



        Looking around I find a surprising number of incomplete tutorials. There's a lot of information in the Arch wiki, as usual, but it's a bit hard to digest. I'll try to be complete here but I don't actually use Mutt for Gmail so this is untested, comments welcome. Assuming that your Gmail address is johndoe@gmail.com and your application password is qwertyuiop, your .muttrc should contain something like this.



        set my_address = johndoe@gmail.com
        set smtp_pass = qwertyuiop

        set imap_user = $my_address
        set imap_pass = $smtp_pass
        set smtp_url = smtps://$imap_user@smtp.gmail.com:465/
        set folder = imaps://imap.gmail.com:993
        set postpones = Drafts
        unset record # Gmail does this automatically

        set spoolfile = +INBOX
        mailboxes +INBOX

        set from = $my_address
        alternates $my_address

        set message_cachedir = ~/.cache/mutt
        set header_cache = $message_cachedir


        Accessing multiple accounts



        Mutt is a bit awkward when it comes to having multiple accounts. The way it works is, you put all the commands to configure each account in hooks. When you switch from one account to another, Mutt runs the hook commands. The SMTP and IMAP configuration commands go in the account-hook while the rest (record, from, …) go into folder-hook. The alternates and mailboxes settings are a list that should contain one entry per account.



        Alternatively, use a separate configuration file for each account. It's less convenient but simpler.



        Alternatively, use OfflineIMAP to retrieve email from all your accounts, and use Mutt purely locally (except for sending).







        share|improve this answer













        share|improve this answer



        share|improve this answer











        answered Jun 22 at 19:55









        Gilles

        502k1179921516




        502k1179921516






















             

            draft saved


            draft discarded


























             


            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f451259%2fmuttrc-file-for-gmail-and-yandex%23new-answer', 'question_page');

            );

            Post as a guest













































































            Popular posts from this blog

            How to check contact read email or not when send email to Individual?

            Bahrain

            Postfix configuration issue with fips on centos 7; mailgun relay