![]() |
Davrom Consulting Pty LtdEstablished Since 2001PO Box 1644, Sunnybank Hills, Qld, 4109 Phone/Fax: +61-7-32720267 ABN: 81 096 990 804 |
The following article was written by David.M.Clark for SCO World Magazine.
Title: Built-in E-mail on Your ServerOften I have seen customers go out and purchase third party products simply with the goal to provide an e-mail based system for their office or business. They are often amazed when I tell them that they have a fully functional e-mail server sitting "ready to go" on their UNIX server.
Many people have the perception that because they are running PC's in a Microsoft or Netware LAN, they are forced to purchase and implement e-mail systems to match their PC environment. Here again the UNIX server is just sitting there waiting for them to simply point their e-mail client software to the UNIX server. In so doing they are able to utilize the sending of e-mail via SMTP (Simple Mail Transfer Protocol) and the receiving of e-mail via POP (Post Office Protocol). The SMTP and POP protocols form the base Internet standard for sending and receiving e-mail and as the UNIX IP environment gave us the Internet, what better server to use in a local scenario.
For the most part, you do not have to make any modifications to the e-mail system on most UNIX servers for local e-mail access to function correclty. SCO Unixware7, SCO OpenServer and Linux normally require you to start up the e-mail server manager to make some initial settings such as specifying the domain name, identifying a smart host (server that resolves e-mail addresses not known to the local domain - normally not needed) and enabling/disabling DNS resolution (here again normally not needed). For the most-part the e-mail system will run without modification with some exceptions to this rule covered later in this article. All SCO platforms, similar to Linux, offer Sendmail as their Mail Transfer Agent (MTA). SCO OpenServer also offers the earlier product called MMDF (Mulitchannel Memorandum Distribution Facility), however, Sendmail is the most popular MTA on UNIX platforms worldwide.
Local Area E-mailThe user sends and receives e-mail by setting up their e-mail client to point to the UNIX server's name/IP address and provide the UNIX server with a valid login name and password to manipulate e-mail. The e-mail client is called a Mail User Agent (MUA). Some common PC based MUA's are Eudora (Lite and Pro), Netscape Messenger and Microsoft Outlook.
UnixWare7 provides a highly configurable "Mail Manager" utility under the 'scoadmin' interface and the main components of Sendmail are already pre-configured on installation.
In the case of OpenServer, if you have installed MMDF you will need to run the command "mkdev mmdf" as the 'root' user after placing the PC client names and IP addresses in the /etc/hosts file. This will build the /usr/mmdf/table/smtp.chn file so the UNIX server will accept e-mail access from the client PC.
In the case of Sendmail on OpenServer, you will need to run the "mkdev cf" command as the 'root' user and ensure that you select options '5 - Miscellaneous Items --> 4. Is this machine on the Internet? [n]' and answer "y" to ensure the SMTP ruleset for Sendmail is activated.
If the users are working with either dumb terminals or PC's running dumb terminal emulation software (Esker TUN, Century TinyTERM or James River ICE-TEN+) to access to the UNIX server, then SMTP/POP access will not be required. Dumb terminal access directly communicates with the login user's mailbox file. The mailbox file, bearing the user's login name, normally resides on the UNIX server along a path name such as /usr/spool/mail, /var/spool/mail or /var/mail. It is important to be aware that the POP protocol also manipulates this file remotely.
Some users may find the standard UNIX mail program (mailx) somewhat difficult to manipulate despite its diverse configurability. SCO OpenServer provides a very simple to use mail program called "scosh email" and contains both global and individual setup features such as mail books for common addresses. Some public domain mail programs such as Pine and Elm are very popular and are provided on SCO Skunkware or on multiple sites on the Internet.
It is important to remember that you can combine to use of dumb terminal based e-mail programs and networked PC e-mail programs to allow users to communicate via the one central UNIX server. The only limitation here is that the dumb terminal users will not be able to view some e-mail file attachements such as graphics or non-ASCII documents. Those users who are seated at the UNIX console screen can take advantage of the GUI environment e-mail programs provided by the respective UNIX platform. One useful public domain e-mail program for the X-Windows GUI is 'kmail' which is part of the KDE Desktop software. KDE is provided on SCO Skunkware and is an integral part of OpenLinux eDesktop/eServer 2.x from Caldera.
Site to Site E-mailIn the case where there is a central office and distributed branches the access to e-mail uses the same client methods discussed so far but will operate over a different methodology of connecting to the server. In the case where there are UNIX servers in each location two methods that can be used are PPP (or SLIP) and UUCP (Unix to Unix CoPy). PPP and UUCP allow the passing of e-mail between the UNIX servers over modem/serial lines. Although UUCP is a very old protocol, it is the only option available for serial based 'host' systems where TCP/IP is not installed. UUCP is very robust and requires next to no intervention once implemented.
SCO OpenServer Enterprise, SCO Unixware7 and Linux support the use of PPP dialup to connect to remote locations. With UnixWare7 and Linux, the PPP functionality simply needs configuration via the GUI. In the case of SCO OpenServer 5.0.4 and 5.0.5 it is recommended that you remove the 'native' PPP package with the Software Manager and install MorningStar PPP. MorningStar PPP is a more robust PPP product and is bundled at no extra charge with the SCO 5.0.4 and 5.0.5 Enterprise media.
If the organization is fortunate enough to have ISDN/Frame Relay between each location, standard TCP/IP SMTP and POP protocols apply.
If there are no UNIX servers at each remote location then connectivity will depend on the current method used to link the locations. Dumb terminals will still access e-mail using the UNIX based e-mail programs. PC's, if using PPP, will use SMTP and POP in the same way as local PC's. A Windows PC can use the standard Windows PPP dialup to access a UNIX server provided the UNIX server is setup for PPP dialin.
Remote branches may like to consider the use of products such as the Stallion EasyServerII or Stallion ePipe to grant remote access to branch locations. This would allow dumb terminals and PC's to use the respective methods of e-mail communication. The Stallion ePipe also allows users to connect to their central office via a secure tunnel on the Internet.
DNS IssuesIf the UNIX server being used does not require the use of DNS (Domain Name Services) to resolve names on the network, it should be turned off in the e-mail setup as this may be the factor that results in e-mail not being delivered.
Local e-mail is normally not affected but in the case of SCO OpenServer, some manual modifications to the Sendmail setup is required. SCO Technical Article # 107669 which can be access at http://www.sco.com/ta details changes to the /usr/lib/sendmail.cf file to disable DNS. The article details modifications to the /usr/lib/sendmail.cf file but a more fail-safe method would be to edit the /usr/lib/sendmail.d/sendmail.src file. The sendmail.src file is used to re-generate the sendmail.cf file any time the 'mkdev cf' command is executed. The changes required are to change the "OI" line to "OI-DNSRCH" and add the line "O ServiceSwitchFile=/etc/service.switch". You also need to create the file /etc/service.switch and place the enty "hosts files" in this file. This causes Sendmail to resolve e-mail addresses locally.
Internet E-mail GatewayIf your UNIX server is to act as an Internet e-mail gateway then you will need to ensure that you are familiar with how to setup the PPP connection to the ISP. In most cases this is done via dialup PPP which is achieved in Unixware7 by setting up the WAN section of the Network Manager. For SCO OpenServer using MorningStar PPP or SCO PPP you can use the Internet Configuration icon on the GUI desktop - be prepared to modify files manually should your connection not work. For Caldera OpenLinux 2.x, you need to create the /usr/sbin/ppp-on file which will contain your 'chat' script to establish connection. The methods used to establish Internet connection are the same those for setting up site-to-site PPP in the branch to branch topology.
For Internet connection you will need to tell Sendmail or MMDF of the existence of the "smart host" (MMDF uses the word "badhost" and "baduser" for this same mechanism). This "smart host" will be a server that your ISP will provide you with the address information. Any e-mail addresses that do not match the local e-mail domain (eg., xyz@mycomp.com) will be routed to this server. As ISPs are apt to change the IP address of the "smart host" it is better to allow DNS to resolve this server name.
You will need to place entries in the local /etc/resolv.conf file so that DNS lookup will take place for unknown e-mail addresses. A typical resolv.conf file comprises of:
domain xyz.com nameserver 203.18.111.19 10.80.80.5 hostresorder local bind
The first line denotes the local domain name. The second line contains the IP addresses of the DNS servers used to resolve domain names. The third line tells the server to look in the /etc/hosts file first before attempting to resolve the IP address/name via DNS. In the case of Unixware7 the hostresorder line is not used and the ordering information is stored elsewhere in the setup. Other UNIX systems may contain the same information elsewhere.
Handling E-mail Address AliasesAll e-mail client programs (MUA's) offer some form of e-mail address book so users can group together common lists of recipients and use simple 'alias' or token names instead of having to type long e-mail addresses. While this is useful a better approach would be for the administrator to maintain a master list stored under the control of Sendmail or MMDF (MTA's).
The syntax of the MTA's 'aliases' file is very simple and can be easily maintained with some additional shell scripting or direct editing of the file. Some common locations of the 'aliases' file are /etc/mail/aliases for Unixware7 and /usr/lib/mail/aliases or /usr/mmdf/table/alias.n for OpenServer. The syntax of the 'aliases' file is in the following format:
fred.bloggs: fbloggs@sunshine.com favourites: paulf, susanm, rom, teris@scoworld.com
The first field is the name that the user types in at the "To:" prompt and the resulting e-mail is sent to the address(es) in the second field.
After adding entries to the 'aliases' file you will need to execute the 'newaliases' command or the '/usr/mmdf/table/dbmbuild' command to re-hash the text files into a format that the MTA's can use.
Pine and other MUA's often allow for a global address book to be shared and maintained by all users.
SummaryOnce again UNIX has lived up to the reputation of being "The Quiet Acheiver". When you consider that it bundles a fully implemented e-mail system at no extra cost to the user-base, delivering a highly flexible system that serves the needs of both local, LAN and WAN based users, why would you pay to implement any other solution.