Alpine and Mutt

From FarmShare

(Difference between revisions)
Jump to: navigation, search
(Alpine Configuration)
 
(6 intermediate revisions not shown)
Line 1: Line 1:
-
Alpine and Mutt are installed in the Cardinal environment, but not on FarmShare 2; FarmShare 2 users can install either application using a local package manager like https://linuxbrew.sh Linuxbrew], but these applications are not supported there. The following configurations should work with Stanford e-mail accounts hosted by Microsoft Office 365.
+
Alpine and Mutt are installed in the Cardinal environment, but not on FarmShare 2; FarmShare 2 users can install either application using a local package manager like [https://linuxbrew.sh Linuxbrew], but these applications are not supported there. The following configurations should work with Stanford e-mail accounts hosted by Microsoft Office 365.
 +
 
 +
'''NOTE:''' Microsoft will [https://itcommunity.stanford.edu/news/microsoft-enforce-modern-authentication-beginning-oct-1 require] the use of "modern" authentication starting '''October 1, 2022'''. Alpine and Mutt support this authentication method, but not in the versions currently installed on cardinal systems. Users will need to install more recent versions using a local package manager until the cardinals can be upgraded.
== Enable IMAP ==
== Enable IMAP ==
IMAP and POP services are [https://uit.stanford.edu/announcement/2017-09-29-000000 disabled] for many users as a security precaution, including all users with accounts created after October 31, 2017, and existing users that have not used an IMAP (or POP) e-mail client in the recent past. If you would like to use Alpine or Mutt to check mail on FarmShare machines you can request that IMAP be enabled for your account by submitting a [https://stanford.service-now.com/it_services?id=sc_cat_item&sys_id=63bcdae813250780d3b6b3b12244b03a HelpSU request].
IMAP and POP services are [https://uit.stanford.edu/announcement/2017-09-29-000000 disabled] for many users as a security precaution, including all users with accounts created after October 31, 2017, and existing users that have not used an IMAP (or POP) e-mail client in the recent past. If you would like to use Alpine or Mutt to check mail on FarmShare machines you can request that IMAP be enabled for your account by submitting a [https://stanford.service-now.com/it_services?id=sc_cat_item&sys_id=63bcdae813250780d3b6b3b12244b03a HelpSU request].
-
 
-
== Enable authenticated SMTP ==
 
-
 
-
As a further security precaution, authorization is also required for sending e-mail. If you are unable to send e-mail, please contact the Service Desk (5-HELP) or submit a [https://helpsu.stanford.ed/ HelpSU request].
 
== Alpine Configuration ==
== Alpine Configuration ==
  # ~/.pinerc
  # ~/.pinerc
-
  smtp-server=smtp.stanford.edu:587/submit/tls/user=${USER}@stanford.edu
+
  smtp-server=smtp.office365.com/submit/tls/user=${USER}@stanford.edu/auth=xoauth2
-
  inbox-path={outlook.office365.com:993/ssl/user=${USER}@stanford.edu}Inbox
+
  inbox-path={outlook.office365.com/tls/user=${USER}@stanford.edu/auth=xoauth2}Inbox
-
  folder-collections="IMAP Folders" {outlook.office365.com:993/ssl/user=${USER}@stanford.edu}[], "Local Mail" ~/Mail/[]
+
  folder-collections="IMAP Folders" {outlook.office365.com/tls/user=${USER}@stanford.edu/auth=xoauth2}[], "Local Mail" ~/Mail/[]
-
  default-fcc={outlook.office365.com:993/ssl/user=${USER}@stanford.edu}Sent Items
+
  default-fcc={outlook.office365.com/tls/user=${USER}@stanford.edu/auth=xoauth2}Sent Items
-
  postponed-folder={outlook.office365.com:993/ssl/user=${USER}@stanford.edu}Drafts
+
  postponed-folder={outlook.office365.com:/tls/user=${USER}@stanford.edu/auth=xoauth2}Drafts
-
  default-saved-msg-folder={outlook.office365.com:993/ssl/user=${USER}@stanford.edu}Archive
+
  default-saved-msg-folder={outlook.office365.com/tls/user=${USER}@stanford.edu/auth=xoauth2}Archive
-
  trash-folder={outlook.office365.com:993/ssl/user=${USER}@stanford.edu}Deleted Items
+
  trash-folder={outlook.office365.com/tls/user=${USER}@stanford.ed/auth=xoauth2u}Deleted Items
  ldap-servers=ldap.stanford.edu "/base=cn=people,dc=stanford,dc=edu/impl/tlsm/nick=Stanford Directory"
  ldap-servers=ldap.stanford.edu "/base=cn=people,dc=stanford,dc=edu/impl/tlsm/nick=Stanford Directory"
Note: The <code>${USER}</code> expression automatically substitutes your local username. If you are configuring Alpine on a system where your local username differs from your SUNet ID you must replace the entire expression with your SUNet ID.
Note: The <code>${USER}</code> expression automatically substitutes your local username. If you are configuring Alpine on a system where your local username differs from your SUNet ID you must replace the entire expression with your SUNet ID.
 +
 +
When <code>alpine</code> starts you'll be asked to go to Microsoft's website and enter a code, after which you'll be redirected to Stanford's Web Login to authenticate. Optionally, you can <code>touch ~/.pine-passfile</code> to create a password file; the next time you log in you'll be prompted to choose a password after authenticating, which will be used to encrypt your credentials and store them in this file. In the future you can provide this password rather than using the website to log in.
== Mutt Configuration ==
== Mutt Configuration ==
-
# ~/.muttrc
+
A <code>mutt</code> configuration that should work with Office 365 requires an [https://gitlab.com/muttmua/mutt/-/blob/master/contrib/mutt_oauth2.py external script] to manage authentication, which is documented [https://gitlab.com/muttmua/mutt/-/blob/master/contrib/mutt_oauth2.py.README here].
-
set smtp_url="smtps://$USER@smtp.stanford.edu/"
+
-
set folder="imaps://$USER%40stanford.edu@outlook.office365.com/"
+
-
set spoolfile="+Inbox"
+
-
set postponed="+Drafts"
+
-
set record="+Sent Items"
+

Latest revision as of 18:14, 21 September 2022

Alpine and Mutt are installed in the Cardinal environment, but not on FarmShare 2; FarmShare 2 users can install either application using a local package manager like Linuxbrew, but these applications are not supported there. The following configurations should work with Stanford e-mail accounts hosted by Microsoft Office 365.

NOTE: Microsoft will require the use of "modern" authentication starting October 1, 2022. Alpine and Mutt support this authentication method, but not in the versions currently installed on cardinal systems. Users will need to install more recent versions using a local package manager until the cardinals can be upgraded.

Enable IMAP

IMAP and POP services are disabled for many users as a security precaution, including all users with accounts created after October 31, 2017, and existing users that have not used an IMAP (or POP) e-mail client in the recent past. If you would like to use Alpine or Mutt to check mail on FarmShare machines you can request that IMAP be enabled for your account by submitting a HelpSU request.

Alpine Configuration

# ~/.pinerc
smtp-server=smtp.office365.com/submit/tls/user=${USER}@stanford.edu/auth=xoauth2
inbox-path={outlook.office365.com/tls/user=${USER}@stanford.edu/auth=xoauth2}Inbox
folder-collections="IMAP Folders" {outlook.office365.com/tls/user=${USER}@stanford.edu/auth=xoauth2}[], "Local Mail" ~/Mail/[]
default-fcc={outlook.office365.com/tls/user=${USER}@stanford.edu/auth=xoauth2}Sent Items
postponed-folder={outlook.office365.com:/tls/user=${USER}@stanford.edu/auth=xoauth2}Drafts
default-saved-msg-folder={outlook.office365.com/tls/user=${USER}@stanford.edu/auth=xoauth2}Archive
trash-folder={outlook.office365.com/tls/user=${USER}@stanford.ed/auth=xoauth2u}Deleted Items
ldap-servers=ldap.stanford.edu "/base=cn=people,dc=stanford,dc=edu/impl/tlsm/nick=Stanford Directory"

Note: The ${USER} expression automatically substitutes your local username. If you are configuring Alpine on a system where your local username differs from your SUNet ID you must replace the entire expression with your SUNet ID.

When alpine starts you'll be asked to go to Microsoft's website and enter a code, after which you'll be redirected to Stanford's Web Login to authenticate. Optionally, you can touch ~/.pine-passfile to create a password file; the next time you log in you'll be prompted to choose a password after authenticating, which will be used to encrypt your credentials and store them in this file. In the future you can provide this password rather than using the website to log in.

Mutt Configuration

A mutt configuration that should work with Office 365 requires an external script to manage authentication, which is documented here.

Personal tools
Toolbox
LANGUAGES