- China's TCL Overtakes Samsung in Premium Market For Ultra-Large TVs
- This VPN Lets Anyone Use Your Internet Connection. What Could Go Wrong?
- Is There a Brain Microbiome?
- Russia Space Chief Says Country Will Fly On Space Station Until 2030
- Waymo's Driverless Cars Are Apparently an Insurance Company's Dream
- Fortifying Linux Web Applications: Mastering OWASP ZAP and ModSecurity for Optimal Security
- Unlocking the Full Potential of Linux's Most Versatile Search Tool
- Robotic Vision in Debian: Mastering Image Processing and Object Recognition for Intelligent Robots
- Linux Voice Assistants: Revolutionizing Human-Computer Interaction with Natural Language Processing
- Mastering OpenSSH for Remote Access on Debian Like a Pro
IMPORTANT:
This page is obsolete since 2003.
For my personal developments, see my
github or my
private git server.
You may also have a look at my
Stack Overflow
and other Stack Exchange Q/A
communities.
This document is Copyright © 2000-2003 Bruno Raoult.
Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation; with no Invariant Sections, with no Front-Cover Texts, and with no Back-Cover Texts. A copy of the license is included here.
Disclaimer
I will not accept any responsibility for anything happening to you, your cat, your computer, your house, your wife, your neighbours, anybody/anything else, before/while/after reading this document or any other page written by me or anybody else.
You have been warned.
You will find here some hints about some internet configurations, which may be useful. They concern mainly people who have a PPP connection, and would like a permanent-connection-like configuration.
You will not find here a list of links, nor a complete description of your system, but just a description of my configuration, and how I made the things work. For your information, I use Suse 6.1, and these hints will probably need some updates for other systems. Please contact me for such updates, or for any mistake you will probably find...
A PPP connection has a well-known problem: IP address changes each time you connect. A second problem is that you need a personnal action to run some important actions, like retrieving mail, or sending mail you prepared off-line. These actions may be simple (just running netscape is enough to retrieve your email), or may need some more attention (how to prepare an email off-line to send it later?).
Happily, Unix, and its little brother Linux have solved the problem for a long time. Some lines in a configuration file are generally enough to change your life!! So just have a look on these pages:
fetchmail and sendmail, or how to forget forever that you do not have a permanent connection: Your emails will be retrieved and sent automatically, when you are connected. An example of Netscape configuration is also given, to use the new features.
You want your friends to find you easily, and you hate to launch these silly ICQ-like products just to get an IP address? Have a look on my GnuDIP configuration.
Introduction
The use of fetchmail will permit to get email from your pop server(s) without any local mailer (such as Netscape). Your provider stores as usual your email to your pop account, then fetchmail will get it, and send it to sendmail. Then it will be stored to your local mailbox, which will be read by your mailer (such as mail, netscape, etc...).
You must first download, compile, and install fetchmail to your system. It can be found at:
http://www.tuxedo.org/~esr/fetchmail
Fetchmail configuration
There are many ways to configure fetchmail, but my purpose is to start it at PPP startup, and to stop it when PPP link is down. Running fetchmail as root will permit to use ip-up and ip-down to start and stop fetchmail. This configuration permits also to fetch mail for more than one user, if you have many POP accounts.
To configure fetchmail this way, create a .fetchmailrc file in /root directory, with the following lines:
set daemon 60 poll popserver protocol pop3 username login password passwd is yourlogin fetchall
This will ask fetchmail to run in daemon mode, and get new mail each minute.
Of course, replace popserver, login, and passwd with your personnal POP information. Yourlogin is your local login name. The fetchall option is maybe not necessary, but is required for some silly pop servers, like my provider's!
If you have more than one account, or more than one user on your machine, just add one poll line in this file for each of them.
This file should have 600 mode, to prevent anyone to access this information (which contains passwords).
Fetchmail startup
To start fetchmail when ppp link goes up, and stop it when the link goes down, just add the following lines in the corresponding files:
/etc/ppp/ip-up:
########################################### fetchmail logger starting fetchmail... PATH=/usr/local/fetchmail/bin:$PATH; export PATH HOME=/root; export HOME fetchmail
/etc/ppp/ip-down:
killproc() { pid=`ps auxww | grep $1 | egrep -v grep |awk '{print $2}'` if [ A"$pid" != A"" ] then kill $pid fi } ########################################## fetchmail logger stopping fetchmail... killproc fetchmail
Attention The killproc() given here is very simple, and could do more than you want... It will kill all processes which have the argument (here fetchmail) in the name or command line. Suse distribution gives a most robust killproc in /sbin, but it needs the full executable path to run. Redhat users could find a good killproc() function in /etc/rc.d/init.d/functions.
Fetchmail test & debug
To test fetchmail, just start PPP. Check that fetchmail has also been started.
Then send email to your internet account (with netscape or mail, for instance - the important is that this email goes to your provider), and check that you receive it in your local mailbox (in /var/spool/mail).
In case of trouble, add the following options to fetchmail:
fetchmail -k -v -v -L /tmp/fetchmail
The double -v option in startup asks for a full verbose output (which will be sent to /tmp/fetchmail in this case ). -k is necessary for tests, to ask fetchmail to keep all mails on server (just in case!!). After testing, you may remove these options.
Check your logfile, and try to determine the problem.
It is not mandatory to use sendmail as delivery method, but it may be useful, as this will help you to prepare email off-line, and let sendmail manage delivery.
Introduction
By defaut, sendmail will try to send email directly to the correct domain. You may let it work this way, or ask it to send all emails to your provider smtp server.
If you choose the second method, the only setup is to modify your sendmail.cf file and setup a "Smart relay host". Edit sendmail.cf file, and find a section looking like:
# "Smart" relay host (may be null) DS
Just change the second line to this:
DSsmartrelay.smartdomain
smartrelay.startdomain is the address of your provider's smtp server (for instance smtp.dti.ad.jp).
By default, sendmail will run its queue every hour (startup parameter -q1h). If you want to shorten this time, and make sendmail try more often to flush its pending queue, replace this parameter with for instance -q5m or -q10m, which will respectively run the queue every 5 or 10 minutes. This change has to be made in /etc/rc.d/init.d/sendmail.
Sendmail test & debug
If you just made changes to sendmail.cf file, stop then restart sendmail.
You can now use the following commands to test your configuration:
br> sendmail -bv prout@poil.com prout@poil.com... deliverable: mailer relay, host smtp.dti.ad.jp, user prout@poil.com br> sendmail -bv br br... deliverable: mailer local, user br
The first line is a test of mail to an outside domain. The answer should show that sendmail will send it to your relay host (or directly to the recipient's domain, if you decided to keep original configuration). The second test is a local address (your login), and sendmail should tell you that it will deliver it locally.
Introduction
This page explains how to setup netscape mail configuration after your fetchmail & sendmail configurations are changed and working. Two changes have to be made: Incoming & outgoing mail configurations.
Netscape incoming mail configuration
Pop access should be removed from netscape, and replaced by movemail access (which gets mail from your local spool mail directory):
Go to Preferences menu, then Mail &Newsgroups, and Mail Servers.
In Incoming Mail Servers section, remove all existing servers, and add a movemail service.
/var/spool/mail directory access mode should also be changed to 1777, with the following command:
# chmod 1777 /var/spool/mail
Netscape outgoing mail configuration
You have also to change netscape Outgoing Mail Server, and replace your provider's mail server by localhost: This change will force a delivery to your local sendmail.
Netscape test
To test this configuration, just use netscape to send you an email (with your complete internet address). You should be notified later that you received it.
Introduction
Many systems give you a way to manage a dynamic IP address. GnuDIP is one of them, and here is the configuration page. The idea is simple: You have a personnal DNS name (like yourmachine.dyn.cheapnet.net), and, each time you connect, you will assign it your new IP address. Then your friends know easily what is your IP address, by accessing your host name (with an URL, ping, or any connection you usualy need).
GnuDIP configuration
Nothing is more simple. First, you need to register to GnuDIP server. Suppose your machine name is proutTM. You can already send your new machine name (prout.dyn.cheapnet.net) to your friends, as they will soon be able to see you with this address...
Now, download this perl script, which will permit you to change your IP address... Copy it to /etc/ppp directory, and change its mode to 755. Now, edit /etc/ppp/ip-up file, and add the following section in it:
########################################## gnudip logger Sending Dynamic IP address... PATH=/etc/ppp:$PATH; export PATH HOME=/etc/ppp; export HOME gdipc.pl | logger
Then, run the following commands (as root):
# HOME=/etc/ppp; export PATH # cd etc/ppp # gdipc.pl -c
And fill your GnuDIP information. That's it!!
If many of your friends use GnuDIP, you should better change your /etc/resolv.conf to make this domain a default search domain. Just add the line:
search dyn.cheapnet.net
If you already had a search line in the file, just add dyn.cheapnet.net at the end of the line.
Attention: Never change /etc/ppp/.GnuDIP2 (GnuDIP configuration file) by hand. A bug in perl script will force you to re-run the configuration (gnudipc.pl -c).
ToDo: To find an elegant way to kill your IP address before the ppp connection goes down. I don't see any other solution than having a script which first removes your IP address, then kill the connection. I don't like it...
GnuDIP test & debug
No idea here... Everything is perfect. You can run gdipc.pl by hand to check that it can update your address, and check it with nslookup.