-
Notifications
You must be signed in to change notification settings - Fork 6
/
extsmail.conf.5
116 lines (116 loc) · 3.83 KB
/
extsmail.conf.5
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
.\" Copyright (C)2008 Laurence Tratt http://tratt.net/laurie/
.\"
.\" Permission is hereby granted, free of charge, to any person obtaining a copy
.\" of this software and associated documentation files (the "Software"), to
.\" deal in the Software without restriction, including without limitation the
.\" rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
.\" sell copies of the Software, and to permit persons to whom the Software is
.\" furnished to do so, subject to the following conditions:
.\"
.\" The above copyright notice and this permission notice shall be included in
.\" all copies or substantial portions of the Software.
.\"
.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
.\" IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
.\" FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
.\" AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
.\" LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
.\" FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
.\" IN THE SOFTWARE.
.Dd $Mdocdate: November 2 2008 $
.Dt EXTSMAIL.CONF 5
.Os
.Sh NAME
.Nm extsmail.conf
.Nd configure robust sending of e-mail to external commands
.Sh DESCRIPTION
.Nm
is used to configure
.Xr extsmail 1
and
.Xr extsmaild 1 .
It consists of one or more
.Em key = value
pairs. The following variables are defined:
.Bl -tag -width Ds
.It spool_dir
Sets the location of the spool directory used by
.Xr extsmail 1
and
.Xr extsmaild 1 .
This is the only variable which must be set in every configuration file.
.It notify_failure_interval
Specifies how often notifications of unsuccessful deliveries should be made.
If unspecified, or set to 0, notifications will never be made. Times are
specified as a number followed by
.Em d
(days),
.Em h
(hours),
.Em m
(minutes), or
.Em s
(seconds).
.It notify_failure_cmd
The shell command to be executed when
.Em notify_failure_interval
seconds / minutes / hours / days have elapsed since the last fully
successful send cycle. If the string
.Em ${TIME}
exists in the command, it is replaced with a pretty printed string detailing
how much time has elapsed since the last fully successfully send cycle.
The resulting string is then passed to
.Xr system 3 .
Note that no security checking is (or can be) done on the command, so this
option should be used with caution if a single configuration file serves
multiple users. Please check the warnings that come with
.Xr system 3 .
.It notify_success_cmd
The shell command to be executed when 1 or more messages have been successfully
sent. If the string
.Em ${SUCCESSES}
exists in the command, it is replaced with a string representing the number of
successfully sent messages. The same warnings that apply to
.Em notify_failure_cmd
also apply to this command.
.El
.Sh FILES
The
.Em extsmail
configuration file is searched for, in order, in the following locations:
.Pp
.Bl -tag -width Ds -compact
.It ~/.extsmail/conf
Per-user
.Em extsmail
configuration.
.Pp
.It /etc/extsmail/conf
System-wide
.Em extsmail
configuration.
.El
.Sh EXAMPLES
The simplest configuration file looks as follows:
.Bd -literal -offset indent
spool_dir = "~/somewhere"
.Ed
.Pp
A more complex configuration which uses a notification framework to inform the
user of mail sending and failure looks as follows:
.Bd -literal -offset indent
spool_dir = "~/somewhere"
notify_failure_interval = 30m
notify_failure_cmd = "notify-send \-a extsmaild \-c email
\-i mail-send \-u critical 'extsmaild: ${TIME} since a fully
successful send cycle'"
notify_success_cmd = "notify-send \-a extsmaild \-c email
\-i mail-send \-u low 'extsmaild: ${SUCCESSES} messages
successfully sent'"
.Ed
.Sh SEE ALSO
.Xr extsmail 1 ,
.Xr extsmail.externals 5 ,
.Xr extsmaild 1
.Sh AUTHORS
.An Laurence Tratt Aq http://tratt.net/laurie/