|
|
|
|
![]() printer-version |
Or you want to supply your Local Area Net with mail from the internet? Fetchmail does all this do automatically!
With fetchmail downloading is automated. Fetchmail is able to administrate the mail for all users, and with somemore configuration options for the whole LAN. Or if you have more than one mail account fetchmail is useful, too. Usually fetchmail is included in many Linux distributions otherwise you have to install it now (with S.u.S.E. install the package fetchmail.rpm in the net folder). After installing the package the configuration file has to be configured. The root user creates the file .fetchmailrc if it did not exist. >> touch .fetchmailrcAnd this file has to be fitted as follows:
In this file you include for every user the address where he stores
his mail and to whom the mail has to be forwarded on the local computer.
In the configuration file the passwords are not encoded. This
file must not be readable for normal user just for root. If you
forgot this fetchmail would remind you at once.
>> chmod og-xrw ~/.fetchmailrcyou change the file to a secure one. If you keep your mail on more than one POP3 server there is no problem to get the mail from there with an additional entry and to forward them to the same local user. For additional users on the local system you add another entry into the file .fetchmailrc . The downloaded mail is saved in the directory /var/spool/mail/ . Every user has his own file there where all of his mail is collected. Now you are able to read your mail with any mail reader. You have to configure the localhost or 127.0.0.1 of the POP3 mail server in your mail program. Then, you can download the mail from your localhost instead of from the internet and you do not need a telephone connection to the internet.
How to start the program for downloading the mail?
>> fetchmail -aThis command download the mail from the internet server and deletes the mail there. They are saved at the local POP3 server. If problems occurred you should add the options -v to get verbose information about the connection and to find the error faster. As soon as fetchmail works all right you are able to start the program as a deamon in the background. This is achieved with the command >> fetchmail -d 300The number stands for a time interval in seconds. After that many seconds fetchmail looks for new mail. This feature does not make sense if you are offline. To activate the deamon if you are online write this command in the file /etc/ppp/ip-up . Additional to the other commands you should add fetchmail -quitThe first command terminates a possibly running fetchmail and restarts fetchmail with the started interval. After disconnecting fetchmail should be stopped. Just add in /etc/ppp/ip-down the line "fetchmail -quit". This way fetchmail would start automatically if you connected and would stop if you disconnected to the internet. Now you have an automatically mail transportation system. How you can serve the whole local net with fetchmail will be explained in the next issue of LinuxNetMag. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||