Ticket #1342: mutt-config3.diff

File mutt-config3.diff, 3.0 KB (added by rakavan, 9 years ago)

Updated patch to use a DNS lookup instead of chpobox

  • debian/changelog

     
    77  * Switch from control.in to control (Trac: #561) 
    88  * Bump Standards-Version to 3.9.3 
    99  * Bump compat level to 7 
     10   
     11  [ Ryan Kavanagh ] 
     12  * Set the appropriate record, folder, spoolfile, and postponed location 
     13    for Exchange users. This change introduces the debathena-mutt-folders 
     14    script, which supersedes the debathena-mutt-folder script 
     15    (Trac: #1342) 
    1016 
    11  -- Jonathan Reed <jdreed@mit.edu>  Wed, 03 Apr 2013 13:38:46 -0400 
     17 -- Ryan Kavanagh <rakavan@mit.edu>  Wed, 19 Jun 2013 09:21:34 -0400 
    1218 
    1319debathena-mutt-config (1.5) UNRELEASED; urgency=low 
    1420 
  • debian/debathena-mutt-config.install

     
    11debian/debathena.rc etc/Muttrc.d 
    2 debian/debathena-mutt-folder usr/lib/debathena-mutt-config 
     2debian/debathena-mutt-folders usr/lib/debathena-mutt-config 
  • debian/debathena-mutt-folder

     
    1 #!/bin/sh 
    2 user=${ATHENA_USER:-$USER} 
    3 echo "imaps://$user@$user.mail.mit.edu/" 
  • debian/debathena.rc

     
    44#   http://www.mutt.org/doc/devel/manual.html 
    55 
    66 
    7 # Set MIT IMAP as the location of the inbox and other folders. 
    8 set folder=`/usr/lib/debathena-mutt-config/debathena-mutt-folder` 
    9 set spoolfile=+INBOX 
    10 set record=+INBOX.sent-mail 
    11 set postponed=+INBOX.postponed-msgs 
     7# The debathena-mutt-folders script sets the folder, spoolfile, record, and 
     8# postponed options based on whether the user is using Exchange or MIT IMAP for 
     9# their mail 
     10source /usr/lib/debathena-mutt-config/debathena-mutt-folders| 
    1211 
    1312# Use MIT's outgoing SMTP servers. 
    1413set sendmail="/usr/lib/debathena-msmtp -t" 
  • debian/debathena-mutt-folders

     
    11#!/bin/sh 
     2 
    23user=${ATHENA_USER:-$USER} 
    3 echo "imaps://$user@$user.mail.mit.edu/" 
     4host ${user}.mail.mit.edu | grep 'EXCHANGE' > /dev/null 2>&1 
     5# grep exits 0 if the pattern matches. 
     6EXCHANGE=$? 
     7 
     8echo "set folder=\"imaps://${user}@${user}.mail.mit.edu/\"" 
     9echo "set spoolfile=\"+INBOX\"" 
     10 
     11if [ ${EXCHANGE} -eq 0 ]; then 
     12        # We're using an exchange server, use its setting 
     13        echo "set record=\"+Sent Items\""; 
     14        echo "set postponed=\"+Drafts\""; 
     15else 
     16        # We're using an IMAP server, keep the old setting 
     17        echo "set record=\"+INBOX.sent-mail\""; 
     18        echo "set postponed=\"+INBOX.postponed-msgs\""; 
     19fi