File: maildir-bulletin.1

package info (click to toggle)
maildir-bulletin 0.66
  • links: PTS
  • area: main
  • in suites: woody
  • size: 160 kB
  • ctags: 50
  • sloc: cpp: 734; sh: 157; makefile: 73
file content (124 lines) | stat: -rw-r--r-- 4,765 bytes parent folder | download | duplicates (3)
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
117
118
119
120
121
122
123
124
.TH maildir-bulletin 1 
.SH NAME
maildir-bulletin \- programs to send mail to all maildir users in a group

.SH SYNOPSIS
.B maildir-bulletin
.I [-s] group [groups]

.SH DESCRIPTION
This manual page documents briefly the
.BR maildir-bulletin ,
command.
.P
It is used to send a bulletin to multiple users, it does this by creating a
file in /var/lib/maildir-bulletin/bulletins for each group that the message
is to be sent to. Then hard links are created from that file to a file in the
~/Maildir/new directory of every user in that group. Such files can then be
read by any Maildir capable program including POP servers.
.P
It expects to receive the message on standard input (IE the usual proceedure
is to run it from /etc/aliases). Error messages will be produced on standard
output (for the bounce email) and written to
.BR /var/log/bulletin.err .
Results of successful runs will be logged to
.BR /var/log/bulletin.log .
.P
It is designed to be run as SUID root so that it can deliver mail inside the
users' home directories.

.SH PARAMETERS
The main command-line parameters are the names of groups to send to. At least
one group name must be specified.
.P
The
.BR -s
option specifies that sym-links are to always be used. They will be used anyway
if hard links fail.

.SH BENEFITS
This program is much better than sending email to each user because it's much
faster to deliver, and as it uses the same file name and Inode for each user
it should not be difficult to un-send a bulletin. Also it will only take disk
space for a single copy of the message which will be really handy if you wish
to send a 20K email to 30000 users!
.P
This program is much better than using the bulletin service in some POP servers
because it supports virtually unlimited numbers of bulletins, and allows you to
easily change mail server, POP server, or whatever and still keep the same
bulletin setup.
.P
It is currently about 500 lines of C code. The only external program to get
run is
.BR /usr/bin/sed .
Also if correctly installed only the mail delivery group
will be able to run it so I consider it unlikely that there are any security
problems.
.P
Running "ls -l" on the bulletins directory shows you how many users have not
read the bulletin yet (link count - 1).

.SH MESSAGE CONTENT
The message can contain a line
.BR BULLETIN_EXPIRES:yyyy-mm-dd
Which specifies the data that the message should expire on. Such a line is
removed from the message before delivery and stored in the file name in the
bulletins directory. This is then used by the expiry program to remove old
bulletins.
.P
You can rename the file to change the expiry date if it has hard links. If it
has symbolic links then renaming it will break all the links.

.SH FILES
.TP
.I /var/log/bulletin.log /var/log/bulletin.err
logs.
.TP
.I /var/lib/maildir-bulletin/ADMIN
A list of administrator email addresses and groups ("ALL" will match any
group) seperated by spaces with one address per line. Each line lists a group
that the particular administrator will be listed as "Sender:" for. I am not
sure that this feature is even needed.
.TP
.I /var/lib/maildir-bulletin/TOFIELD
Same format but for the "To:" field.
.TP
.I /var/lib/maildir-bulletin/ALLOWEDSENDERS
A list of administrator email addresses and groups ("ALL" will match any
group) seperated by spaces with one address per line. When email comes in the
"From:" field is checked against this to determine whether the specified
address is allowed to send a buttetin to the group(s) in question. Poor
security really, but that's life on the net.
.P
If want root@your.domain to be able to send bulletins to everyone and john@other.domain to send bulletins to staff then have the following:
.P
root@your.domain ALL
.P
john@other.domain staff

.SH DIRECTORIES
.TP
.I /var/lib/maildir-bulletin
The main directory for config files.
.TP
.I /var/lib/maildir-bulletin/tmp
Temporary directory for sed input - do not make this a link to /tmp, it must
be a directory that is only writable by root.
.TP
.I /var/lib/maildir-bulletin/bulletins
Where the bulletin files are stored.

.SH BUGS
If you specify a month greater than 12 or a day greater than the number of
days in the month this won't be taken as an error. Month 13 means that it won't
expire until the next year, day 32 means it won't expire until the next month.
Maybe someone will consider this a feature.
.P
Specifying a year greater than 2038 should work, but then the bulletin won't
expire until you move to a 64bit Unix platform.

.SH AUTHOR
This program, it's manual page, and the Debian package were written by
Russell Coker <russell@coker.com.au> while under contract to Cap Gemini.
I had to re-write their bulletin program anyway so it made sense to do it
properly and release it as open source.