"Fossies" - the Fresh Open Source Software Archive 
As a special service "Fossies" has tried to format the requested text file into HTML format (style:
standard) with prefixed line numbers.
Alternatively you can here
view or
download the uninterpreted source code file.
1 Configuration is read from a directory structure which is ordinarily located
2 in "$HOME/.netbiff". The structure is organized as follows:
3
4 .netbiff/frequency
5 This file should contain a text integer that indicates the polling
6 frequency in seconds.
7
8 .netbiff/actions/
9 This directory should contain a file for every defined action. The name of
10 the file indicates the name of the action. The contents of the file will be
11 passed to "sh -c" when the action is executed. There are a few default
12 actions defined internally. They are:
13 - beep - cause an audible beep
14 - image - cause the interface to change the mailbox image to "biffed" state
15 - image-reset - change the image back to "unbiffed" state
16
17 .netbiff/connections/
18 This directory should contain a sub-directory for every defined connection.
19 The name of the sub-directory indicates the name of the connection. The
20 contents of the directory are described below.
21
22 .netbiff/connections/*/command
23 This file should contain the command to be passed to "sh -c" to run the
24 appropriate backend.
25
26 .netbiff/connections/*/folders
27 This file should contain a list of folders, one per line, that should be
28 checked for this connection.
29
30 .netbiff/connections/*/update
31 This file should contain a list of actions, one per line, that should be
32 performed when the connection indicates an update (i.e., when it's biffed).
33
34 .netbiff/connections/*/reset
35 This file should contain a list of actions, one per line, that should be
36 performed when the connection is reset (i.e., unbiffed).
37
38 .netbiff/connections/*/*
39 Any other contents of a connection directory will be ignored unless
40 specifically requested by the backend connection. For example, the
41 netbiffd-imap backend may request the data "secret/password". In this case,
42 the file .netbiff/connections/*/secret/password will be accessed.
43
44 .netbiff/connections/*/secret
45 This directory, if it exists, will contain backend data (such as
46 secret/password). If it exists, its permissions are checked when netbiff
47 starts; if it is accessible by group or world permissions, then netbiff will
48 report an error and halt.
49
50
51 EXAMPLES
52
53 Here is a short shell script to create a simple netbiff setup:
54
55 mkdir .netbiff
56 mkdir .netbiff/actions
57 mkdir .netbiff/connections
58 # update every 30 seconds
59 echo 30 >.netbiff/frequency
60 # make one IMAP connection to mail.example.org, username foo
61 mkdir .netbiff/connections/example
62 echo \
63 'exec netbiffd-imap login mail.example.org peff' \
64 >.netbiff/connections/example/command
65 # let's just check the INBOX
66 echo INBOX >.netbiff/connections/example/folders
67 # and let's have it beep and change the image on biff
68 (echo beep; echo image) >.netbiff/connections/example/update
69 # and reset the image when it unbiffs
70 (echo image-reset) >.netbiff/connections/example/reset
71 # Done.
72
73 Here's an example that shows converting from the old .netbiffrc format to the
74 new format.
75
76 --- old .netbiffrc --
77 frequency 30
78 action "foo" "echo A biff that biffs... | mail $USER"
79 connection
80 name "local mail"
81 command "/usr/local/bin/netbiffd"
82 update "image"
83 update "beep"
84 reset "image-reset"
85 folder "/var/spool/mail/mylogin"
86 folder "foo"
87 endconnection
88 connection name "remote mail"
89 command
90 "ssh remotehost /usr/local/bin/netbiffd-imap preauth /etc/rimapd"
91 folder "INBOX"
92 update "beep"
93 update "foo"
94 endconnection
95
96 --- new .netbiff shell script ---
97 mkdir .netbiff; cd .netbiff
98 echo 30 >frequency
99
100 mkdir actions; cd actions
101 echo 'echo a biff that biffs... | mail $USER' >foo
102 cd ..
103
104 mkdir connections; cd connections
105 mkdir local; cd local
106 echo /usr/local/bin/netbiffd >command
107 (echo image; echo beep) >update
108 echo image-reset >reset
109 echo /var/spool/mail/mylogin >folders
110 echo foo >>folders
111 cd ..
112 mkdir remote; cd remote
113 echo \
114 "ssh remotehost /usr/local/bin/netbiffd-imap preauth /etc/rimapd" \
115 >command
116 echo INBOX >folder
117 (echo beep; echo foo) >update
118 touch reset
119 cd ..
120 cd ..
121 cd ..