|
|
This article is available in: English Castellano Deutsch Francais Nederlands Portugues Russian Turkce |
by Guido Socher About the author: Guido has been using UUCP for many years and thinks that it is the best way to connect the mail system on your computer to the Internet. Content: |
Abstract:
UUCP is one of the very old protocols of the Internet. It is in many cases now replaced by more modern protocols but it is still one of the best solutions for sending e-Mail from and to a dialup sites. Unfortunately many people connecting from home via a dialup link are not aware of the great potentials of UUCP and do not demand this service. As a consequence less service oriented Service providers do not offer UUCP these days.
UUCP is very old protocol and was originally used to copy any type
of files between Unix systems. Thus the name: "Unix to Unix Copy".
These early computer systems were not permanently connected via a
network. Instead dialup modem connections where used to exchange
data in regular time intervals.
To copy the file mynotes.txt to a remote system called "mars" one would
use the command:
uucp mynotes.txt mars!~/mynotes.txtThis copies for the moment the data just to a "spool directory" and later on when a dialup connection is made to that site the files will get physically copied over.
cat somedata.txt | uux - mars!rnewsAgain the command rnews would not be executed immediately on the remote site but only later on when a dialup connection to "mars" was established. The command would be parked in the local "spool directory".
telnet uucp.my-friendly-isp.com 540You will get then something like this:
Trying 1.2.3.42... Connected to uucp.my-friendly-isp.com Escape character is '^]'. login:Type login name and password:
Trying 1.2.3.42... Connected to uucp.my-friendly-isp.com Escape character is '^]'. login: linux Password: tux.1234 Shere=mficAfter a successful login the other side answers with "Shere" which stands for System here followed by the name of the remote system (check against the data from your ISP).
^] telnet> q Connection closed.Now you know that your account is setup correctly.
# call file # The format is just remote-system-name login-name password. mfic linux tux.1234
# port file # No need to change this type tcp port tcp service 540
# sys file # defines information about the remote system # system name of your ISP: system mfic # the server of your ISP: address uucp.my-friendly-isp.com # do not change the next 3 lines, see documentation of Tailer UUCP # for details time Any 2 port tcp chat-timeout 60 # allowed commands: commands rmail # take the password and user name from the call file: call-login * call-password * # do not change the next line: chat ogin: \L assword: \P #
# The config file just defines the path names # of the other files and directories as well as your # system name. # Your system name: nodename oblelix # max number of request from other systems to execute in parallel: max-uuxqts 2 # The UUCP spool directory spool /var/spool/uucp # The other fields are usually already compiled into # as defaults: # pubdir /var/spool/uucppublic # logfile /var/log/uucp/Log # statfile /var/log/uucp/Stats # debugfile /var/log/uucp/Debug # callfile /etc/uucp/call # ....
After saving the config files run the command "uuchk". It's probably in
sbin: /usr/sbin/uuchk
The output is a summary of your configuration including some default
values that you have not set. The hostname of your ISPs server,
uucp.my-friendly-isp.com in our example, appears as "phone number":
Phone number uucp.my-friendly-isp.comThis is strange but correct for UUCP over TCP/IP. Check especially that all the directories, log files, debug files etc are pointing to the right place and belong to the user uucp.
Now you should be able to receive mail via UUCP but your local mailer (MTA=mail transport agent) still needs to know that it is allowed to handle mail for the domain registered with your ISP. In our case this domain is miller.my-friendly-isp.com. The configuration of this domain depends on your MTA. In sendmail you need to write miller.my-friendly-isp.com on a single line in the file /etc/sendmail.cw:
# sendmail.cw define the domains for which we handle mail miller.my-friendly-isp.comNow we are ready to test receiving e-mail via UUCP. Sending out mails will not yet work because sendmail is not fully configured yet.
/usr/sbin/uucico -x 11 -S mficmfic is the UUCP system name of my-friendly-isp.com.
Run the command "uulog". It will print a more compressed summary about the mails received via UUCP/rmail.
#divert(-1) # `This is config sends outgoing mail via uucp using /usr/bin/uux # # to generate a sendmail.cf out of this .mc file use the sendmail sources # and run m4 thisfile.mc > sendmail.cf.' divert(0) include(`../m4/cf.m4') VERSIONID(`UUCP, Jan 28 2001, without DNS') undefine(`BITNET_RELAY') undefine(`DECNET_RELAY') undefine(`UUCP_RELAY') OSTYPE(`linux') MASQUERADE_AS(miller.my-friendly-isp.com) MASQUERADE_DOMAIN(localdomain) MASQUERADE_DOMAIN(localhost) # ` add any local hostnames here:' MASQUERADE_DOMAIN(philosophus) # ` needed if you use an internal domain that does not exist: ' FEATURE(`masquerade_envelope') FEATURE(always_add_domain) # ` read allowed domains from cw file: ' FEATURE(use_cw_file) FEATURE(local_procmail) # `important for uucp:' FEATURE(accept_unresolvable_domains)dnl # `the /etc/passwd entry: mail:*:8:12:mail:/var/spool/mail:' define(`confDEF_USER_ID',``8:12'') define(`confSAFE_QUEUE',`True') define(`confDELIVERY_MODE',`background')dnl # 'replace mfic by the UUCP system name of your ISP:' define(`SMART_HOST',uucp-uudom:mfic)dnl define(`confSERVICE_SWITCH_FILE',/etc/service.switch)dnl define(`confHOSTS_FILE',/etc/hosts)dnl define(`UUCP_MAILER_MAX',1024000)dnl MAILER(procmail)dnl MAILER(local)dnl MAILER(smtp)dnl MAILER(uucp)dnlAdapt the file to your situation and compile it with the command:
m4 sendmail-uucp.mc > sendmail.cfCopy the sendmail.cf file to /etc and restart sendmail with
/etc/rc.d/init.d/sendmail restartThe above path for the init script is for redhat/mandrake. It's different for Suse, Debian etc...
hosts files aliases filesNow send an E-mail to somebody. You can do this with your favorite mail program or directly from the unix command line using:
echo "hello john, just testing..." | Mail john@somewhere.orgThis mail will not directly be send out. Instead it will be queued in the UUCP system. You should see it if you run:
uustat -auustat will print:
mfic.CRJjd4uAAAPs mfic joe 07-24 20:19 Executing rmail john@somewhere.org (sending 50 bytes)Next run
/usr/sbin/uucico -x 11 -S mficmfic is again the UUCP system name at my-friendly-isp.com. You can now watch the Debug file and observe how the mail is sent out.
#!/bin/sh hostn=uucp.my-friendly-isp.com # first check that the server of my ISP is reachable. # This requires a more recent version of ping where you can # specify the timeout: if ping -w 3 -qn -c 1 $hostn > /dev/null ; then /usr/sbin/uucico -S mfic #sleep 1 #uulog -s mfic -5 else echo "ERROR: $hostn is down" exit 1 fiMake the script executable with "chmod 755 /usr/bin/uumail" and run it manually to see that it works.
pop-3 stream tcp nowait root /usr/sbin/tcpd ipop3d imap stream tcp nowait root /usr/sbin/tcpd imapdIf you have xinetd then you need to create an appropriate config file for this service (see as well the LinuxFocus article 175 on this subject). Remember as well to enable access in the /etc/hosts.allow file if users access mail from other host in your local LAN:
# hosts.allow , tcp wrapper config file # anybody can get access to imap: imapd: ALL # pop3 is only allowed from 2 hosts: ipop3d: 10.0.0.1, 10.0.0.2, 127.0.0.1
Finding a good and reliable Internet Service Provider for UUCP is
sometimes not easy especially since most ISPs target
at Mr. Noclue Windowspreinstalled.
I know 2 rather good ISPs in Germany that do offer
E-mail over UUCP:
At LinuxFocus.org we can as well provide e-mail over UUCP to a limited number of friendly Linux fans, if you join our organization and support us financially and/or work with us regularly. Contact me if you are interested.
A good way to find a suitable ISP in your country might be to just try a search in Google or any other search engine. The smaller more service and customer oriented ISPs will most likely have e-mail over UUCP as a product.
|
Webpages maintained by the LinuxFocus Editor team
© Guido Socher, FDL LinuxFocus.org Click here to report a fault or send a comment to LinuxFocus |
2001-09-06, generated by lfparser version 2.17