|
|
1.1 ! root 1: This directory contains the files for delivermail. On some ! 2: installations it may also contain the source files for ! 3: auxiliary mailers. ! 4: ! 5: The approximate description of each file is as follows: ! 6: ! 7: TO_BE_DONE New features to be put in (maybe) at some time. ! 8: addr.c Routines to manipulate addresses and address ! 9: lists. ! 10: alias.c Does name aliasing in all forms. ! 11: alias.c.save An old version which has a tentative (and later ! 12: rejected) method of mail forwarding. ! 13: arpa-mailer.8 Documentation for arpa.c. ! 14: arpa.c The auxiliary mailer for the ARPANET. ! 15: arpadate.c A subroutine used by delivermail & arpa.c which ! 16: creates ARPANET standard dates. ! 17: bmove.c A core-to-core move. This is in a seperate file ! 18: because it can easily be replaced by a blindingly ! 19: efficient version on Vaxes. ! 20: conf.ucb.c Our configuration file. This uses compilation flags ! 21: from <whoami.h> to figure out what to do. ! 22: conf.c A stripped version of conf.ucb.c; if you are forced to ! 23: build a configuration file from scratch, you are ! 24: probably better off starting with this one. ! 25: deliver.c Routines to deliver mail, including queueing up ! 26: for eventual delivery & actual sending. ! 27: delivermail.8 Documentation for delivermail. ! 28: dlvrmail.h Main header file for delivermail. ! 29: err.c Routines to print error messages. ! 30: mail-dm.c Example of the code in server ftp for the Arpanet ! 31: software. ! 32: mailaliases.5 Documentation for the alias file used by delivermail. ! 33: main.c The main routine to delivermail. This file also ! 34: contains some miscellaneous routines. ! 35: makefile The makefile used here. ! 36: maketemp.c The routine that actually reads the mail into a temp ! 37: file. It also does a certain amount of parsing of ! 38: the header, etc. ! 39: matchhdr.c A routine used by delivermail & arpa.c (& others?) ! 40: which performs a match on ARPANET format header items. ! 41: parse.c The routines which do address parsing. ! 42: savemail.c Routines which save the letter on processing errors. ! 43: sysexits.c List of error messages associated with error codes ! 44: in sysexits.h. ! 45: sysexits.h List of exit statuses that could someday become a ! 46: standard. In any case, they are what delivermail & ! 47: a handful of other programs use. ! 48: useful.h A header file containing a few things that appear to ! 49: be useful for even the most various programs. ! 50: userinfo.5 Tentative documentation for the proposed (and rejected) ! 51: user info database. ! 52: util.c Some general purpose routines used by delivermail. ! 53: v6-mail.c Local mailer under version 6. This is included to ! 54: permit you to see the sorts of modifications that ! 55: had to take place. ! 56: vax-mail.c Local mailer under VM/UNIX (similar for V7). This ! 57: is also included as an example. This is more complex ! 58: than v6-mail.c because it has to be able to deal with ! 59: UUCP mail also. Beware of local hacks that will not ! 60: apply to your installation. ! 61: version.c A file defining the version. This gets bumped every ! 62: time a new version is installed (theoretically). ! 63: ! 64: [This list was current as of 10/27/80] ! 65: ! 66: The configuration table distributed here should work with a vanilla ! 67: system. It will try to figure out who you are from whoami.h. It ! 68: depends on: ! 69: BERKELEY -- if set, does all the Berkeley-specific stuff. ! 70: Other local compilation flags provide machine- ! 71: specific definition. ! 72: V6 -- set this if you are on version 6 system. ! 73: sysname -- a defined constant which is your name on the ! 74: UUCP net. It is assumed that you are on the UUCP ! 75: net. ! 76: ! 77: There are two tables in conf.c which are critical. The first is ! 78: the Mailers table. This describes each mailer available to your ! 79: system. The second is the parse table, describing how to decide ! 80: what net an address applies to, etc. The comments in the code ! 81: should explain how to set these up. If you do not have any more ! 82: nets than berknet, uucp, and arpanet, and if the mailers for these ! 83: are in the standard places, you probably won't have to touch the ! 84: Mailers table. ! 85: ! 86: You will also have to create a new makefile. There are only two ! 87: basic types: for a v6 system & for a v7 system. All pathnames & ! 88: system dependent stuff should be in conf.c. The makefile distributed ! 89: is for our CSVAX site, and should work for you. You may want to ! 90: change some of the compile flags as listed in the makefile; these ! 91: control things like logging, hashed alias tables, and debugging ! 92: info. ! 93: ! 94: You will have to change your equivalent of /bin/mail to take a ! 95: "-d" flag. If this flag is not asserted, /bin/mail should just ! 96: turn itself into /etc/delivermail (this is probably in a routine ! 97: called "bulkmail" or "sendmail"). The code looks like something ! 98: like: ! 99: ! 100: # ifdef DELIVERMAIL ! 101: {search argv for a -d flag} ! 102: if (!dflag) ! 103: { ! 104: argv[0] = "-delivermail"; ! 105: argv[argc] = 0; ! 106: execv(DELIVERMAIL, argv); ! 107: perror(DELIVERMAIL); ! 108: } ! 109: {ignore -d flag in further processing} ! 110: # endif ! 111: ! 112: This is actually somewhat oversimplified. See the example mailers ! 113: for something more realistic. Besides the mailers in this directory, ! 114: see ../berknet/v6mail.c. ! 115: ! 116: Argv[0] should begin with a "-" to indicate that it is being called ! 117: from /bin/mail. ! 118: ! 119: If you are running server ftp on arpanet, you will have to change ! 120: the incoming mail routine to accept mail for any address (rather than ! 121: checking to see that the user exists). Instead of writing the ! 122: mail in some non-standard mailbox, pipe the mail to /etc/delivermail ! 123: instead (include the -a flag). Delivermail will mail back a message ! 124: if the letter can't be sent. Also, I have changed the "success" ! 125: message to read "Mail accepted" rather than "Mail delivered", since ! 126: the mere fact that delivermail chewed up the mail does not mean that ! 127: it has been delivered. Our "mail-dm.c" is given as an example. ! 128: ! 129: Sometimes (particularly in Arpa-land) mail comes from a person who ! 130: doesn't really exist. Some mail will be returned to them from a ! 131: pseudo-user named ~MAILER~DAEMON~, which will of course be returned. ! 132: But ~MAILER~DAEMON~ does not exist, so it is returned.... and you have ! 133: a loop. To break this, every site should have the entry: ! 134: ~MAILER~DAEMON~:root ! 135: in their aliases file.
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.