333 lines
14 KiB
HTML
333 lines
14 KiB
HTML
<!--startcut ==============================================-->
|
|
<!-- *** BEGIN HTML header *** -->
|
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
|
|
<HTML><HEAD>
|
|
<title>A Quick and Easy Way to Set Up a Mailing List LG #72</title>
|
|
</HEAD>
|
|
<BODY BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#0000AF"
|
|
ALINK="#FF0000">
|
|
<!-- *** END HTML header *** -->
|
|
|
|
<CENTER>
|
|
<A HREF="http://www.linuxgazette.com/">
|
|
<IMG ALT="LINUX GAZETTE" SRC="../gx/lglogo.png"
|
|
WIDTH="600" HEIGHT="124" border="0"></A>
|
|
<BR>
|
|
|
|
<!-- *** BEGIN navbar *** -->
|
|
<IMG ALT="" SRC="../gx/navbar/left.jpg" WIDTH="14" HEIGHT="45" BORDER="0" ALIGN="bottom"><A HREF="qubism.html"><IMG ALT="[ Prev ]" SRC="../gx/navbar/prev.jpg" WIDTH="16" HEIGHT="45" BORDER="0" ALIGN="bottom"></A><A HREF="index.html"><IMG ALT="[ Table of Contents ]" SRC="../gx/navbar/toc.jpg" WIDTH="220" HEIGHT="45" BORDER="0" ALIGN="bottom" ></A><A HREF="../index.html"><IMG ALT="[ Front Page ]" SRC="../gx/navbar/frontpage.jpg" WIDTH="137" HEIGHT="45" BORDER="0" ALIGN="bottom"></A><A HREF="http://www.linuxgazette.com/cgi-bin/talkback/all.py?site=LG&article=http://www.linuxgazette.com/issue72/teo.html"><IMG ALT="[ Talkback ]" SRC="../gx/navbar/talkback.jpg" WIDTH="121" HEIGHT="45" BORDER="0" ALIGN="bottom" ></A><A HREF="../faq/index.html"><IMG ALT="[ FAQ ]" SRC="./../gx/navbar/faq.jpg"WIDTH="62" HEIGHT="45" BORDER="0" ALIGN="bottom"></A><A HREF="teo2.html"><IMG ALT="[ Next ]" SRC="../gx/navbar/next.jpg" WIDTH="15" HEIGHT="45" BORDER="0" ALIGN="bottom" ></A><IMG ALT="" SRC="../gx/navbar/right.jpg" WIDTH="15" HEIGHT="45" ALIGN="bottom">
|
|
<!-- *** END navbar *** -->
|
|
<P>
|
|
</CENTER>
|
|
|
|
<!--endcut ============================================================-->
|
|
|
|
<H4 ALIGN="center">
|
|
"Linux Gazette...<I>making Linux just a little more fun!</I>"
|
|
</H4>
|
|
|
|
<P> <HR> <P>
|
|
<!--===================================================================-->
|
|
|
|
<center>
|
|
<H1><font color="maroon">A Quick and Easy Way to Set Up a Mailing List</font></H1>
|
|
<H4>By <a href="mailto:%6C%61%77%72%65%6E%63%65%74%65%6F%40%6C%79%63%6F%73%2E%63%6F%6D">Lawrence Teo</a></H4>
|
|
</center>
|
|
<P> <HR> <P>
|
|
|
|
<!-- END header -->
|
|
|
|
|
|
|
|
|
|
<H2>1. Why do you need a mailing list?</H2>
|
|
|
|
<P>
|
|
Picture this:
|
|
</P>
|
|
|
|
<P>
|
|
You've just started working with your colleagues on a new project. After the
|
|
first meeting, everyone agrees that sending e-mails about each other's progress
|
|
to all the members in the group periodically is the way to go. Everybody leaves
|
|
the table, and you send out your first message to your colleagues' e-mail
|
|
addresses. Everything goes well for awhile... until somebody new joins the
|
|
group. Now everybody has to update their long list of addresses in the "To:"
|
|
field, some people forget, and the new person didn't receive all the e-mails
|
|
and starts complaining. Gradually, things start turning into a mess.
|
|
</P>
|
|
|
|
<P>
|
|
As things become more haphazard, you say to yourself, "Now, if only I can send
|
|
all my e-mails to a single address, and that e-mail will propagate out to
|
|
everybody else." Well, that is possible. What you need is a mailing list.
|
|
</P>
|
|
|
|
Most of us aren't strangers to mailing lists, especially if you're
|
|
an active or long-time participant in the Linux community. But trust me, there
|
|
are people out there who aren't familiar with mailing lists and how convenient
|
|
they can be.
|
|
|
|
<P>
|
|
Now, let's say you agree that you need a mailing list. But you don't
|
|
have time to set up one. If you have been a participant in a public and busy
|
|
mailing list such as Bugtraq, you'll notice that they run a mailing list
|
|
management program such as Majordomo or ezmlm. If you want a <I>simple</I>
|
|
mailing list, and you need it quick, you don't need to play around with those.
|
|
Plus, you don't really need the more complex features they offer. A standard
|
|
Linux system is sufficient for setting up a simple mailing list for a workgroup.
|
|
</P>
|
|
|
|
<P>
|
|
In this article, I'll discuss how to set up such a simple mailing list using
|
|
the standard Mail Transfer Agents (MTAs) that come with a standard Linux
|
|
distribution, such as sendmail, Postfix or exim. Remember, though, the keyword
|
|
is <i>simple</i>. That means that our mailing list will not have the fancy
|
|
features offered by the heavy duty mailing list management programs.
|
|
</P>
|
|
|
|
<P>
|
|
As an added bonus, I've written another article in this same Linux Gazette
|
|
issue that discusses how to set up a simple web-based archive of this mailing
|
|
list (it's entitled <A HREF="teo2.html">"Setting Up a Web-based Archive for a
|
|
Mailing List"</A>). But if a mailing list is all you need, and/or you don't
|
|
have time, this article is all you need to read.
|
|
</P>
|
|
|
|
<H2>2. Setting up the mailing list</H2>
|
|
|
|
<P>
|
|
Setting up the mailing list is pretty straightforward. I'll first talk about
|
|
what you need, and then proceed to the actual instructions on setting it up.
|
|
</P>
|
|
|
|
<H3>2.1 What you need</H3>
|
|
|
|
<P>
|
|
First, here's what you need to set up the mailing list:
|
|
</P>
|
|
|
|
<UL>
|
|
<LI> <B>A Linux system that is permanently connected to the Internet with
|
|
a static IP address, or your office internal network.</B> This is
|
|
pretty obvious, but I'm putting it here just in case! ;-) Additionally, this
|
|
system should be running 24 hours a day, 7 days a week, or at least during
|
|
the times of
|
|
the day when your workgroup will be mailing each other.
|
|
<LI> <B>A Mail Transfer Agent such as sendmail, Postfix or exim.</B> Most
|
|
Linux distributions should come with one of these by default.
|
|
</UL>
|
|
|
|
<P>
|
|
Once you've got all the requirements,
|
|
the very first thing you need to do is to check that your MTA is actually
|
|
running. I usually check this by running netstat as follows:
|
|
</P>
|
|
|
|
<P>
|
|
<PRE>
|
|
lteo@mybox:~$ <B>netstat -a | grep smtp</B>
|
|
tcp 0 0 *:smtp *:* LISTEN
|
|
</PRE>
|
|
</P>
|
|
|
|
<P>
|
|
If the system responds with that line, it usually means that your MTA is
|
|
up and running. If it is not running, you need to activate it. The actual way
|
|
to do that depends on the system. For example, on Debian run
|
|
"/etc/init.d/sendmail start". On Red Hat, run "/etc/rc.d/init.d/sendmail
|
|
start". (Your system may have the script in a different location.) To make it
|
|
permanent, do a "chmod +x /etc/init.d/sendmail" (or wherever). On Slackware,
|
|
you'll have to uncomment the lines that activate sendmail in /etc/rc.d/rc.M,
|
|
and either restart the system, or run it manually for now using the command in
|
|
that file.
|
|
</P>
|
|
|
|
<H3>2.2 Let's set it up!</H3>
|
|
|
|
<P>
|
|
The first thing you need to do is to think of a name for your mailing list.
|
|
For example, if the Linux box you're using is called mybox.example.com, you
|
|
can call your mailing list address "theproject@mybox.example.com".
|
|
Any e-mails sent to theproject@mybox.example.com will then be propagated to
|
|
all e-mail addresses registered to it. For the purpose of this article, let's
|
|
say we want the mails
|
|
that reach that address to go out to linus@mybox.example.com,
|
|
alan@example.net, and esr@example.org.
|
|
</P>
|
|
|
|
<P>
|
|
The next thing you need to do is to set up the MTA's aliases file. The
|
|
aliases file is usually stored as /etc/aliases or /etc/mail/aliases
|
|
depending on your Linux distribution. Once you locate it, fire up your
|
|
favorite text editor and edit it. You may see some default lines in that
|
|
file, such as "webmaster: root", "postmaster:root", and so on. Just ignore
|
|
those lines and scroll to the end of the file. Now add the following lines:
|
|
</P>
|
|
|
|
<P>
|
|
<PRE>
|
|
# The Project mailing list
|
|
theproject:
|
|
linus,
|
|
alan@example.net,
|
|
esr@example.org
|
|
</PRE>
|
|
</P>
|
|
|
|
<P>
|
|
You can now save and exit from your editor.
|
|
</P>
|
|
|
|
<P>
|
|
As you can see, we can just use the string "linus" for
|
|
"linus@mybox.example.com" since our machine is
|
|
mybox.example.com and linus is a user on the machine. You can
|
|
write comments by placing them after the # symbol. The # symbol must be the
|
|
first character in the line.
|
|
</P>
|
|
|
|
<P>
|
|
<B>Important!</B> Now here comes the extremely <I>important</I> step!
|
|
Depending on which MTA you
|
|
are using, you may need to run a command for your changes to the aliases
|
|
file for it to take effect. If you don't, the mailing list will <I>not</I> work!
|
|
The following table shows what command you need
|
|
to run after editing the aliases file.
|
|
</P>
|
|
|
|
<CENTER>
|
|
<TABLE BORDER="1" CELLSPACING="1" CELLPADDING="3">
|
|
<TR>
|
|
<TH>MTA</TH><TH>Command</TH>
|
|
</TR>
|
|
<TR>
|
|
<TD>sendmail</TD><TD><CODE>newaliases</CODE></TD>
|
|
</TR>
|
|
<TR>
|
|
<TD>Postfix</TD><TD><CODE>postaliases /etc/aliases</CODE></TD>
|
|
</TR>
|
|
<TR>
|
|
<TD>exim</TD><TD><EM>[No command needed.]</EM></TD>
|
|
</TR>
|
|
</TABLE>
|
|
</CENTER>
|
|
|
|
<P>
|
|
Congratulations! You should now have a working mailing list. To test it,
|
|
just send an e-mail to theproject@mybox.example.com, and see if
|
|
linus@mybox.example.com, alan@example.net, and esr@example.org get it.
|
|
Personally, I test my mailing lists using free webmail accounts just to see
|
|
if it really works.
|
|
</P>
|
|
|
|
<BLOCKQUOTE>
|
|
<P> <EM>[Note: example.com, example.net and example.org are domain names
|
|
reserved for testing per
|
|
<A HREF="http://www.rfc-editor.org/rfc/rfc2606.txt">RFC 2606</A>, and will
|
|
never be assigned to real sites. So watch the spambots harvest the addresses
|
|
above and send spam to nonexistent sites. Whee! -Iron]</EM>
|
|
</BLOCKQUOTE>
|
|
|
|
<P>
|
|
Adding and removing e-mail addresses is straightforward. Just use your
|
|
text editor and add or remove those e-mail addresses from the aliases file.
|
|
Again, remember to run that all-important command after editing the aliases
|
|
file to inform the MTA that you've made changes.
|
|
</P>
|
|
|
|
<P>
|
|
There is one thing you need to know about this mailing list, though. Unlike
|
|
the full-blown mailing lists run by majordomo or ezmlm, a third
|
|
party can send e-mails
|
|
to our mailing list address and it'll still be sent to our registered
|
|
recipients' e-mail addresses. Therefore, there may be a security issue here.
|
|
That's why I stressed so much that this mailing list is meant to be
|
|
<I>simple</I>.
|
|
But if you're using it within a small trusted workgroup, it should be fine.
|
|
Also, you may want to avoid revealing your mailing list address to the public,
|
|
both for security and privacy reasons, and also to avoid getting spammed.
|
|
</P>
|
|
|
|
<H3>2.3 Summary</H3>
|
|
|
|
<P>
|
|
That's about it regarding setting up the mailing list. Simple, isn't it? Just
|
|
to make sure you don't miss out anything, here's a short summary of our
|
|
previous discussion on setting up a mailing list:
|
|
</P>
|
|
|
|
<P>
|
|
<OL>
|
|
<LI> Make sure that your MTA is up and running. You can use the command
|
|
"netstat -a | grep smtp" to check this.
|
|
<LI> Choose a name for your mailing list, e.g.
|
|
theproject@mybox.example.com.
|
|
<LI> Add the mailing list addresses and register the e-mail addresses
|
|
in the aliases file (either /etc/mail/aliases or /etc/aliases depending
|
|
on your distribution).
|
|
<LI> If you're using sendmail or postfix, run "newaliases" or
|
|
"postaliases /etc/aliases" respectively. If you're using exim, you
|
|
don't need to run anything.
|
|
<LI> Test your mailing list by sending a test mail to
|
|
theproject@mybox.example.com.
|
|
</OL>
|
|
</P>
|
|
|
|
<H2>3. Parting notes</H2>
|
|
|
|
<P>
|
|
<EM>That's it! I hope you find your brand new mailing list useful. I've used
|
|
this method of setting up mailing lists many times for my workgroups, friends,
|
|
and whenever there's a need for a simple mailing list. Of course, this is
|
|
just one way of setting up such a mailing list. If you've found this
|
|
method useful, or if you have any comments or suggestions, please feel free to
|
|
write to me about them. I would really like to hear from you.</EM>
|
|
</P>
|
|
|
|
<P>
|
|
Remember, if you want to know how to set up a web-based archive of this list,
|
|
you can read <A HREF="teo2.html">"Setting Up a Web-based Archive for a Mailing
|
|
List"</A>, also in this issue of Linux Gazette.
|
|
</P>
|
|
|
|
<P>
|
|
Till then, have fun!
|
|
</P>
|
|
|
|
<!-- *** BEGIN bio *** -->
|
|
<SPACER TYPE="vertical" SIZE="30">
|
|
<P>
|
|
<H4><IMG ALIGN=BOTTOM ALT="" SRC="../gx/note.gif">Lawrence Teo</H4>
|
|
<EM>Lawrence Teo is a Ph.D. student at the University of North Carolina at
|
|
Charlotte. He researches on intrusion detection
|
|
and critical infrastructure protection technologies with his
|
|
research unit, the Laboratory of Information Integration, Security, and
|
|
Privacy (LIISP). Lawrence has previously worked as a contract software
|
|
engineer at Lycos, Singapore and as a research assistant at DSTC in Melbourne,
|
|
Australia. He holds an Honors Degree in Bachelor of Computing from Monash
|
|
University in Melbourne, Australia. You can send him e-mail at
|
|
<A HREF="mailto:%6C%61%77%72%65%6E%63%65%74%65%6F%40%6C%79%63%6F%73%2E%63%6F%6D">lawrenceteo<SPAM>@lycos.com</A>.</EM>
|
|
|
|
|
|
<!-- *** END bio *** -->
|
|
|
|
<!-- *** BEGIN copyright *** -->
|
|
<P> <hr> <!-- P -->
|
|
<H5 ALIGN=center>
|
|
|
|
Copyright © 2001, Lawrence Teo.<BR>
|
|
Copying license <A HREF="../copying.html">http://www.linuxgazette.com/copying.html</A><BR>
|
|
Published in Issue 72 of <i>Linux Gazette</i>, November 2001</H5>
|
|
<!-- *** END copyright *** -->
|
|
|
|
<!--startcut ==========================================================-->
|
|
<HR><P>
|
|
<CENTER>
|
|
<!-- *** BEGIN navbar *** -->
|
|
<IMG ALT="" SRC="../gx/navbar/left.jpg" WIDTH="14" HEIGHT="45" BORDER="0" ALIGN="bottom"><A HREF="qubism.html"><IMG ALT="[ Prev ]" SRC="../gx/navbar/prev.jpg" WIDTH="16" HEIGHT="45" BORDER="0" ALIGN="bottom"></A><A HREF="index.html"><IMG ALT="[ Table of Contents ]" SRC="../gx/navbar/toc.jpg" WIDTH="220" HEIGHT="45" BORDER="0" ALIGN="bottom" ></A><A HREF="../index.html"><IMG ALT="[ Front Page ]" SRC="../gx/navbar/frontpage.jpg" WIDTH="137" HEIGHT="45" BORDER="0" ALIGN="bottom"></A><A HREF="http://www.linuxgazette.com/cgi-bin/talkback/all.py?site=LG&article=http://www.linuxgazette.com/issue72/teo.html"><IMG ALT="[ Talkback ]" SRC="../gx/navbar/talkback.jpg" WIDTH="121" HEIGHT="45" BORDER="0" ALIGN="bottom" ></A><A HREF="../faq/index.html"><IMG ALT="[ FAQ ]" SRC="./../gx/navbar/faq.jpg"WIDTH="62" HEIGHT="45" BORDER="0" ALIGN="bottom"></A><A HREF="teo2.html"><IMG ALT="[ Next ]" SRC="../gx/navbar/next.jpg" WIDTH="15" HEIGHT="45" BORDER="0" ALIGN="bottom" ></A><IMG ALT="" SRC="../gx/navbar/right.jpg" WIDTH="15" HEIGHT="45" ALIGN="bottom">
|
|
<!-- *** END navbar *** -->
|
|
</CENTER>
|
|
</BODY></HTML>
|
|
<!--endcut ============================================================-->
|