|  | 
 |  | 
 | 
												
													
														| 492 |    echo "*/3 * * * * root /usr/bin/timeout 120 /usr/bin/filterspam $MY_USERNAME" >> /etc/crontab
 | 492 |    echo "*/3 * * * * root /usr/bin/timeout 120 /usr/bin/filterspam $MY_USERNAME" >> /etc/crontab
 | 
												
													
														| 493 |    echo "*/3 * * * * root /usr/bin/timeout 120 /usr/bin/filterham $MY_USERNAME" >> /etc/crontab
 | 493 |    echo "*/3 * * * * root /usr/bin/timeout 120 /usr/bin/filterham $MY_USERNAME" >> /etc/crontab
 | 
												
													
														| 494 |    chmod 655 /usr/bin/filterspam /usr/bin/filterham
 | 494 |    chmod 655 /usr/bin/filterspam /usr/bin/filterham
 | 
												
													
														|  | 
 | 495 | +  sed -i 's/# use_bayes 1/use_bayes 1/g' /etc/mail/spamassassin/local.cf
 | 
												
													
														|  | 
 | 496 | +  sed -i 's/# bayes_auto_learn 1/bayes_auto_learn 1/g' /etc/mail/spamassassin/local.cf
 | 
												
													
														|  | 
 | 497 | +
 | 
												
													
														| 495 |    service spamassassin restart
 | 498 |    service spamassassin restart
 | 
												
													
														| 496 |    service exim4 restart
 | 499 |    service exim4 restart
 | 
												
													
														| 497 |    service cron restart
 | 500 |    service cron restart
 | 
												
											
												
													
														|  | 
 |  | 
 | 
												
													
														| 522 |    apt-get -y install gnupg
 | 525 |    apt-get -y install gnupg
 | 
												
													
														| 523 |  }
 | 526 |  }
 | 
												
													
														| 524 |  
 | 527 |  
 | 
												
													
														|  | 
 | 528 | +function email_client {
 | 
												
													
														|  | 
 | 529 | +  apt-get -y install mutt-patched lynx abook
 | 
												
													
														|  | 
 | 530 | +  if [ ! -d /home/$MY_USERNAME/.mutt ]; then
 | 
												
													
														|  | 
 | 531 | +    mkdir /home/$MY_USERNAME/.mutt
 | 
												
													
														|  | 
 | 532 | +  fi
 | 
												
													
														|  | 
 | 533 | +  echo "text/html; lynx -dump -width=78 -nolist %s | sed ‘s/^ //’; copiousoutput; needsterminal; nametemplate=%s.html" > /home/$MY_USERNAME/.mutt/mailcap
 | 
												
													
														|  | 
 | 534 | +  chown -R $MY_USERNAME:$MY_USERNAME /home/$MY_USERNAME/.mutt
 | 
												
													
														|  | 
 | 535 | +
 | 
												
													
														|  | 
 | 536 | +
 | 
												
													
														|  | 
 | 537 | +  echo "set mbox_type=Maildir" >> /etc/Muttrc
 | 
												
													
														|  | 
 | 538 | +  echo "set folder=\"~/Maildir\"" >> /etc/Muttrc
 | 
												
													
														|  | 
 | 539 | +  echo "set mask=\"!^\\.[^.]\"" >> /etc/Muttrc
 | 
												
													
														|  | 
 | 540 | +  echo "set mbox=\"~/Maildir\"" >> /etc/Muttrc
 | 
												
													
														|  | 
 | 541 | +  echo "set record=\"+Sent\"" >> /etc/Muttrc
 | 
												
													
														|  | 
 | 542 | +  echo "set postponed=\"+Drafts\"" >> /etc/Muttrc
 | 
												
													
														|  | 
 | 543 | +  echo "set trash=\"+Trash\"" >> /etc/Muttrc
 | 
												
													
														|  | 
 | 544 | +  echo "set spoolfile=\"~/Maildir\"" >> /etc/Muttrc
 | 
												
													
														|  | 
 | 545 | +  echo "auto_view text/x-vcard text/html text/enriched" >> /etc/Muttrc
 | 
												
													
														|  | 
 | 546 | +  echo "set editor=\"emacs\"" >> /etc/Muttrc
 | 
												
													
														|  | 
 | 547 | +  echo "set header_cache=\"+.cache\"" >> /etc/Muttrc
 | 
												
													
														|  | 
 | 548 | +  echo "" >> /etc/Muttrc
 | 
												
													
														|  | 
 | 549 | +  echo "macro index S \"<tag-prefix><save-message>=.learn-spam<enter>\" \"move to learn-spam\"" >> /etc/Muttrc
 | 
												
													
														|  | 
 | 550 | +  echo "macro pager S \"<save-message>=.learn-spam<enter>\" \"move to learn-spam\"" >> /etc/Muttrc
 | 
												
													
														|  | 
 | 551 | +  echo "macro index H \"<tag-prefix><copy-message>=.learn-ham<enter>\" \"copy to learn-ham\"" >> /etc/Muttrc
 | 
												
													
														|  | 
 | 552 | +  echo "macro pager H \"<copy-message>=.learn-ham<enter>\" \"copy to learn-ham\"" >> /etc/Muttrc
 | 
												
													
														|  | 
 | 553 | +  echo "" >> /etc/Muttrc
 | 
												
													
														|  | 
 | 554 | +  echo "# set up the sidebar" >> /etc/Muttrc
 | 
												
													
														|  | 
 | 555 | +  echo "set sidebar_width=12" >> /etc/Muttrc
 | 
												
													
														|  | 
 | 556 | +  echo "set sidebar_visible=yes" >> /etc/Muttrc
 | 
												
													
														|  | 
 | 557 | +  echo "set sidebar_delim='|'" >> /etc/Muttrc
 | 
												
													
														|  | 
 | 558 | +  echo "set sidebar_sort=yes" >> /etc/Muttrc
 | 
												
													
														|  | 
 | 559 | +  echo "" >> /etc/Muttrc
 | 
												
													
														|  | 
 | 560 | +  echo "set rfc2047_parameters" >> /etc/Muttrc
 | 
												
													
														|  | 
 | 561 | +  echo "" >> /etc/Muttrc
 | 
												
													
														|  | 
 | 562 | +  echo "# Show inbox and sent items" >> /etc/Muttrc
 | 
												
													
														|  | 
 | 563 | +  echo "mailboxes = =Sent" >> /etc/Muttrc
 | 
												
													
														|  | 
 | 564 | +  echo "" >> /etc/Muttrc
 | 
												
													
														|  | 
 | 565 | +  echo "# Alter these colours as needed for maximum bling" >> /etc/Muttrc
 | 
												
													
														|  | 
 | 566 | +  echo "color sidebar_new yellow default" >> /etc/Muttrc
 | 
												
													
														|  | 
 | 567 | +  echo "color normal white default" >> /etc/Muttrc
 | 
												
													
														|  | 
 | 568 | +  echo "color hdrdefault brightcyan default" >> /etc/Muttrc
 | 
												
													
														|  | 
 | 569 | +  echo "color signature green default" >> /etc/Muttrc
 | 
												
													
														|  | 
 | 570 | +  echo "color attachment brightyellow default" >> /etc/Muttrc
 | 
												
													
														|  | 
 | 571 | +  echo "color quoted green default" >> /etc/Muttrc
 | 
												
													
														|  | 
 | 572 | +  echo "color quoted1 white default" >> /etc/Muttrc
 | 
												
													
														|  | 
 | 573 | +  echo "color tilde blue default" >> /etc/Muttrc
 | 
												
													
														|  | 
 | 574 | +  echo "" >> /etc/Muttrc
 | 
												
													
														|  | 
 | 575 | +  echo "# ctrl-n, ctrl-p to select next, prev folder" >> /etc/Muttrc
 | 
												
													
														|  | 
 | 576 | +  echo "# ctrl-o to open selected folder" >> /etc/Muttrc
 | 
												
													
														|  | 
 | 577 | +  echo "bind index \Cp sidebar-prev" >> /etc/Muttrc
 | 
												
													
														|  | 
 | 578 | +  echo "bind index \Cn sidebar-next" >> /etc/Muttrc
 | 
												
													
														|  | 
 | 579 | +  echo "bind index \Co sidebar-open" >> /etc/Muttrc
 | 
												
													
														|  | 
 | 580 | +  echo "bind pager \Cp sidebar-prev" >> /etc/Muttrc
 | 
												
													
														|  | 
 | 581 | +  echo "bind pager \Cn sidebar-next" >> /etc/Muttrc
 | 
												
													
														|  | 
 | 582 | +  echo "bind pager \Co sidebar-open" >> /etc/Muttrc
 | 
												
													
														|  | 
 | 583 | +  echo "" >> /etc/Muttrc
 | 
												
													
														|  | 
 | 584 | +  echo "# ctrl-b toggles sidebar visibility" >> /etc/Muttrc
 | 
												
													
														|  | 
 | 585 | +  echo "macro index,pager \Cb '<enter-command>toggle sidebar_visible<enter><redraw-screen>' \"toggle sidebar\"" >> /etc/Muttrc
 | 
												
													
														|  | 
 | 586 | +  echo "" >> /etc/Muttrc
 | 
												
													
														|  | 
 | 587 | +  echo "# esc-m Mark new messages as read" >> /etc/Muttrc
 | 
												
													
														|  | 
 | 588 | +  echo "macro index <esc>m \"T~N<enter>;WNT~O<enter>;WO\CT~T<enter>\" \"mark all messages read\"" >> /etc/Muttrc
 | 
												
													
														|  | 
 | 589 | +  echo "" >> /etc/Muttrc
 | 
												
													
														|  | 
 | 590 | +  echo "# Collapsing threads" >> /etc/Muttrc
 | 
												
													
														|  | 
 | 591 | +  echo "macro index [ \"<collapse-thread>\" \"collapse/uncollapse thread\"" >> /etc/Muttrc
 | 
												
													
														|  | 
 | 592 | +  echo "macro index ] \"<collapse-all>\"    \"collapse/uncollapse all threads\"" >> /etc/Muttrc
 | 
												
													
														|  | 
 | 593 | +  echo "" >> /etc/Muttrc
 | 
												
													
														|  | 
 | 594 | +  echo "# threads containing new messages" >> /etc/Muttrc
 | 
												
													
														|  | 
 | 595 | +  echo "uncolor index \"~(~N)\"" >> /etc/Muttrc
 | 
												
													
														|  | 
 | 596 | +  echo "color index brightblue default \"~(~N)\"" >> /etc/Muttrc
 | 
												
													
														|  | 
 | 597 | +  echo "" >> /etc/Muttrc
 | 
												
													
														|  | 
 | 598 | +  echo "# new messages themselves" >> /etc/Muttrc
 | 
												
													
														|  | 
 | 599 | +  echo "uncolor index \"~N\"" >> /etc/Muttrc
 | 
												
													
														|  | 
 | 600 | +  echo "color index brightyellow default \"~N\"" >> /etc/Muttrc
 | 
												
													
														|  | 
 | 601 | +  echo "" >> /etc/Muttrc
 | 
												
													
														|  | 
 | 602 | +  echo "# GPG/PGP integration" >> /etc/Muttrc
 | 
												
													
														|  | 
 | 603 | +  echo "# this set the number of seconds to keep in memory the passphrase used to encrypt/sign" >> /etc/Muttrc
 | 
												
													
														|  | 
 | 604 | +  echo "set pgp_timeout=60" >> /etc/Muttrc
 | 
												
													
														|  | 
 | 605 | +  echo "" >> /etc/Muttrc
 | 
												
													
														|  | 
 | 606 | +  echo "# automatically sign and encrypt with PGP/MIME" >> /etc/Muttrc
 | 
												
													
														|  | 
 | 607 | +  echo "set pgp_autosign         # autosign all outgoing mails" >> /etc/Muttrc
 | 
												
													
														|  | 
 | 608 | +  echo "set pgp_replyencrypt     # autocrypt replies to crypted" >> /etc/Muttrc
 | 
												
													
														|  | 
 | 609 | +  echo "set pgp_replysign        # autosign replies to signed" >> /etc/Muttrc
 | 
												
													
														|  | 
 | 610 | +  echo "set pgp_auto_decode=yes  # decode attachments" >> /etc/Muttrc
 | 
												
													
														|  | 
 | 611 | +  echo "unset smime_is_default" >> /etc/Muttrc
 | 
												
													
														|  | 
 | 612 | +  echo "" >> /etc/Muttrc
 | 
												
													
														|  | 
 | 613 | +  echo "set alias_file=~/.mutt-alias" >> /etc/Muttrc
 | 
												
													
														|  | 
 | 614 | +  echo "source ~/.mutt-alias" >> /etc/Muttrc
 | 
												
													
														|  | 
 | 615 | +  echo "set query_command= \"abook --mutt-query '%s'\"" >> /etc/Muttrc
 | 
												
													
														|  | 
 | 616 | +  echo "macro index,pager A \"<pipe-message>abook --add-email-quiet<return>\" \"add the sender address to abook\"" >> /etc/Muttrc
 | 
												
													
														|  | 
 | 617 | +}
 | 
												
													
														|  | 
 | 618 | +
 | 
												
													
														| 525 |  initial_setup
 | 619 |  initial_setup
 | 
												
													
														| 526 |  install_editor
 | 620 |  install_editor
 | 
												
													
														| 527 |  enable_backports
 | 621 |  enable_backports
 | 
												
											
												
													
														|  | 
 |  | 
 | 
												
													
														| 543 |  spam_filtering
 | 637 |  spam_filtering
 | 
												
													
														| 544 |  configure_imap
 | 638 |  configure_imap
 | 
												
													
														| 545 |  configure_gpg
 | 639 |  configure_gpg
 | 
												
													
														|  | 
 | 640 | +email_client
 |