Skip to content
This repository was archived by the owner on Mar 15, 2019. It is now read-only.

Commit 53dbb86

Browse files
committed
Update README.md and sample-dcrspy.conf for watched addresses and email notifications.
1 parent c96c345 commit 53dbb86

File tree

2 files changed

+53
-2
lines changed

2 files changed

+53
-2
lines changed

README.md

+42
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ Multiple destinations for the data are planned:
3838
4. **Plain text summary**: balances, votes, current ticket price, mean fees,
3939
wallet status. **DONE**.
4040
5. **RESTful API** over HTTPS. NOT IMPLEMENTED.
41+
6. **email**: email notification upon receiving to a watched address.
4142

4243
Details of the JSON output may be found in [Data Details](#data-details). The
4344
plain text summary looks something like the following (_wallet data redacted_):
@@ -70,6 +71,47 @@ not requested from dcrd, and thus not shown in the summary. It is still
7071
present in JSON, but the values are {0, -1, -1}. To get actualy ticket pool
7172
value, use `-p, --poolvalue`.
7273

74+
## Watched Addresses and Email Notifications
75+
76+
dcrspy may watch for transactions receiving into or sending from "watched"
77+
addresses. Watched addresses are specified with the `watchaddress` flag, with
78+
multiple addresses specified using repeated `watchaddress` flags (e.g. one per
79+
line in the config file). For example:
80+
81+
~~~none
82+
; Addresses to watch for incoming transactions
83+
; Decred developer (C0) address
84+
;watchaddress=Dcur2mcGjmENx4DhNqDctW5wJCVyT3Qeqkx
85+
; Some larger mining pool addresses:
86+
;watchaddress=DsYAN3vT15rjzgoGgEEscoUpPCRtwQKL7dQ
87+
;watchaddress=DshZYJySTD4epCyoKRjPMyVmSvBpFuNYuZ4
88+
~~~
89+
90+
To receive an email notification for each transaction receiving to a watched
91+
address, concatenate "`,1`" at the end of the address. For example:
92+
93+
~~~none
94+
; Receive email notifications for this one
95+
;watchaddress=DsZWrNNyKDUFPNMcjNYD7A8k9a4HCM5xgsW,1
96+
; But not this one
97+
;watchaddress=Dsg2bQy2yt2onEcaQhT1X9UbTKNtqmHyMus,0
98+
; and not by default
99+
;watchaddress=DskFbReCFNUjVHDf2WQP7AUKdB27EfSPYYE
100+
~~~
101+
102+
An SMTP server name, port, authentication information, and a recipient email
103+
address must also be specified to use email notifications.
104+
105+
~~~none
106+
107+
108+
smtppass=suPErSCRTpasswurd
109+
smtpserver=smtp.mailprovider.org:587
110+
~~~
111+
112+
If you have trouble getting it to work, try any alternate ports available on
113+
your SMTP server (e.g. 587 instead of 465). You must specify the port.
114+
73115
## Arbitrary Command Execution
74116

75117
When dcrspy receives a new block notification from dcrd, data collection and

sample-dcrspy.conf

+11-2
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,19 @@ debuglevel=debug
2323
; Some larger mining pool addresses:
2424
;watchaddress=DsYAN3vT15rjzgoGgEEscoUpPCRtwQKL7dQ
2525
;watchaddress=DshZYJySTD4epCyoKRjPMyVmSvBpFuNYuZ4
26-
;watchaddress=DsZWrNNyKDUFPNMcjNYD7A8k9a4HCM5xgsW
27-
;watchaddress=Dsg2bQy2yt2onEcaQhT1X9UbTKNtqmHyMus
26+
; receive email notifications for this one
27+
;watchaddress=DsZWrNNyKDUFPNMcjNYD7A8k9a4HCM5xgsW,1
28+
; but not this one
29+
;watchaddress=Dsg2bQy2yt2onEcaQhT1X9UbTKNtqmHyMus,0
30+
; and not by default
2831
;watchaddress=DskFbReCFNUjVHDf2WQP7AUKdB27EfSPYYE
2932

33+
; SMTP server setup
34+
35+
36+
smtppass=suPErSCRTpasswurd
37+
smtpserver=smtp.mailprovider.org:587
38+
3039
; Ticket pool value takes a long time, 8-9 sec, so the default is false.
3140
;poolvalue=false
3241

0 commit comments

Comments
 (0)