offline Mailinglist

In general offering a complete mailinglist requires a registered
domain name and a permanent connections to the Internet.
We show how you can achieve the same with a dial-up connection and a
dynamic IP.

What is a mailinglist good for?

A mailinglist supports the communication of many people who are all
interested in the same theme.
The service works similar to a news group but you do not need a
special news client, you personal mail client is sufficient.
In general a sketch of the information network looks like:

If anybody in the list of registered clients wanted to send a message to
all users in the list he did not need to know who these users are. He
just sends the mail to the server (list@server.com) and the server
sends it to all people who subscribed to the list.
Here you see that this service is different from the one you find on
web pages. There only the administrator of the web sites can send a mail
to all subscribed clients (called announce list).

Real mailinglists follow the basic aim that the contents of the mails
is pointed to a special client but all others can follow the
discussion.

When and wherefore do you need a mailinglist?
A big collection of tasks could be listed. Often developers of
Linux programs use one because the programmers are spread around over the
world.
But you could also make a mailinglist for private tasks, e.g.
a list of you school class or sport team.
Dates and discussions could be followed by everyone.

Problem: offline

On the mailinglist server you usually find a majordomo running that
automatically administrates the mailinglist(s).
This program can execute commands that are sent to it via e-mail,
e.g. sub- and unsubscribe to a list.
In addition every mailinglist gets its own e-mail address that is used
for the communication of all clients.
If you do not own a permanent connection to the Internet, you have
the problem that you get a dynamic IP for every call and always a different
domain name, too.
The mails of the clients do not reach the server because it is not
dialed in or it got a different domain name. Now you know why
mailinglists are usually placed on permanently connected servers.

With a little bit more work and a few tricks you will be able to
offer a mailinglist even if you do not have a fixed connection
to the Internet.

Even without a permanent Internet connection everyone has or can get
an e-mail address. Many ISPs or other companies offer a POP3 account
on their servers where your mails are stored while you are offline.
After you dialed in the mail can be automatically fetched to your local
computer (or the whole local network). Have a look at
fetchmail I
and fetchmail II.

For an offline mailinglist you need such a POP3 server from where you
get the stored e-mails and forward these to your local Majordomo.

In many Linux distributions majordomo is already included but it can
be configured in many ways that are not needed for normal purposes.
E.g. this program supports that you can add the commands for the mailinglist
server to the e-mail address.
But this does not work offline (maybe with much more but unnecessary work).

Instead we use the "small brother" of majordomo , called
Minordomo. It can be easily installed and configured and offers
enough functionality for usual tasks.
The commands for the mailinglist server have to be written into
the subject line, so an offline use is supported.

The administration of the mailinglist is done in the directory
/var/lib/minordomo

>> mkdir /var/lib/minordomo

There you create for every list a subdirectory

>> mkdir /var/lib/minordomo/listname

PROBLEM:
The program sendmail has to own the read and write rights for the
directories and files in /var/lib/minordomo.
But the user and group IDs of sendmail are different for every
distribution.
Sometimes the user.group is mail.mail, but SuSE uses
daemon.daemon.
The owner of the files can be changed via

>> chown deamon.deamon FILENAME

If you did not know the user and group ID of sendmail you could
give read write access to all users. After sendmail created the
subdirectory
archive you can see who owns it via

Remove the granted write access for all users and give the files to
the corresponding user id of sendmail (here it is
deamon.deamon).

Next you have to configure a few files.
Pre-build samples are placed in the directory
/usr/local/minordomo-0.7.6.2/sample-list. The following files
have to be copied to /var/lib/minordomo/listname/:

footer: This text is added to the end of each mail
and should contain the information how you are able to get out of the
mailinglist.

File /var/lib/minordomo/listname/footer

----------------------------------------
Listname -- http://www.homepage.de
To unsubscribe, send mail to majordomo@pop3server.de with
a subject of 'unsubscribe \l'

Minordomo replaces the entry \l by the name of the list.
The e-mail address has to be replaced with you official POP3 server
address because Minordomo would replace it with the local mail server
name.

info: In this text file you write a longer description
about the theme of this mailinglist.

one-liner: A short description of the mailinglist
(just one line)

template.html: This file is only needed if you want to use the
web site with this file.

config: You can create a specific configuration
in the subdirectory of each mailing list
These settings overwrite the main configuration in
/etc/minordomo.conf. So you can use different configurations
for each mailinglist.

The file /etc/minordomo.conf looks like:

File /etc/minordomo.conf

# minordomo.conf - Configuration file for minordomo mailing list manager
# The used SMTP server -- because you are offline, you put localhost here
SMTP_server=localhost
# The domain name
domain=my.domainname.de
# The directory where the different mailinglists are placed
directory=/var/lib/minordomo
# The e-mail address of the administrator of the mailinglist. Because you are
# offline you have to place an official address here
admin=my.name@yahoo.de
# All lists that have to be archived. Empty field stands for no archived list,
# a * stands for all lists
archive=*
# You can get the list of all subscribed members of the list.
# Turn it off due to more privacy
list_cmd=
# In which list you can post is specified here
# A * stand for all lists
open_lists=*
# closed lists that can only be written to by the administrator
closed_lists=
# Maximum mail length. This restriction is turned off with a 0
max_size=0
# Does minordomo has to use the reply-to entry?
# Because you are offline, you have to set this to yes
set_re_to=yes
# Every letter gets this prefix in front of the subject
# A good pattern to find these mails in you mail client
subject_prefix=[listname]
# Homepage of the mailinglist
URL=http://www.homepage.com
# The place of the template file for the web frontend
# Empty stands for default
template=

Next you need two e-mail addresses on a public POP3 server in the
Internet. Choose majordomo@pop3server.de and
listname@pop3server.de. But the names are not important and
can be chosen freely. Also it is necessary that both addresses are
placed on the same server.

Then you have to add the users minordomo and
listname on you local machine. The mail is then forwarded from the
public POP3 server to these two.
Therefore you add the following lines in the file
/etc/aliases:

To make sure that the emails are forwarded from the Internet to the local
address you have to add the following lines to your
/root/.fetchmailrc (for a detailed configuration have a look at
fetchmail I
and fetchmail II)

Also to automate the fetch you would need an entry in the
/etc/ppp/ip-up (if it has not existed yet):

/etc/ppp/ip-up

fetchmail -q
fetchmail -d 300

Depending on you sendmail configuration the mail from the Internet is
directly sent to you or buffered in /var/spool/mqueue/.
If the second case is found on you machine you need an additional
entry sendmail -q in the /etc/ppp/ip-up at the end of it
(even if you had the same entry at the top of the file):

/etc/ppp/ip-up

sleep 200
sendmail -q

Now the mail coming from the members of the mailinglist is not just
spooled but send.
(Attention: SuSE owns one file where ip-up and
ip-down are merged. Please write the entries below the
entries of the part ip-up)

From now on you can subscribe to the mailinglist. To do this you write
a mail to majordomo@pop3server.de with the subject
subscribe listname. If you got the reply that you were added to the
list every mail you would send to listname@pop3server.de
would be automatically sent to all members of the mailinglist.
You find the list of all subscribed members in the file
/var/lib/minordomo/linuxnetmag/list.

Tips & Hints

If you switched on the option that an archive was created you could
copy the program minweb.pl into the cgi directory of your
web server. Then you get a comfortable web frontend to review the
sent mails.

The web frontend does only work on the server that archives the
mails and the administrator is the only one you can use the program.
If you want to make the archive public you should use sitecopy to put the
file on a public server.

Offline mailinglists have a slow flow of mails. For time critical
discussions this would be a bad solution.

With minordomo you can administrate more than one list, of course.
For every additional list you need a new subdirectory at
/var/lib/minordomo/, an additional e-mail address and a new
entry in the file /root/.fetchmairc and a new entry in
/etc/aliases.

The presented solution works with a permanent Internet connection as well.
The advantage would be that you can offer a mailinglist independently of
you server name. If you got a new domain name it would not disturb the
mail traffic at all.

In principle a use of majordomo is possible in an offline mode, too.
(Even the use of commands inside of the e-mail address would be supported if
you used a public POP3 address for every possible majordomo address.)