Browse Source

Create email rules only after installing email clients #13

Bob Mottram 11 years ago
parent
commit
3c3efa2767
1 changed files with 148 additions and 144 deletions
  1. 148
    144
      beaglebone.txt

+ 148
- 144
beaglebone.txt View File

330
 
330
 
331
 #+BEGIN_SRC: bash
331
 #+BEGIN_SRC: bash
332
 dpkg-reconfigure locales
332
 dpkg-reconfigure locales
333
+apt-get install keyboard-configuration
333
 #+END_SRC
334
 #+END_SRC
334
 
335
 
335
 You may need to reboot for this to take effect.  To verify the change.
336
 You may need to reboot for this to take effect.  To verify the change.
379
 The security of encryption depends upon the randomness of the random source used on your system.  If it isn't very random then it may be far more vulnerable to cryptanalysis, and it's known that in the past some dubious agencies have encouraged the use of flawed random number generators to assist with their prurient activities.  Randomness - typically referred to as /entropy/ - is often gathered from factors such as the timing of key presses or mouse movements, but since the BBB won't have such devices plugged into it this reduces the amount of entropy available.
380
 The security of encryption depends upon the randomness of the random source used on your system.  If it isn't very random then it may be far more vulnerable to cryptanalysis, and it's known that in the past some dubious agencies have encouraged the use of flawed random number generators to assist with their prurient activities.  Randomness - typically referred to as /entropy/ - is often gathered from factors such as the timing of key presses or mouse movements, but since the BBB won't have such devices plugged into it this reduces the amount of entropy available.
380
 
381
 
381
 *** On the Beaglebone Black
382
 *** On the Beaglebone Black
383
+TODO: is this relevant? http://www.reddit.com/r/netsec/comments/1x7ias/sha256_authentication_hardware_rng_and_protected/
384
+
382
 Computers can't really generate truly random numbers by themselves, since they're deterministic and so operate in a highly predictable manner.  Fortunately, the BBB has an onboard hardware random number generator, which is a physical process which behaves randomly and which can then be read into the computer and stored for later use in encryption algorithms.
385
 Computers can't really generate truly random numbers by themselves, since they're deterministic and so operate in a highly predictable manner.  Fortunately, the BBB has an onboard hardware random number generator, which is a physical process which behaves randomly and which can then be read into the computer and stored for later use in encryption algorithms.
383
 
386
 
384
 Information on exactly how the hardware random number generator on the Beaglebone AM335x CPU works [[http://e2e.ti.com/support/arm/sitara_arm/f/791/t/292794.aspx][seems hard to come by]], but we can later use some software to verify that it does indeed produce random numbers and hasn't been deliberately weakened.
387
 Information on exactly how the hardware random number generator on the Beaglebone AM335x CPU works [[http://e2e.ti.com/support/arm/sitara_arm/f/791/t/292794.aspx][seems hard to come by]], but we can later use some software to verify that it does indeed produce random numbers and hasn't been deliberately weakened.
1601
 chown -R root:root ~/.gnupg
1604
 chown -R root:root ~/.gnupg
1602
 #+END_SRC
1605
 #+END_SRC
1603
 
1606
 
1604
-** Create Email folders and rules
1605
-
1606
-#+BEGIN_VERSE
1607
-/Yes, the NSA set fire to the Internet but it’s the business models of Google, Facebook, etc, that provide the firewood.  Trusting the companies supplying the firewood to be your fire fighters is naïve at best./
1608
-
1609
-#+END_VERSE
1610
-
1611
-*** Rules for mailing lists
1612
-A common situation with email is that you may be subscribed to various mailing lists and want incoming email from those to be automatically grouped into a separate folder for each list.
1613
-
1614
-We can make a script to make adding mailing list rules easy:
1615
-
1616
-#+BEGIN_SRC: bash
1617
-emacs /usr/bin/mailinglistrule
1618
-#+END_SRC
1619
-
1620
-Add the following:
1621
-
1622
-#+BEGIN_SRC: bash
1623
-#!/bin/bash
1624
-MYUSERNAME=$1
1625
-MAILINGLIST=$2
1626
-SUBJECTTAG=$3
1627
-MUTTRC=/home/$MYUSERNAME/.muttrc
1628
-PM=/home/$MYUSERNAME/.procmailrc
1629
-LISTDIR=/home/$MYUSERNAME/Maildir/$MAILINGLIST
1630
-if [ ! -d "$LISTDIR" ]; then
1631
-  mkdir -m 700 $LISTDIR
1632
-  mkdir -m 700 $LISTDIR/tmp
1633
-  mkdir -m 700 $LISTDIR/new
1634
-  mkdir -m 700 $LISTDIR/cur
1635
-fi
1636
-chown -R $MYUSERNAME:$MYUSERNAME $LISTDIR
1637
-echo "" >> $PM
1638
-echo ":0" >> $PM
1639
-echo "  * ^Subject:.*()\[$SUBJECTTAG\]" >> $PM
1640
-echo "$LISTDIR/new" >> $PM
1641
-chown $MYUSERNAME:$MYUSERNAME $PM
1642
-if [ ! -f "$MUTTRC" ]; then
1643
-  cp /etc/Muttrc $MUTTRC
1644
-  chown $MYUSERNAME:$MYUSERNAME $MUTTRC
1645
-fi
1646
-PROCMAILLOG=/home/$MYUSERNAME/log
1647
-if [ ! -d $PROCMAILLOG ]; then
1648
-  mkdir $PROCMAILLOG
1649
-  chown -R $MYUSERNAME:$MYUSERNAME $PROCMAILLOG
1650
-fi
1651
-#+END_SRC
1652
-
1653
-Save and exit, then make the script executable.
1654
-
1655
-#+BEGIN_SRC: bash
1656
-chmod +x /usr/bin/mailinglistrule
1657
-#+END_SRC
1658
-
1659
-Now we can add a new mailing list rule with the following, where /myusername/ is your username, /mailinglistname/ is the name of the mailing list (with no spaces) and /subjecttag/ is the tag which usually appears within square brackets in the subject line of emails from the list.
1660
-
1661
-#+BEGIN_SRC: bash
1662
-mailinglistrule [myusername] [mailinglistname] [subjecttag]
1663
-#+END_SRC
1664
-
1665
-Repeat this command for as many mailing lists as you need.  Then edit your local Mutt configuration.
1666
-
1667
-#+BEGIN_SRC: bash
1668
-emacs /home/myusername/.muttrc
1669
-#+END_SRC
1670
-
1671
-Search for the *mailboxes* variable and add entries for the mailing lists you just created.  For example:
1672
-
1673
-#+BEGIN_SRC: bash
1674
-mailboxes = =Sent =mailinglistname
1675
-#+END_SRC
1676
-
1677
-Then save and exit.
1678
-
1679
-*** Rules for specific email addresses
1680
-
1681
-You can also make a script which will allow you to move mail from specific email addresses to a folder.
1682
-
1683
-#+BEGIN_SRC: bash
1684
-emacs /usr/bin/emailrule
1685
-#+END_SRC
1686
-
1687
-Add the following:
1688
-
1689
-#+BEGIN_SRC: bash
1690
-#!/bin/bash
1691
-MYUSERNAME=$1
1692
-EMAILADDRESS=$2
1693
-MAILINGLIST=$3
1694
-MUTTRC=/home/$MYUSERNAME/.muttrc
1695
-PM=/home/$MYUSERNAME/.procmailrc
1696
-LISTDIR=/home/$MYUSERNAME/Maildir/$MAILINGLIST
1697
-if [ ! -d "$LISTDIR" ]; then
1698
-  mkdir -m 700 $LISTDIR
1699
-  mkdir -m 700 $LISTDIR/tmp
1700
-  mkdir -m 700 $LISTDIR/new
1701
-  mkdir -m 700 $LISTDIR/cur
1702
-fi
1703
-chown -R $MYUSERNAME:$MYUSERNAME $LISTDIR
1704
-echo "" >> $PM
1705
-echo ":0" >> $PM
1706
-echo "  * ^From: $EMAILADDRESS" >> $PM
1707
-echo "$LISTDIR/new" >> $PM
1708
-chown $MYUSERNAME:$MYUSERNAME $PM
1709
-if [ ! -f "$MUTTRC" ]; then
1710
-  cp /etc/Muttrc $MUTTRC
1711
-  chown $MYUSERNAME:$MYUSERNAME $MUTTRC
1712
-fi
1713
-PROCMAILLOG=/home/$MYUSERNAME/log
1714
-if [ ! -d $PROCMAILLOG ]; then
1715
-  mkdir $PROCMAILLOG
1716
-  chown -R $MYUSERNAME:$MYUSERNAME $PROCMAILLOG
1717
-fi
1718
-#+END_SRC
1719
-
1720
-Save and exit, then make the script executable.
1721
-
1722
-#+BEGIN_SRC: bash
1723
-chmod +x /usr/bin/emailrule
1724
-#+END_SRC
1725
-
1726
-Then to add a particular email address to a folder run the command:
1727
-
1728
-#+BEGIN_SRC: bash
1729
-emailrule [myusername] [emailaddress] [foldername]
1730
-#+END_SRC
1731
-
1732
-If you want any mail from the given email address to be deleted then set the /foldername/  to /Trash/.
1733
-
1734
-To ensure that the folder appears within Mutt.
1735
-
1736
-#+BEGIN_SRC: bash
1737
-emacs /home/myusername/.muttrc
1738
-#+END_SRC
1739
-
1740
-Search for the *mailboxes* variable and add entries for the mailing lists you just created.  For example:
1741
-
1742
-#+BEGIN_SRC: bash
1743
-mailboxes = =Sent =foldername
1744
-#+END_SRC
1745
-
1746
-Then save and exit.
1747
-
1748
 ** Setting up a web site
1607
 ** Setting up a web site
1749
 
1608
 
1750
 #+BEGIN_VERSE
1609
 #+BEGIN_VERSE
2478
 *Menu*, hover over *Preferences*, select *Account Settings*, select *Server Settings* then click on the *Advanced* button.
2336
 *Menu*, hover over *Preferences*, select *Account Settings*, select *Server Settings* then click on the *Advanced* button.
2479
 
2337
 
2480
 Make sure that "*show only subscribed folders*" is not checked.  Then click the *ok* buttons.  Folders will be re-scanned, which may take some time depending upon how much email you have, but your folders will then appear.
2338
 Make sure that "*show only subscribed folders*" is not checked.  Then click the *ok* buttons.  Folders will be re-scanned, which may take some time depending upon how much email you have, but your folders will then appear.
2339
+** Create Email folders and rules
2340
+
2341
+#+BEGIN_VERSE
2342
+/Yes, the NSA set fire to the Internet but it’s the business models of Google, Facebook, etc, that provide the firewood.  Trusting the companies supplying the firewood to be your fire fighters is naïve at best./
2343
+
2344
+-- Aral Balkan
2345
+#+END_VERSE
2346
+
2347
+*** Rules for mailing lists
2348
+A common situation with email is that you may be subscribed to various mailing lists and want incoming email from those to be automatically grouped into a separate folder for each list.
2349
+
2350
+We can make a script to make adding mailing list rules easy:
2351
+
2352
+#+BEGIN_SRC: bash
2353
+emacs /usr/bin/mailinglistrule
2354
+#+END_SRC
2355
+
2356
+Add the following:
2357
+
2358
+#+BEGIN_SRC: bash
2359
+#!/bin/bash
2360
+MYUSERNAME=$1
2361
+MAILINGLIST=$2
2362
+SUBJECTTAG=$3
2363
+MUTTRC=/home/$MYUSERNAME/.muttrc
2364
+PM=/home/$MYUSERNAME/.procmailrc
2365
+LISTDIR=/home/$MYUSERNAME/Maildir/$MAILINGLIST
2366
+if [ ! -d "$LISTDIR" ]; then
2367
+  mkdir -m 700 $LISTDIR
2368
+  mkdir -m 700 $LISTDIR/tmp
2369
+  mkdir -m 700 $LISTDIR/new
2370
+  mkdir -m 700 $LISTDIR/cur
2371
+fi
2372
+chown -R $MYUSERNAME:$MYUSERNAME $LISTDIR
2373
+echo "" >> $PM
2374
+echo ":0" >> $PM
2375
+echo "  * ^Subject:.*()\[$SUBJECTTAG\]" >> $PM
2376
+echo "$LISTDIR/new" >> $PM
2377
+chown $MYUSERNAME:$MYUSERNAME $PM
2378
+if [ ! -f "$MUTTRC" ]; then
2379
+  cp /etc/Muttrc $MUTTRC
2380
+  chown $MYUSERNAME:$MYUSERNAME $MUTTRC
2381
+fi
2382
+PROCMAILLOG=/home/$MYUSERNAME/log
2383
+if [ ! -d $PROCMAILLOG ]; then
2384
+  mkdir $PROCMAILLOG
2385
+  chown -R $MYUSERNAME:$MYUSERNAME $PROCMAILLOG
2386
+fi
2387
+#+END_SRC
2388
+
2389
+Save and exit, then make the script executable.
2390
+
2391
+#+BEGIN_SRC: bash
2392
+chmod +x /usr/bin/mailinglistrule
2393
+#+END_SRC
2394
+
2395
+Now we can add a new mailing list rule with the following, where /myusername/ is your username, /mailinglistname/ is the name of the mailing list (with no spaces) and /subjecttag/ is the tag which usually appears within square brackets in the subject line of emails from the list.
2396
+
2397
+#+BEGIN_SRC: bash
2398
+mailinglistrule [myusername] [mailinglistname] [subjecttag]
2399
+#+END_SRC
2400
+
2401
+Repeat this command for as many mailing lists as you need.  Then edit your local Mutt configuration.
2402
+
2403
+#+BEGIN_SRC: bash
2404
+emacs /home/myusername/.muttrc
2405
+#+END_SRC
2406
+
2407
+Search for the *mailboxes* variable and add entries for the mailing lists you just created.  For example:
2408
+
2409
+#+BEGIN_SRC: bash
2410
+mailboxes = =Sent =mailinglistname
2411
+#+END_SRC
2412
+
2413
+Then save and exit.
2414
+
2415
+*** Rules for specific email addresses
2416
+
2417
+You can also make a script which will allow you to move mail from specific email addresses to a folder.
2418
+
2419
+#+BEGIN_SRC: bash
2420
+emacs /usr/bin/emailrule
2421
+#+END_SRC
2422
+
2423
+Add the following:
2424
+
2425
+#+BEGIN_SRC: bash
2426
+#!/bin/bash
2427
+MYUSERNAME=$1
2428
+EMAILADDRESS=$2
2429
+MAILINGLIST=$3
2430
+MUTTRC=/home/$MYUSERNAME/.muttrc
2431
+PM=/home/$MYUSERNAME/.procmailrc
2432
+LISTDIR=/home/$MYUSERNAME/Maildir/$MAILINGLIST
2433
+if [ ! -d "$LISTDIR" ]; then
2434
+  mkdir -m 700 $LISTDIR
2435
+  mkdir -m 700 $LISTDIR/tmp
2436
+  mkdir -m 700 $LISTDIR/new
2437
+  mkdir -m 700 $LISTDIR/cur
2438
+fi
2439
+chown -R $MYUSERNAME:$MYUSERNAME $LISTDIR
2440
+echo "" >> $PM
2441
+echo ":0" >> $PM
2442
+echo "  * ^From: $EMAILADDRESS" >> $PM
2443
+echo "$LISTDIR/new" >> $PM
2444
+chown $MYUSERNAME:$MYUSERNAME $PM
2445
+if [ ! -f "$MUTTRC" ]; then
2446
+  cp /etc/Muttrc $MUTTRC
2447
+  chown $MYUSERNAME:$MYUSERNAME $MUTTRC
2448
+fi
2449
+PROCMAILLOG=/home/$MYUSERNAME/log
2450
+if [ ! -d $PROCMAILLOG ]; then
2451
+  mkdir $PROCMAILLOG
2452
+  chown -R $MYUSERNAME:$MYUSERNAME $PROCMAILLOG
2453
+fi
2454
+#+END_SRC
2455
+
2456
+Save and exit, then make the script executable.
2457
+
2458
+#+BEGIN_SRC: bash
2459
+chmod +x /usr/bin/emailrule
2460
+#+END_SRC
2461
+
2462
+Then to add a particular email address to a folder run the command:
2463
+
2464
+#+BEGIN_SRC: bash
2465
+emailrule [myusername] [emailaddress] [foldername]
2466
+#+END_SRC
2467
+
2468
+If you want any mail from the given email address to be deleted then set the /foldername/  to /Trash/.
2469
+
2470
+To ensure that the folder appears within Mutt.
2471
+
2472
+#+BEGIN_SRC: bash
2473
+emacs /home/myusername/.muttrc
2474
+#+END_SRC
2475
+
2476
+Search for the *mailboxes* variable and add entries for the mailing lists you just created.  For example:
2477
+
2478
+#+BEGIN_SRC: bash
2479
+mailboxes = =Sent =foldername
2480
+#+END_SRC
2481
+
2482
+Then save and exit.
2483
+
2481
 ** Install a Blog
2484
 ** Install a Blog
2482
 
2485
 
2483
 #+BEGIN_VERSE
2486
 #+BEGIN_VERSE