Now we go a step further and supply a whole network with mail.
We supplied all users on a local PC with mail in the last issue. Now we want to build up a mail server (protocol POP3) for a heterogeneous network. The way shown in the following picture is very useful for a small network which is not connected to the Internet all the time.
The network may
look like the following description:
Those users who
are also working at the central Linux PC that makes the Internet
connections (in the case that this PC is not only used as a
server but also as a client) write a configuration similar to the
first issue. You create .fetchmail; add fetchmail -d 150 into /etc/ppp/ip-up and you are ready.
you have the
opportunity to create a new group. It makes sense to put all
users who just need a POP3 account into one group. We would
create a group called mailer if it does not already existed.
There you add a
new user.This happens in the same way as if you create users for
your local PC. The group they own is the group "mailer",
their home directory can be /tmp or /dev/null because they are
not allowed to put files on the server. The used login shell
should be /bin/passwd. This way the users do not have a direct
access to the system, just the ability to change the password if
they log in.
Now the users are
well known on the POP3-server and we are able to enter them into
the /root/.fetchmailrc .
In this file you
entered all local users and now you add all other users who are
using the Linux computer as a POP3 server.
Before the users get their mail, they have to configure Netscape, IE Outlook or whatever they use as a mail reader. The POP3-server is now the Linux -PC and they have to enter an IP number or the host name into the corresponding field. The password for your mail is now the password on the Linux POP3-server and also the user name. To get correct replies, you should enter your Internet e-mail-address in the "Reply-to address" field somewhere in your mail client (e.g. [email protected]).
configuration was the last step. Now you get your mail even if
the Linux-PC is not connected to the Internet. You do not
need to dial up a connection just because one single user wants
to read his mail.
In many private networks the server is switched off during night. Then you are no longer able to get your mail from another computer, especially not at a M$ PC. Linux offers a solution. You could avoid these kinds of problems if you install a POP3 server on your Linux client that looks for mail regularly at the central POP3 server and delivers it to the local users. The mail will be transported from server to server if a network connection exists. If the server is not active, the client will wait until the server will be available again and get the mail.
Therefore, you again need a .fetchmailrc that gets the mail from the central Linux POP3-server and delivers it to the local users. (Meanwhile, the con figuration of this file should be known). In addition, the fetchmail daemon has to be started during the boot process. This happens either with an entry in /sbin/ init.d/boot.local where you add the entry "fetchmail -d 150",or you write a init-script (this is the clearest way). In addition, you could use a cron-call to look for mail.