man maildir-bulletin (Commandes) - programs to send mail to all maildir users in a group

NAME

maildir-bulletin - programs to send mail to all maildir users in a group

SYNOPSIS

maildir-bulletin [-s] group [groups]

DESCRIPTION

This manual page documents briefly the maildir-bulletin, command.

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.

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 /var/log/bulletin.err. Results of successful runs will be logged to /var/log/bulletin.log.

It is designed to be run as SUID root so that it can deliver mail inside the users' home directories.

PARAMETERS

The main command-line parameters are the names of groups to send to. At least one group name must be specified.

The -s option specifies that sym-links are to always be used. They will be used anyway if hard links fail.

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!

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.

It is currently about 500 lines of C code. The only external program to get run is /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.

Running "ls -l" on the bulletins directory shows you how many users have not read the bulletin yet (link count - 1).

MESSAGE CONTENT

The message can contain a line 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.

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.

FILES

/var/log/bulletin.log /var/log/bulletin.err
logs.
/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.
/var/lib/maildir-bulletin/TOFIELD
Same format but for the "To:" field.
/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.

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:

root@your.domain ALL

john@other.domain staff

DIRECTORIES

/var/lib/maildir-bulletin
The main directory for config files.
/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.
/var/lib/maildir-bulletin/bulletins
Where the bulletin files are stored.

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.

Specifying a year greater than 2038 should work, but then the bulletin won't expire until you move to a 64bit Unix platform.

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.