diff -c ../src.org/COPYRIGHT.WIDE ./COPYRIGHT.WIDE *** ../src.org/COPYRIGHT.WIDE Thu Mar 30 11:52:11 1995 --- ./COPYRIGHT.WIDE Thu Mar 30 11:47:30 1995 *************** *** 0 **** --- 1,9 ---- + Copyright (c) 1993 by WIDE Project. All rights reserved. + + このパッチの利用,複製,変更,再配布に関してなんら制限は行ないません. + ただし,パッチに含まれている著作権表示に変更を行なわないことを条件とし + ます.なお,著作権保有者は,本パッチ使用によって発生した,いかなる不利 + 益に対しても一切の責任を負いません. + + Jun 29, 1994 + 中村 素典 diff -c ../src.org/RELEASE_NOTES.WIDE ./RELEASE_NOTES.WIDE *** ../src.org/RELEASE_NOTES.WIDE Thu Mar 30 11:52:12 1995 --- ./RELEASE_NOTES.WIDE Thu Mar 30 11:58:52 1995 *************** *** 0 **** --- 1,581 ---- + WIDE's patch kit for R8 sendmail (2.4W) Jun.29,1994 + 中村 素典/WIDE Project + motonori@wide.ad.jp + + + このパッチキットは 1.6W for sendmail.5.67 のうち、R8 sendmail に取り込まれ + なかった機能に、メールアドレスの補完機能などに関する新たな拡張を加えたもの + である。配布はパッチ形式で行なっており、sendmail.8.6.12.base.tar.Z を展開し + てできたディレクトリ src/ の中で当てるように作成されている。 + + Makefile.WIDE.* も添付されているが、これを用いた場合は自動的にコンパイル用 + ディレクトリを作成し、必要なファイルにシンボリックリンクを張るようになって + いる。Makefile.WIDE.* を修正する場合には、そのままの名前で(オリジナルを残し + ておきたい場合は、オリジナルを別のファイル名にコピーして)修正すること。 + + Makefile.WIDE.* には、BINDDIR, NEWDBDIR が相対パスで定義されているが、これは + src/OS_OBJ/ からの相対パスとなることに注意されたい。 + bind4.9 を利用する場合は lib44bsd.a が必要な場合がある。 + NDBM と NEWDB を同時に定義する場合、libdbm.a を先にリンクする方が望ましい。 + + + 《 2.4Wで拡張される機能について》 + + 各種機能は以下のフラグによって制御できる。 + + FILEMACRO Gw/etc/sendmail.dw のようにファイルによるマクロ定義を + 可能とする。 + EXTEND_CLASS 拡張クラス文字 ^A-^z のサポート。C^[A-z] 等によるクラ + ス定義、および $=^[A-z] によるクラス参照を可能とする。 + EXTEND_MACRO 拡張マクロ文字 ^A-^z のサポート。D^[A-z] 等によるマク + ロ定義、および $^[A-z] によるマクロ参照を可能とする。 + ADJUST_TZ 一部のOSで出現すると思われる、TZ が +859 となる問題を + 回避する。 + LOGWVERSION newvers.sh による構築情報をデーモンスタートの際に + syslog に出力する。 + COMPILEOPTIONS コンパイルオプション文字列をオブジェクトに埋め込む。 + CANON_MX_CNTL ネームサーバの MX レコードの参照によるメールアドレスの + 補完機能の利用を I オプションで指定できるようにする。デ + フォルトでは補完に MX レコードを利用しないようになる。 + I オプションに ?nowildcardmx を指定することにより MX を + 用いた補完が行なわれる(WildCardMXを利用しているところで + は、?nowildcardmx を指定しない方がよいと思われる)。 + CANON_OTHER メールアドレスの補完に CNAME, MX, A レコードの他の + レコードも参照することを可能とする。現バージョンでは + HINFO, MINFO, NS, NULL, PTR, SOA, TXT, WKS が利用可能。 + それぞれ ?hinfo, ?minfo, ?ns, ?null, ?ptr, ?soa, ?txt, + ?wks を I オプションに指定することで、参照されるように + なる。検索の順序は、オプションに指定した順序に従う。 + SHOW_MX_HOSTS -bt オプションによるアドレステストモードの際に、SMTP + メーラに到達した場合に、MX ホストリストの表示を可能と + する。テストの際に、3,0,mx user@domain のように、mx と + いう疑似ルールセット名を指定することにより表示される。 + AUTH_LOG X-Authentication-Warnings: ヘッダに出力されるメッセージ + を syslog にも残すようにする。 + ESMTPPEERSCLS SMTP 接続時の greeting メッセージが複数行ある場合に、 + メーラによってはメールを送ることができないという問題が + ある。BROKENSMTPPEERS を定義すればすべて一行に制限され + るようになるが、この場合は特に指定しない限り ESMTP が + 使用されない。ESMTPPEERSCLS を定義すると、クラス e の + 指定により特定のホストに対する greeting メッセージを + 一行に制限することができる。 + 例) + Ce !all (すべてのホストに対して ESMTP を用いない) + Ce !all .kyoto-u.ac.jp (区切りはスペース) + (*.kyoto-u.co.jp のみ ESMTP を用いる) + Ce !.kyoto-u.ac.jp !kyoto-u.ac.jp + (*kyoto-u.co.jp のみ ESMTP を用いない) + Ce !jpnkyoto.kyoto-u.ac.jp + (jpnkyoto.kyoto-u.ac.jp のみ ESMTP を用いない) + IDENTPEERSCLS SMTP 接続時に IDENT プロトコルによって、接続元のユーザ + 情報を取得しようとするが、途中のゲートウェイや接続元の + OS によっては、IDENT の接続エラーに伴って SMTP 接続も + 同時に切断されてしまい、メールが受けとれない。 + この現象は、syslog 以下のように Host unreach という記録 + が残ることから判断できる。 + NOQUEUE: SYSERR: putoutmsg (host.domain): error + on output channel sending "220 ESMTP spoken + here": Host is unreachable + greeting が2行あることが問題になる場合は、Host unreach + とは記録されないはずである。 + IDENTPROTO を 0 に define すれば IDENT を用いなくなる + が、特定のホストに対してだけは IDENT を用いたい場合に + 定義する。これを定義すると、クラス i により IDENT を + 用いるホストを指定することができる。 + 例) + Ci !all (すべてのホストに対して IDENT を用いない) + Ci !all .kyoto-u.ac.jp (区切りはスペース) + (*.kyoto-u.co.jp のみ IDENT を用いる) + Ci !.kyoto-u.ac.jp !kyoto-u.ac.jp + (kyoto-u.co.jp のみ IDENT を用いない) + Ci !jpnkyoto.kyoto-u.ac.jp + (jpnkyoto.kyoto-u.ac.jp のみ IDENT を用いない) + MX_SAFETY MX で示されているホストが存在しなかった場合に host not + found エラーにならないようにする。 + ALL_HASH_CMNT :include: や .forward で指定されるファイルでは、通常 + 行頭の # のみがコメントの開始を示すことになっているが、 + 行中の任意の位置で # が使えるようにしたい場合に定義す + る。ただし # の直前の文字は必ずスペース文字であること。 + QUICK_RESPONSE rmail などから -odq フラグつきで起動された場合、配送 + エラーが発生しても、エラーメールは mqueue に一旦保存 + される。このようなレスポンスメールについては、mqueue + に落さずにすぐに配送するようにしたい場合に 1 にする。 + (quick hack なので、注意されたし) + LHS_CHECK_CNTL newaliases の実行の際には、aliases データベースの LHS + (書き換えられる元のアドレス)が localmailer に到達する + かどうかのチェックが行なわれる。sendmail.cf において + あるユーザが local であるかどうかを aliases データベー + スを用いて判定するようなルールを入れるなど特殊な設定 + の下では、LHS のチェックによって newaliases がうまく + 動作しなくなる。LHS_CHECK_CNTL を 1 に定義すると、 + RHS をチェックするかどうかを指定するスイッチである + option n の操作によって、同時に LHS のチェックについて + も指定することができるようになる。 + NO_ALIAS_ON_REBUILD sendmail.cf で $( $) のマップ参照によって + aliases ファイルを参照するようにした場合、newaliases + でハングアップすることがある。定義することにより + newaliases の処理の場合のみ $( $) からの aliases + ファイル参照を抑制する。 + MULTI_MAILER ルールセット 0 のメーラディスパッチルールにおいて、 + 一行に $#...$@...$:... を繰り返し記述できるようにする。 + $#smtp.... $#uucp.... のように書くことにより、smtp + mailer による配送に失敗したら uucp mailer に切替える + ようにすることができる(テストが十分でないので注意)。 + ANOTHER_MXPB MX レコード単位の相乗り判定を行なうコードを有効にする。 + (テストが十分でないので注意) + RCPT_NEXT SMTP/RCPT TO で temp fail した場合にも下位の MX ホスト + への送信を試みるようにする。ANOTHER_MXPB を定義した場合 + のみ有効となる。 + + その他、Sony NEWS で拡張されている -J オプションへの対応(ただし、オプ + ションをエラーにせず単に無視するだけ)もおこなっている。 + + + 《謝辞》 + + このパッチは、京都大学、立命館大学、情報技術開発株式会社ならびにその他の人々の + 協力によって作成されたものであるので、ここに感謝の意を表す。 + + + ===== Changes ===== + + [[ Mar. 30, 1995/8.6.12+2.4W/motonori ]] + modified for sendmail 8.6.12 + + + [[ Mar. 12, 1995/8.6.11+2.4W/motonori ]] + modified for sendmail 8.6.11 + + + [[ Feb. 23, 1995/8.6.10+2.4W/motonori ]] + modified for sendmail 8.6.10 + + + [[ Jun. 29, 1994/8.6.9+2.4W/motonori ]] + conf.c: + getla() の EWS 対応 + deliver.c: + DG/UX で localmailer を起動するときに必要となる変更 + copyright notice + + + [[ Apr. 22, 1994/8.6.9+2.4Wb/motonori ]] + Makefile.WIDE.*: + nroff を ${NROFF} に置き換えた + BROKEN_LISTEN の定義の削除 + daemon.c: + BROKEN_LISTEN で行っていた処理が 8.6.9 に実装されたので, + パッチから削除 + conf.h,Makefile.WIDE.NEWS,Makefile.WIDE.EWS: + /usr/ucb/cc でなく /usr/bin/cc を利用するように変更 + conf.c,conf.h: + SYS5SIGNALS for NEWS, EWS + use statvfs() with NEWS-OS 6.0.1 + + + [[ Apr. 8, 1994/8.6.8+2.4Wb2/motonori ]] + main.c: + showmxhost() の定義の矛盾を解決 + conf.h: + EPROTO_QUEUE のデフォルトを 0 にした + メールを返送すべき場合にも mqueue に溜ってしまう問題がある + readcf.c: + ポインタ bp の値を変更してはいけないため,strcpy() を利用 + Makefile.WIDE.LUNA: + more changes for LUNA88K/Mach + Makefile.WIDE.HP-UX: + newly added + + + [[ Mar. 18, 1994/8.6.8+2.4Wb/motonori ]] + Makefile.WIDE.*: + use MAKE macro + changes for LUNA88K/Mach + + + [[ Mar. 16, 1994/8.6.7+2.4Wb5/motonori ]] + Makefile.WIDE.BSDI: + BSDI 1.1 に対応 + conf.h: + BSDI の部分に undef SETPROCTITLE を追加 + NEWS-OS 6.0.1 のサポート + EWS-UX/V 4.1 のサポート + Makefile.WIDE.NEWS + NEWS-OS 6.0.1 のサポート + newvers.sh: + NEWS-OS 6.0.1 ではデフォルトで ascii にならないので,明示的に + LANG=C を設定 + Makefile.WIDE.EWS + 新規にサポート + Makefile.WIDE.NEWS, Makefile.WIDE.EWS: + fix on dirent problem of ucb compiler on SVR4 + + + [[ Mar. 14, 1994/8.6.6+2.4Wb/motonori ]] + Makefile.WIDE.Sun40: + Makefile.WIDE.Sun と統合のため削除 + Makefile.WIDE.Sun: + SunOS 4.0.3 をサポート + Makefile.WIDE.*: + mailq manual page の記述を追加 + install の時バックアップを残す + conf.h: + HASSTATFS の定義方式変更に対応 + conf.c: + HASSTATFS の定義方式変更によりオリジナルに戻す + alias.c, parseaddr.c, version.c: + NO_ALIAS_ON_REBUILD の実装 + mci.c: + GET_PEER_ADDR の削除によりオリジナルに戻す(8.6.6に採用) + srvrsmtp.c: + X-Auth-Warn に関する変更に対応 + deliver.c: + MX_SAFETY の実装 + + + [[ Jan. 25, 1994/8.6.5+2.3W4/motonori ]] + alias.c: + LHS_CHECK_CNTL を実装 + conf.h, version.c: + LHS_CHECK_CNTL, MULTI_MAILER の追加 + daemon.c: + BROKEN_LISTEN の出力文字の調整 + deliver.c: + fix on ANOTHER_MXPB + deliver.c, parseaddr.c, sendmail.h: + MULTI_MAILER の実装 + recipient.c: + fix on ALL_HASH_CMNT (by kizu@ics.es.osaka-u.ac.jp) + srvrsmtp.c: + X-Auth-Warn: ヘッダに関する処理の位置の変更 + (動作を正しくすることが有害かもしれないので実質的な変更はしていない) + usersmtp.c: + putheader 実行時のタイムアウトが短いことがあるので、長めに変更 + (sendmail.cf で設定できるようにすべきである) + + + [[ Jan. 16, 1994/8.6.5+2.3W3/motonori ]] + main.c: + obsolete のチェックがシビアになったため NEWS の -J オプション操作の + 位置が不適当になったことによる修正 + daemon.c: + high load ave 時に 421 メッセージの後に続けて 221 メッセージを送る + ように変更(RFC821 に従う) + + + [[ Jan. 16, 1994/8.6.5+2.3W2/motonori ]] + deliver.c: + 2.3W1 での変更を元に戻す + mci.c: + syslog に記録する IP address が (0) のままにならないようにするコード + を追加(INET domain にのみ対応; GET_PEER_ADDR) + + + [[ Jan. 14, 1994/8.6.5+2.3W1/motonori ]] + deliver.c: + localhost から発信した /etc/aliases 記載の prog/file mailer 宛の + メールの処理が必ず daemon の権限で行なわれるようにした(PROG_DAEMON) + + + [[ Jan. 14, 1994/8.6.5+2.3W/motonori ]] + Makefile.WIDE.*: + install mode が 666 になっていたものを 644 に修正 + all: + 8.6.5 へのパッチに修正、2.3W としてリリース + + + [[ Jan. 12, 1994/8.6.5Beta11+2.3W/motonori ]] + + sendmail.h: + LUNA に関する記述を conf.h に移動 + conf.h: + マクロ名 LUNA を luna に変更 + SHOW_MX_HOSTS, AUTH_LOG を追加 + SunOS 4.0.3 の設定が 8.6.5 に入ったため削除 + その他の設定を調整 + daemon.c: + main.c: + SHOW_MX_HOSTS のコードを実装 + deliver.c: + ANOTHER_MXPB のコードを大幅に変更 + Makefile.WIDE.LUNA: + Makefile.WIDE.Sun40: + time.h の二重読み込みの防止措置 + Makefile.WIDE.LUNA: + conf.h: + dirent を direct で代用 + LUNA2/LUNA88K (from demizu) + version.c: + COMPILEOPTION の実装 + Makefile.WIDE.*: + -DNDBM -DNEWDB の定義を別の行に分離 + bind4.9 のための -l44bsd をコメントとして追加 + -DIDENTPROTO=0 をコメントとして追加 + Makefile.WIDE.NEWS: + Makefile.WIDE.Sun*: + -DBROKEN_LISTEN=1 を定義 + daemon.c: + BROKEN_LISTEN を実装 + IDENTPEERSCLS を実装 + main.c: + AUTH_LOG を実装 + recipient.c: + ALL_HASH_CMNT を実装 + srvrsmtp.c: + BRKNSMTPPRSCLS を ESMTPPEERSCLS に変更 + savemail.c: + QUICK_RESPONSE を実装 + all: + 8.6.5Beta11 へのパッチに修正 + + + [[ Nov. 1, 1993/8.6.4+2.2W/motonori ]] + + all: + 8.6.4 へのパッチに修正 + + + [[ Oct. 25, 1993/8.6.3+2.2W/motonori ]] + + Makefile.WIDE.SEIUX: + SUMI Station 用 Makefile を追加 (from shige-y@is.aist-nara.ac.jp) + Makefile.WIDE.Sun40: + SunOS 4.0.3 用の Makefile を追加 + conf.h: + SEIUX、SunOS 4.0.3 に対する定義を追加 + Makefile.WIDE.*: + -I${BINDDIR}/compat/include を INCDIRS に追加 + all: + 8.6.3 へのパッチに修正 + + + [[ Oct. 16, 1993/8.6.2+2.2W/motonori ]] + + Makefile.WIDE.Sun: + -DHASUNAME を追加 + all: + 8.6.2 へのパッチに修正 + + + [[ Oct. 9, 1993/8.6.1+2.2W/motonori ]] + + Makefile.WIDE.BSDI: + 新たに追加 (from shigeya@fortune.co.jp) + Makefile.WIDE.LUNA: + Makefile.WIDE.NEWS: + Makefile.WIDE.Sun: + MAKEFILE を追加 + nroff の -h フラグを削除 (Sun) + domain.c: + readcf.c: + T_TXT を定義するように変更 + EXTEND_MACRO を delaied macro expansion にも対応 + macro.c: + EXTEND_CLASS に関する処理を readcf.c に移動 + all: + 8.6.1 へのパッチに修正 + + + [[ Oct. 7, 1993/8.6+2.2W/motonori ]] + + domain.c: + readcf.c: + T_TXT が arpa/nameser.h に登録されていない場合に対処した + (reported by kozo@e.dendai.ac.jp) + conf.h: + NEWS-OS 4.2R, UNIOS-U 3.0 用のマクロ定義記述を追加 + sigfunc_t が int を用いて定義されるように修正 (NEWS) + (portability changes for NEWS are from matusita@osaka-u) + conf.c: + setpgid() に関する対応を conf.h で行なうようにした (LUNA,NEWS) + sys/vfs.h を読み込むようにした (LUNA,NEWS) + Makefile.WIDE.LUNA: + Makefile.WIDE.NEWS: + Makefile.WIDE.Sun: + LADEF, OSDEF の定義を conf.h に移動 (LUNA, NEWS) + いくつかの &&, || を if then else fi に変更 + LUNA の test で -x が使えないことに対応 + make clean を修正 + OSDEF -> ENVDEF に変更 + SRCADD, OBJADD を追加 + readcf.c: + 8.6 への移行時に発生した EXTEND_CLASS に関するバクを修正 + macro.c: + 8.6 への移行時に発生した EXTEND_MACRO に関するバクを修正(from toku@dit) + aliases.0: + newaliases.0: + sendmail.0: + 4.3BSD Reno の tmac.* により作成 + all: + 2.2W としてリリース + + + [[ Oct. 6, 1993/8.6+2.1W/motonori ]] + + vsprintf.c: + 8.4 から conf.c に含まれるようになったため削除 + Makefile.WIDE.LUNA: + Makefile.WIDE.NEWS: + Makefile.WIDE.Sun: + newvers.sh が実行可能でない場合にのみ chmod +x を行なうように変更 + コンパイル作業用ディレクトリを作成するようにしたので、複数アーキテ + クチャのためのコンパイルを同一ディレクトリで行なうことが可能 + make install が正しく動作するように修正 + make restart を追加 + ディレクトリ情報の調整 + (thanks to yamaoka@titech, matusita@osaka-u, kazuto@aoyama) + newvers.sh + umask 0022 を追加 + readcf.c: + filemacro() において munchstring() の宣言を追加(from minmin@astec) + goto fm_exit; により処理を抜けるように bug fix (SCANF を定義して + コンパイルした場合に問題があった) + fileclass() の仕様変更に追従 + main.c: + NewsOS ucbmail/binmail で指定される -J フラグに対してエラーを起こさ + ないようにした(reported by matusita@ics.es.osaka-u.ac.jp) + 日本語変換のためのコードは入れていない + srvrsmtp.c: + ESMTP greeting を解釈できないホストのために、クラス b に定義された + ホストからの接続に対しては ESMTP greeting を送らないことを可能にする + ためのコートを挿入した + conf.h で BRKNSMTPPRSCLS を 1 にすることにより有効となる + sendmail.restart: + tail -5 /var/log/syslog をコメントとして追加 + conf.c: + NewsOS に setpgid() が無いことに対応 + all: + sendmail 8.6 へのパッチに修正、2.1W としてリリース + + + [[ Jul. 26, 1993/8.5+2.0Wbeta2/1.6/motonori ]] + + domain.c: + trymx が False の場合に、ローカルドメイン名を補った MX に対する query + を行なわないように変更 + clock.c: + conf.c: + オリジナルに戻す + + + [[ Jul. 24, 1993/8.5+2.0Wbeta/1.5/motonori ]] + + all: + sendmail 8.5 へのパッチに修正 + + + [[ Jul. 23, 1993/8.4+2.0Wbeta/1.5/motonori ]] + + sendmail.restart: + /etc/sendmail.pid の二行目に起動時オプションが保存されるようになった + ことに対応 + clock.c: + sleep() の型宣言が SLEEP_T によって行なわれるようになったので、NEWS + のための変更を削除 + conf.c: + pid_t を Makefile で定義するように変更し、オリジナルに戻した + Makefile.WIDE.LUNA: + Makefile.WIDE.NEWS: + Makefile.WIDE.Sun: + Version.c -> version.c の依存を追加 + VOIDSLEEP の定義を削除し、SLEEP_T に関する宣言を追加 (NEWS) + pid_t の定義を追加 (NEWS,LUNA) + NOWAITPID の定義を削除 (NEWS,LUNA) + daemon.c: + CANON_MX_CNTL に関する処理を domain.c から移動 + domain.c: + CANON_MX_CNTL に関する処理を削除 (daemon.c への移動のため) + all: + sendmail 8.4 へのパッチに修正 + + + [[ Jul. 14, 1993/8.3+2.0Wbeta2/1.4/motonori ]] + + Makefile.WIDE.LUNA: + Makefile.WIDE.NEWS: + Makefile.WIDE.Sun: + sendmail: sendmail.mx sendmail.nomx の記述を入れた + clean: で rm の引数の間にスペースが抜けていた部分があったのを修正 + (toku) + readcf.c: + I オプションで、?nowildcardmx, ?hinfo, ?minfo, ?ns, ?null, ?ptr, ?soa, + ?txt, ?wks を指定できるようにした + domain.c: + NO_CANON_MX -> CANON_MX_CNTL + getcanonname() で問い合わせを行なうレコードを可変にした + 絶対アドレスとして問い合わせを行なう場合に、追加されたレコード検索を + 行なわないようにした + + + [[ Jul. 14, 1993/8.3+2.0Wbeta/1.3/motonori ]] + + Makefile.WIDE.LUNA: + Makefile.WIDE.NEWS: + Makefile.WIDE.Sun: + Makefile.dist.* からファイル名を変更 + sendmail.mx, sendmail.nomx を作成するように修正 + Sun のものは -Bstatic をコメントアウトした + conf.h: + NAMED_BIND の define は Makefile.WIDE で行なうようにしたため + コメントアウトした + all: + sendmail 8.3 へのパッチに修正 + + + [[ Jul. 12, 1993/8.2+2.0Wbeta/1.2/motonori ]] + + Makefile.dist.LUNA: + Makeifle.dist を UNIOS-B 1.6 に対応 + GNU/dirent を用いてコンパイルが可能であることを確認した + vsprintf.c: + UNIOS-B 1.6 のために Tahoe から輸入 + all: + sendmail 8.2 へのパッチに修正 + + + [[ Jul. 1, 1993/8.1C+2.0Wbeta/1.1/motonori ]] + + sendmail.hf: + WIDE版パッチに関するメッセージを記述 + sendmail.restart: + リスタート用スクリプトの追加 + conf.h: + typo の修正 + all: + sendmail 8.1C へのパッチに修正 + + + [[ Jun. 14, 1993/8.1(B)+2.0Wbeta/1.0/motonori ]] + + newvers.sh: + 1.6W for sendmail.5.67 より輸入(origin: BIND4.8.2) + (newvers.sh による情報は、1.6W のように syslog に出力されるようには + なっていない) + Makefile.dist.Sun: + Makefile.dist を SunOS4.1.1 に対応 + Makefile.dist.NEWS: + Makefile.dist を NEWS-OS 4.1C に対応 + arpadate.c: + ADJUST_TZ のための変更(1.6Wから輸入) + clock.c: + NEWS-OS 4.1C では sleep() の返値 が void であることによる変更 + (VOIDSLEEP フラグは makefile.dist.NEWS で定義される) + conf.c: + NEWS-OS 4.1C が waitpid()を持たないことによる変更 + (NOWAITPID フラグは makefile.dist.NEWS で定義される) + conf.h: + 各種フラグの設定 + NEWS-OS 4.1C のために O_ACCMODE を定義 + domain.c: + CANON_OTHER NO_CANON_MX のための変更 + (これらを定義しない場合には、domain.c への変更は必要ない) + macro.c: + parseaddr.c: + EXTEND_CLASS EXTEND_MACRO のための変更 + readcf.c: + EXTEND_CLASS EXTEND_MACRO FILEMACRO のための変更 + 1.6W での EXTEND_CLASS EXTEND_MACRO の実装では 0x00-0x3f へマップする + ようになっていたが、R8 では 0x00-0x3f のエリアも利用されるようになった + ため、素直に 0xc0-0xff にマップするように変更した + sendmail.h: + EXTEND_MACRO のためのマクロバッファの拡張 diff -c ../src.org/alias.c ./alias.c *** ../src.org/alias.c Fri Feb 10 05:22:17 1995 --- ./alias.c Thu Mar 30 11:47:30 1995 *************** *** 36,41 **** --- 36,42 ---- # include #ifndef lint + static char Wsccsid[] = "@(#)alias.c 2.5 (motonori/WIDE) 4/20/94"; static char sccsid[] = "@(#)alias.c 8.25 (Berkeley) 4/14/94"; #endif /* not lint */ *************** *** 380,389 **** --- 381,400 ---- /* database is out of date */ if (AutoRebuild && stb.st_ino != 0 && stb.st_uid == geteuid()) { + #if NO_ALIAS_ON_REBUILD + char OpModeSave; + #endif message("auto-rebuilding alias database %s", buf); if (isopen) map->map_class->map_close(map); + #if NO_ALIAS_ON_REBUILD + OpModeSave = OpMode; + OpMode = MD_INITALIAS; + #endif rebuildaliases(map, TRUE); + #if NO_ALIAS_ON_REBUILD + OpMode = OpModeSave; + #endif isopen = map->map_class->map_open(map, O_RDONLY); } else *************** *** 645,651 **** --- 656,666 ---- break; } } + #if LHS_CHECK_CNTL + if (CheckAliases && (al.q_mailer != LocalMailer)) + #else if (al.q_mailer != LocalMailer) + #endif { syserr("554 %s... cannot alias non-local names", al.q_paddr); diff -c ../src.org/aliases.0 ./aliases.0 *** ../src.org/aliases.0 Thu Mar 30 11:52:12 1995 --- ./aliases.0 Thu Mar 30 11:47:31 1995 *************** *** 0 **** --- 1,48 ---- + ALIASES(5) UNIX Programmer's Manual ALIASES(5) + + NAME + aliases - aliases file for sendmail + + SYNOPSIS + aliases + + DESCRIPTION + This file describes user ID aliases used by /_u_s_r/_s_b_i_n/_s_e_n_d_m_a_i_l. The file + resides in /_e_t_c and is formatted as a series of lines of the form + + name: name_1, name2, name_3, . . . + + The _n_a_m_e is the name to alias, and the _n_a_m_e__n are the aliases for that + name. Lines beginning with white space are continuation lines. Lines + beginning with `#' are comments. + + Aliasing occurs only on local names. Loops can not occur, since no mes- + sage will be sent to any person more than once. + + After aliasing has been done, local and valid recipients who have a + ``._f_o_r_w_a_r_d'' file in their home directory have messages forwarded to the + list of users defined in that file. + + This is only the raw data file; the actual aliasing information is placed + into a binary format in the file /_e_t_c/_a_l_i_a_s_e_s._d_b using the program + newaliases(1). A newaliases command should be executed each time the + aliases file is changed for the change to take effect. + + SEE ALSO + newaliases(1), dbopen(3), dbm(3), sendmail(8) + + _S_E_N_D_M_A_I_L _I_n_s_t_a_l_l_a_t_i_o_n _a_n_d _O_p_e_r_a_t_i_o_n _G_u_i_d_e. + + _S_E_N_D_M_A_I_L _A_n _I_n_t_e_r_n_e_t_w_o_r_k _M_a_i_l _R_o_u_t_e_r. + + BUGS + If you have compiled sendmail with DBM support instead of NEWDB, you may + have encountered problems in dbm(3) restricting a single alias to about + 1000 bytes of information. You can get longer aliases by ``chaining''; + that is, make the last name in the alias be a dummy name which is a con- + tinuation alias. + + HISTORY + The aliases file format appeared in 4.0BSD. + + 4th Berkeley Distribution December 11, 1993 1 diff -c ../src.org/arpadate.c ./arpadate.c *** ../src.org/arpadate.c Fri Feb 10 05:22:05 1995 --- ./arpadate.c Thu Mar 30 11:47:31 1995 *************** *** 33,38 **** --- 33,39 ---- */ #ifndef lint + static char Wsccsid[] = "@(#)arpadate.c 2.1 (motonori/WIDE) 10/6/93"; static char sccsid[] = "@(#)arpadate.c 8.1 (Berkeley) 6/7/93"; #endif /* not lint */ *************** *** 145,150 **** --- 146,158 ---- off -= 24 * 60; else if (lt->tm_yday > gmt.tm_yday) off += 24 * 60; + #if ADJUST_TZ + /* I check time offset is really correct value. + (thanks for ray@csl.hiroshima-u.ac.jp) + -- yasuhiro@dcl.co.jp 91/2/5 */ + if ((off % 10) != 0) + off++; /* I adjust time offset value */ + #endif /* ADJUST_TZ */ *q++ = ' '; if (off == 0) { diff -c ../src.org/conf.c ./conf.c *** ../src.org/conf.c Wed Mar 8 02:49:18 1995 --- ./conf.c Thu Mar 30 11:47:31 1995 *************** *** 33,38 **** --- 33,39 ---- */ #ifndef lint + static char Wsccsid[] = "@(#)conf.c 2.12 (motonori/WIDE) 6/23/94"; static char sccsid[] = "@(#)conf.c 8.89.1.3 (Berkeley) 3/7/95"; #endif /* not lint */ *************** *** 549,554 **** --- 550,558 ---- bzero(&n, sizeof n); n.sa_handler = handler; + #ifdef SA_RESTART + n.sa_flags = SA_RESTART; + #endif if (sigaction(sig, &n, &o) < 0) return SIG_ERR; return o.sa_handler; *************** *** 722,728 **** _PATH_UNIX, LA_AVENRUN); return (-1); } ! #ifdef IRIX Nl[X_AVENRUN].n_value &= 0x7fffffff; #endif } --- 726,732 ---- _PATH_UNIX, LA_AVENRUN); return (-1); } ! #if defined(IRIX) || defined(nec_ews_svr4) Nl[X_AVENRUN].n_value &= 0x7fffffff; #endif } *************** *** 1680,1689 **** # if SFS_TYPE == SFS_4ARGS if (statfs(dir, &fs, sizeof fs, 0) == 0) # else ! # if defined(ultrix) ! if (statfs(dir, &fs) > 0) # else if (statfs(dir, &fs) == 0) # endif # endif # endif --- 1684,1697 ---- # if SFS_TYPE == SFS_4ARGS if (statfs(dir, &fs, sizeof fs, 0) == 0) # else ! # if SFS_TYPE == SFS_STATVFS && !defined(UNIXWARE) ! if (statvfs(dir, &fs) == 0) # else + # if defined(ultrix) + if (statfs(dir, &fs) > 0) + # else if (statfs(dir, &fs) == 0) + # endif # endif # endif # endif diff -c ../src.org/conf.h ./conf.h *** ../src.org/conf.h Fri Feb 10 05:22:03 1995 --- ./conf.h Thu Mar 30 11:47:32 1995 *************** *** 31,36 **** --- 31,37 ---- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * + * @(#)conf.h 2.23 (motonori/WIDE) 5/17/94 * @(#)conf.h 8.104 (Berkeley) 4/17/94 */ *************** *** 69,74 **** --- 70,80 ---- # define QUEUESIZE 1000 /* max # of jobs per queue run */ # endif + /* for CANON_OTHER */ + # define QSEQSIZ 10 /* max # of DNS query types */ + /* for MULTI_MAILER */ + # define MAXDSPTMAILERS 3 /* max # of dispatching mailers in one rule */ + /********************************************************************** ** Compilation options. ** *************** *** 85,90 **** --- 91,119 ---- # ifdef NEWDB # define USERDB 1 /* look in user database (requires NEWDB) */ # endif + /* WIDE enhancements for 1.6W compatibility */ + # define FILEMACRO 1 /* macro definition by file */ + # define EXTEND_CLASS 1 /* extend class char ^A-^z */ + # define EXTEND_MACRO 1 /* extend macro char ^A-^z */ + # define ADJUST_TZ 1 /* adjust TZ value from +859 to +900 */ + # define LOGWVERSION 1 /* leave WVersion/WhoAndWhere on syslog */ + /* WIDE newer enhancements */ + # define COMPILEOPTIONS 1 /* put option strings into binary */ + # define CANON_MX_CNTL 1 /* canonicalization with/without MX records */ + # define CANON_OTHER 1 /* canonicalization with extra records */ + # define SHOW_MX_HOSTS 1 /* MX hosts are displaied in test mode */ + # define AUTH_LOG 1 /* send Authentication-Warnings to syslog */ + # define ESMTPPEERSCLS 1 /* use class 'e' as ESMTP peers list */ + # define IDENTPEERSCLS 1 /* use class 'i' as IDENT peers list */ + # define MX_SAFETY 1 /* eliminate unknown host from MX RRs */ + # define PERROR_QUP 0 /* retry on remote protocol error */ + # define ALL_HASH_CMNT 0 /* treat after # as a comment in include file */ + # define QUICK_RESPONSE 0 /* not queue up error response even with -odq */ + # define LHS_CHECK_CNTL 0 /* skip LHS checking with -n on newaliases */ + # define NO_ALIAS_ON_REBUILD 0 /* supress alias lookup via $( $) on rebuild */ + # define MULTI_MAILER 0 /* support multiple mailer dispatching */ + # define ANOTHER_MXPB 0 /* use another MX piggy backing code */ + # define RCPT_NEXT 0 /* try next MX if RCPT returns TEMPFAIL(4xx) */ /********************************************************************** ** 0/1 Compilation options. *************** *** 93,99 **** **********************************************************************/ # ifndef NAMED_BIND ! # define NAMED_BIND 1 /* use Berkeley Internet Domain Server */ # endif /* --- 122,128 ---- **********************************************************************/ # ifndef NAMED_BIND ! # define NAMED_BIND 0 /* use Berkeley Internet Domain Server */ # endif /* *************** *** 789,794 **** --- 818,884 ---- /* + ** UnixWare + ** + ** From Evan Champion . + */ + + #ifdef UNIXWARE + # define SYSTEM5 1 + # ifndef HASGETUSERSHELL + # define HASGETUSERSHELL 0 /* does not have getusershell(3) call */ + # endif + # define GIDSET_T int + # define SLEEP_T int + # define SFS_TYPE SFS_STATVFS + # define LA_TYPE LA_ZERO + # undef WIFEXITED + # undef WEXITSTATUS + # define _PATH_UNIX "/unix" + # ifndef _PATH_SENDMAILCF + # define _PATH_SENDMAILCF "/usr/ucblib/sendmail.cf" + # endif + # ifndef _PATH_SENDMAILPID + # define _PATH_SENDMAILPID "/usr/ucblib/sendmail.pid" + # endif + # define SYSLOG_BUFSIZE 128 + #endif + + + /* + ** Intergraph CLIX 3.1 + ** + ** From Paul Southworth + */ + + #ifdef CLIX + # define SYSTEM5 1 /* looks like System V */ + # ifndef HASGETUSERSHELL + # define HASGETUSERSHELL 0 /* does not have getusershell(3) call */ + # endif + # define DEV_BSIZE 512 /* device block size not defined */ + # define GIDSET_T gid_t + # undef LOG /* syslog not available */ + # define NEEDFSYNC 1 /* no fsync in system library */ + # define GETSHORT _getshort + #endif + + + /* + ** NCR 3000 Series (SysVr4) + ** + ** From From: Kevin Darcy . + */ + + #ifdef NCR3000 + # define __svr4__ + # undef BSD + # define LA_AVENRUN "avenrun" + #endif + + + + /* ** Cray Unicos ** ** Ported by David L. Kensiski, Sterling Sofware *************** *** 834,900 **** /* ! ** UnixWare ! ** ! ** From Evan Champion . */ ! #ifdef UNIXWARE ! # define SYSTEM5 1 ! # ifndef HASGETUSERSHELL ! # define HASGETUSERSHELL 0 /* does not have getusershell(3) call */ # endif ! # define GIDSET_T int ! # define SLEEP_T int ! # define SFS_TYPE SFS_STATVFS ! # define LA_TYPE LA_ZERO ! # undef WIFEXITED ! # undef WEXITSTATUS ! # define _PATH_UNIX "/unix" ! # ifndef _PATH_SENDMAILCF ! # define _PATH_SENDMAILCF "/usr/ucblib/sendmail.cf" # endif ! # ifndef _PATH_SENDMAILPID ! # define _PATH_SENDMAILPID "/usr/ucblib/sendmail.pid" # endif ! # define SYSLOG_BUFSIZE 128 #endif /* ! ** Intergraph CLIX 3.1 ** ! ** From Paul Southworth */ ! #ifdef CLIX ! # define SYSTEM5 1 /* looks like System V */ # ifndef HASGETUSERSHELL # define HASGETUSERSHELL 0 /* does not have getusershell(3) call */ # endif ! # define DEV_BSIZE 512 /* device block size not defined */ ! # define GIDSET_T gid_t ! # undef LOG /* syslog not available */ ! # define NEEDFSYNC 1 /* no fsync in system library */ ! # define GETSHORT _getshort #endif /* ! ** NCR 3000 Series (SysVr4) ! ** ! ** From From: Kevin Darcy . */ ! #ifdef NCR3000 ! # define __svr4__ ! # undef BSD # define LA_AVENRUN "avenrun" #endif - ! ! /********************************************************************** ** End of Per-Operating System defines --- 924,1045 ---- /* ! ** Sony NEWS-OS 4.2.1R and 6.0.1 */ ! #ifdef sony_news ! # ifndef __svr4 ! /* NEWS-OS 4.2.1R */ ! # define HASUNSETENV 1 /* has unsetenv(2) call */ ! # undef HASSETVBUF /* don't actually have setvbuf(3) */ ! # define WAITUNION 1 /* use "union wait" as wait argument type */ ! # define LA_TYPE LA_INT ! # define SFS_TYPE SFS_VFS /* use statfs() implementation */ ! # define setpgid setpgrp ! # undef WIFEXITED ! # undef WEXITSTATUS ! typedef int pid_t; ! # ifndef __P ! # include "cdefs.h" ! # endif ! typedef int (*sigfunc_t) __P((int)); ! # define SIGFUNC_DEFINED ! # else ! /* NEWS-OS 6.0.1 with /bin/cc */ ! # define SYSTEM5 1 /* include all the System V defines */ ! # define SYS5SIGNALS 1 /* SysV signal semantics -- reset on each sig */ ! # define HASINITGROUPS 1 /* has initgroups(3) call */ ! # define HASSETREUID 1 /* has setreuid(2) call */ ! # define setreuid(r, e) seteuid(e) ! # define HASSETSID 1 /* has Posix setsid(2) call */ ! # define LA_TYPE LA_INT ! # define SFS_TYPE SFS_STATVFS /* use statvfs() impl */ ! # define GIDSET_T gid_t ! # undef WIFEXITED ! # undef WEXITSTATUS # endif ! #endif ! ! ! /* ! ** Omron LUNA/UNIOS-B 3.0, LUNA2/Mach and LUNA88K Mach ! */ ! ! #ifdef luna ! # ifndef IDENTPROTO ! # define IDENTPROTO 0 /* TCP/IP implementation is broken */ # endif ! # ifdef uniosb ! # define NEEDVPRINTF 1 /* need a replacement for vprintf(3) */ # endif ! # define NEEDGETOPT 1 /* need a replacement for getopt(3) */ ! # define WAITUNION 1 /* use "union wait" as wait argument type */ ! # ifdef uniosb ! # define LA_TYPE LA_INT ! # endif ! # ifdef luna2m ! # define LA_TYPE LA_SUBR ! # endif ! # define SFS_TYPE SFS_VFS /* use statfs() implementation */ ! # define setpgid setpgrp ! # undef WIFEXITED ! # undef WEXITSTATUS ! typedef int pid_t; ! extern char *getenv(); ! extern int errno; #endif /* ! ** NEC EWS-UX/V 4.2 ** ! ** with /usr/ucb/cc */ ! #ifdef nec_ews_svr4 ! # define SYSTEM5 1 /* include all the System V defines */ ! # define SYS5SIGNALS 1 /* SysV signal semantics -- reset on each sig */ ! # define HASINITGROUPS 1 /* has initgroups(3) call */ ! # define HASSETREUID 1 /* has setreuid(2) call */ ! # define setreuid(r, e) seteuid(e) ! # define HASSETSID 1 /* has Posix setsid(2) call */ ! # define LA_TYPE LA_INT ! # define SFS_TYPE SFS_USTAT /* use System V ustat(2) syscall */ ! # define GIDSET_T gid_t # ifndef HASGETUSERSHELL # define HASGETUSERSHELL 0 /* does not have getusershell(3) call */ # endif ! # undef WIFEXITED ! # undef WEXITSTATUS ! # ifndef _PATH_UNIX ! # define _PATH_UNIX "/unix" ! # endif ! # ifndef _PATH_SENDMAILCF ! # define _PATH_SENDMAILCF "/var/ucblib/sendmail.cf" ! # endif ! # ifndef _PATH_SENDMAILPID ! # define _PATH_SENDMAILPID "/var/ucblib/sendmail.pid" ! # endif #endif /* ! ** SUMISTATION/SEIUX 3.2 */ ! #ifdef SEIUX ! # ifdef SYSTYPE_BSD ! # define HASUNSETENV 1 /* has unsetenv(3) call */ ! # define HASFLOCK 1 /* has flock(2) call */ ! # endif ! # define LA_TYPE LA_INT # define LA_AVENRUN "avenrun" + # define _PATH_UNIX "/unix" + # define setpgid setpgrp + typedef int pid_t; #endif ! /********************************************************************** ** End of Per-Operating System defines diff -c ../src.org/daemon.c ./daemon.c *** ../src.org/daemon.c Wed Mar 29 11:36:51 1995 --- ./daemon.c Thu Mar 30 11:47:32 1995 *************** *** 36,41 **** --- 36,42 ---- #include "sendmail.h" #ifndef lint + static char Wsccsid[] = "@(#)daemon.c 2.12 (motonori/WIDE) 4/20/94"; #ifdef DAEMON static char sccsid[] = "@(#)daemon.c 8.48.1.5 (Berkeley) 3/28/95 (with daemon mode)"; #else *************** *** 53,58 **** --- 54,63 ---- # include #endif + #if CANON_MX_CNTL + int TryMXforCanon = 0; + #endif /* CANON_MX_CNTL */ + /* ** DAEMON.C -- routines to use when running as a daemon. ** *************** *** 733,738 **** --- 738,770 ---- i = 1; } + #if NAMED_BIND && SHOW_MX_HOSTS + if (OpMode == MD_TEST) { + printf("%s", anynet_ntoa(&addr)); + while (hp && hp->h_addr_list[i]) + { + switch (addr.sa.sa_family) + { + #ifdef NETINET + case AF_INET: + bcopy(hp->h_addr_list[i++], + &addr.sin.sin_addr, + hp->h_length); + break; + #endif + + default: + bcopy(hp->h_addr_list[i++], + addr.sa.sa_data, + hp->h_length); + break; + } + printf(", %s", anynet_ntoa(&addr)); + continue; + } + return (EX_OK); + } + #endif /* ** Determine the port number. */ *************** *** 915,962 **** (void) strcpy(hostbuf, "localhost"); } hp = gethostbyname(hostbuf); ! if (hp == NULL) { ! syserr("!My host name (%s) does not seem to exist!", hostbuf); ! } ! (void) strncpy(hostbuf, hp->h_name, size - 1); ! hostbuf[size - 1] = '\0'; ! #if NAMED_BIND ! /* if still no dot, try DNS directly (i.e., avoid NIS problems) */ ! if (strchr(hostbuf, '.') == NULL) ! { ! extern bool getcanonname(); ! extern int h_errno; ! ! /* try twice in case name server not yet started up */ ! if (!getcanonname(hostbuf, size, TRUE) && ! UseNameServer && ! (h_errno != TRY_AGAIN || ! (sleep(30), !getcanonname(hostbuf, size, TRUE)))) { ! errno = h_errno + E_DNSBASE; ! syserr("!My host name (%s) not known to DNS", ! hostbuf); } - } #endif ! if (hp->h_addrtype == AF_INET && hp->h_length == 4) ! { ! register int i; ! ! for (i = 0; hp->h_addr_list[i] != NULL; i++) { ! char ipbuf[100]; ! sprintf(ipbuf, "[%s]", ! inet_ntoa(*((struct in_addr *) hp->h_addr_list[i]))); ! setclass('w', ipbuf); } - } ! return (hp->h_aliases); } /* ** GETAUTHINFO -- get the real host name asociated with a file descriptor --- 947,990 ---- (void) strcpy(hostbuf, "localhost"); } hp = gethostbyname(hostbuf); ! if (hp != NULL) { ! (void) strncpy(hostbuf, hp->h_name, size - 1); ! hostbuf[size - 1] = '\0'; ! #ifdef NAMED_BIND ! /* if still no dot, try DNS directly (i.e., avoid NIS) */ ! if (strchr(hostbuf, '.') == NULL) ! { ! extern bool getcanonname(); ! (void) getcanonname(hostbuf, size, TRUE); ! } ! else ! #else { ! (void) strncpy(hostbuf, hp->h_name, size - 1); ! hostbuf[size - 1] = '\0'; } #endif ! if (hp->h_addrtype == AF_INET && hp->h_length == 4) { ! register int i; ! for (i = 0; hp->h_addr_list[i] != NULL; i++) ! { ! char ipbuf[100]; ! ! sprintf(ipbuf, "[%s]", ! inet_ntoa(*((struct in_addr *) hp->h_addr_list[i]))); ! setclass('w', ipbuf); ! } } ! return (hp->h_aliases); ! } ! else ! return (NULL); } /* ** GETAUTHINFO -- get the real host name asociated with a file descriptor *************** *** 997,1003 **** --- 1025,1035 ---- EVENT *ev; int nleft; char ibuf[MAXNAME + 1]; + #if IDENTPEERSCLS + char bi_buf[MAXHOSTNAMELEN]; + STAB *st; #endif + #endif static char hbuf[MAXNAME * 2 + 2]; extern char *hostnamebyanyaddr(); extern char RealUserName[]; /* main.c */ *************** *** 1019,1024 **** --- 1051,1082 ---- } #if IDENTPROTO + #if IDENTPEERSCLS + p = RealHostName; + while (p != NULL) + { + if ((st = stab(p, ST_CLASS, ST_FIND)) != NULL && + bitnset('i', st->s_class)) + { + break; /* use IDENT proto */ + } + sprintf(bi_buf, "!%s", p); + if ((st = stab(bi_buf, ST_CLASS, ST_FIND)) != NULL && + bitnset('i', st->s_class)) + { + goto noident; /* do not use IDENT proto */ + } + p = strchr(p+1, '.'); + } + if (p == NULL) + { + if ((st = stab("!all", ST_CLASS, ST_FIND)) != NULL && + bitnset('i', st->s_class)) + { + goto noident; /* do not use IDENT proto */ + } + } + #endif if (TimeOuts.to_ident == 0) goto noident; *************** *** 1242,1248 **** --- 1300,1310 ---- printf("host_map_lookup(%s) => ", name); s->s_namecanon.nc_flags |= NCF_VALID; /* will be soon */ (void) strcpy(hbuf, name); + #if CANON_MX_CNTL + if (getcanonname(hbuf, sizeof hbuf - 1, TryMXforCanon)) + #else /* not CANON_MX_CNTL */ if (getcanonname(hbuf, sizeof hbuf - 1, TRUE)) + #endif /* not CANON_MX_CNTL */ { if (tTd(9, 1)) printf("%s\n", hbuf); diff -c ../src.org/deliver.c ./deliver.c *** ../src.org/deliver.c Wed Mar 29 11:26:34 1995 --- ./deliver.c Thu Mar 30 11:49:43 1995 *************** *** 33,38 **** --- 33,39 ---- */ #ifndef lint + static char Wsccsid[] = "@(#)deliver.c 2.18 (motonori/WIDE) 6/29/94"; static char sccsid[] = "@(#)deliver.c 8.84.1.4 (Berkeley) 3/28/95"; #endif /* not lint */ *************** *** 48,53 **** --- 49,58 ---- extern char SmtpError[]; + #if MX_SAFETY + static char *MxSafety = "SAFETY"; + #endif + /* ** SENDALL -- actually send all the messages. ** *************** *** 76,81 **** --- 81,89 ---- register ENVELOPE *ee; ENVELOPE *splitenv = NULL; bool announcequeueup; + #if NAMED_BIND && ANOTHER_MXPB + extern void resethostsignature(); + #endif /* ** If we have had global, fatal errors, don't bother sending *************** *** 498,503 **** --- 506,514 ---- (void) deliver(e, q); } } + #if NAMED_BIND && ANOTHER_MXPB + resethostsignature(); + #endif Verbose = oldverbose; #ifdef XDEBUG *************** *** 618,624 **** --- 629,645 ---- char buf[MAXNAME]; char rpathbuf[MAXNAME]; /* translated return path */ extern int checkcompat(); + #if NAMED_BIND && ANOTHER_MXPB + bool needtrim = FALSE; + extern int cmphostsignature(); + extern bool trimhostsignature(); + #endif + #if ANOTHER_MXPB || MULTI_MAILER + /* retry on next MX/mailer */ + retry_deliver:; + #endif + errno = 0; if (bitset(QDONTSEND|QBADADDR|QQUEUEUP, to->q_flags)) return (0); *************** *** 774,780 **** --- 795,806 ---- /* if already sent or not for this host, don't send */ if (bitset(QDONTSEND|QBADADDR|QQUEUEUP, to->q_flags) || to->q_mailer != firstto->q_mailer || + #if NAMED_BIND && ANOTHER_MXPB + cmphostsignature(firstsig, + hostsignature(to->q_mailer, to->q_host, e)) != 0) + #else strcmp(hostsignature(to->q_mailer, to->q_host, e), firstsig) != 0) + #endif continue; /* avoid overflowing tobuf */ *************** *** 1021,1027 **** --- 1047,1057 ---- else port = 0; tryhost: + #if NAMED_BIND && ANOTHER_MXPB + if (*curhost != '\0') + #else while (*curhost != '\0') + #endif { register char *p; static char hostbuf[MAXNAME]; *************** *** 1034,1040 **** --- 1064,1074 ---- { syserr("deliver: null host name in signature"); curhost++; + #if NAMED_BIND && ANOTHER_MXPB + goto skip_loop; + #else continue; + #endif } strncpy(hostbuf, curhost, p - curhost); hostbuf[p - curhost] = '\0'; *************** *** 1053,1068 **** --- 1087,1113 ---- mci_dump(mci, FALSE); } CurHostName = mci->mci_host; + #if NAMED_BIND && ANOTHER_MXPB + goto skip_loop; + #else break; + #endif } mci->mci_mailer = m; if (mci->mci_exitstat != EX_OK) + #if NAMED_BIND && ANOTHER_MXPB + goto skip_loop; + #else continue; + #endif /* try the connection */ setproctitle("%s %s: %s", e->e_id, hostbuf, "user open"); message("Connecting to %s (%s)...", hostbuf, m->m_name); + #if MX_SAFETY + p = mci->mci_phase; + #endif i = makeconnection(hostbuf, port, mci, bitnset(M_SECURE_PORT, m->m_flags)); mci->mci_exitstat = i; *************** *** 1070,1075 **** --- 1115,1132 ---- #if NAMED_BIND mci->mci_herrno = h_errno; #endif + #if MX_SAFETY + if ((i == EX_NOHOST) && (p == MxSafety)) + { + mci->mci_exitstat = i = EX_TEMPFAIL; + #ifdef LOG + if (LogLevel > 8) + syslog(LOG_INFO, "%s: MX %s eliminated", + e->e_id ? e->e_id : "NOQUEUE", + hostbuf); + #endif + } + #endif /* MX_SAFETY */ if (i == EX_OK) { mci->mci_state = MCIS_OPENING; *************** *** 1077,1083 **** --- 1134,1144 ---- if (TrafficLogFile != NULL) fprintf(TrafficLogFile, "%05d == CONNECT %s\n", getpid(), hostbuf); + #if NAMED_BIND && ANOTHER_MXPB + goto skip_loop; + #else break; + #endif } else if (tTd(11, 1)) printf("openmailer: makeconnection => stat=%d, errno=%d\n", *************** *** 1088,1093 **** --- 1149,1157 ---- /* should print some message here for -v mode */ } + #if NAMED_BIND && ANOTHER_MXPB + skip_loop: + #endif if (mci == NULL) { syserr("deliver: no host name"); *************** *** 1293,1298 **** --- 1357,1365 ---- i = 0; env[i++] = "AGENT=sendmail"; + #ifdef DGUX + env[i++] = "_FORCE_MAIL_LOCAL_=yes"; + #endif for (ep = environ; *ep != NULL; ep++) { if (strncmp(*ep, "TZ=", 3) == 0 || *************** *** 1392,1398 **** --- 1459,1469 ---- else if (rcode == EX_TEMPFAIL && curhost != NULL && *curhost != '\0') { /* try next MX site */ + #if NAMED_BIND && ANOTHER_MXPB + goto try_next; + #else goto tryhost; + #endif } } else if (!clever) *************** *** 1421,1436 **** --- 1492,1534 ---- { register char *t = tobuf; register int i; + #if NAMED_BIND && ANOTHER_MXPB && RCPT_NEXT + register ADDRESS *prevto; + #endif /* send the recipient list */ tobuf[0] = '\0'; + #if NAMED_BIND && ANOTHER_MXPB && RCPT_NEXT + for (prevto = NULL, to = tochain; to != NULL; + prevto = to, to = to->q_tchain) + #else for (to = tochain; to != NULL; to = to->q_tchain) + #endif { e->e_to = to->q_paddr; if ((i = smtprcpt(to, m, mci, e)) != EX_OK) { + #if NAMED_BIND && ANOTHER_MXPB && RCPT_NEXT + if (i == EX_TEMPFAIL && strchr( + hostsignature(m, to->q_host, e), + ':') != NULL) + { + to->q_flags &= ~QDONTSEND; + if (prevto) + prevto->q_tchain = + to->q_tchain; + else + tochain = to->q_tchain; + needtrim = TRUE; + } else { + markfailure(e, to, i); + giveresponse(i, m, mci, + ctladdr, e); + } + #else markfailure(e, to, i); giveresponse(i, m, mci, ctladdr, e); + #endif } else { *************** *** 1448,1453 **** --- 1546,1554 ---- e->e_to = NULL; if (bitset(MCIF_CACHED, mci->mci_flags)) smtprset(m, mci, e); + #if NAMED_BIND && ANOTHER_MXPB + goto try_next; + #endif } else { *************** *** 1459,1469 **** --- 1560,1636 ---- if (!bitset(MCIF_CACHED, mci->mci_flags)) smtpquit(m, mci, e); } + #if NAMED_BIND && ANOTHER_MXPB + if (rcode != EX_OK && *curhost != '\0' || + !(firstto->q_flags & QDONTSEND)) + { + try_next: + /* for succeeded delivery */ + if (!(firstto->q_flags & QDONTSEND) && rcode == EX_OK) + { + if (tobuf[0] != '\0') + giveresponse(rcode, m, mci, ctladdr, e); + for (to = tochain; to; to = to->q_tchain) + { + to->q_flags |= QSENT; + e->e_nsent++; + } + } + /* for unsucceeded delivery */ + if (firstto->q_flags & QDONTSEND && rcode != EX_OK) + { + #if RCPT_NEXT + register ADDRESS *prevto; + + for (prevto = NULL, to = tochain; to != NULL; + prevto = to, to = to->q_tchain) + #else + for (to = tochain; to; to = to->q_tchain) + #endif + { + if (strchr(hostsignature(m, to->q_host, + e), ':') != NULL) + { + /* retry next MX */ + to->q_flags &= ~QDONTSEND; + #if RCPT_NEXT + if (prevto) + prevto->q_tchain = + to->q_tchain; + else + tochain = to->q_tchain; + #endif + } else { + /* no more MX */ + markfailure(e, to, rcode); + giveresponse(rcode, m, mci, + ctladdr, e); + } + } + } + if (trimhostsignature(firstsig)) + { + /* if next MX RR exists */ + /* re-initialize variables */ + to = firstto; + clever = FALSE; + tochain = NULL; + needtrim = FALSE; + goto retry_deliver; + } + } + if (needtrim) + { + needtrim = FALSE; + trimhostsignature(firstsig); + } + #else if (rcode != EX_OK && curhost != NULL && *curhost != '\0') { /* try next MX site */ goto tryhost; } + #endif } #else /* not SMTP */ { *************** *** 1495,1500 **** --- 1662,1706 ---- give_up: if (tobuf[0] != '\0') giveresponse(rcode, m, mci, ctladdr, e); + # if MULTI_MAILER + if (rcode != EX_OK) + { + bool mailer_changed = FALSE; + int i; + + if (firstto->q_mailers[1] != NULL) + { + mailer_changed = TRUE; + } + for (to = tochain; to != NULL; to = to->q_tchain) + { + if (to->q_mailers[1] != NULL) { + to->q_flags &= ~QDONTSEND; + /* change to next mailer */ + for (i = 0; i < MAXDSPTMAILERS - 1; i++) + { + to->q_mailers[i] = to->q_mailers[i+1]; + to->q_hosts[i] = to->q_hosts[i+1]; + to->q_users[i] = to->q_users[i+1]; + } + to->q_mailers[MAXDSPTMAILERS-1] = NULL; + to->q_hosts[MAXDSPTMAILERS-1] = NULL; + to->q_users[MAXDSPTMAILERS-1] = NULL; + } else if (mailer_changed) + { + markfailure(e, to, rcode); + } + } + if (mailer_changed) + { + /* re-initialize variables */ + to = firstto; + clever = FALSE; + tochain = NULL; + goto retry_deliver; + } + } + # endif for (to = tochain; to != NULL; to = to->q_tchain) { if (rcode != EX_OK) *************** *** 1564,1569 **** --- 1770,1778 ---- case EX_TEMPFAIL: case EX_IOERR: case EX_OSERR: + #if PERROR_QUP + case EX_PROTOCOL: + #endif q->q_flags |= QQUEUEUP; break; *************** *** 2303,2309 **** /*NOTREACHED*/ } } ! /* ** HOSTSIGNATURE -- return the "signature" for a host. ** ** The signature describes how we are going to send this -- it --- 2512,2527 ---- /*NOTREACHED*/ } } ! ! #if NAMED_BIND && ANOTHER_MXPB ! struct SigList { ! STAB *stab; /* pointer to stab structure */ ! char *signature; /* pointer to original signature string */ ! struct SigList *next; ! } *siglist = NULL; ! #endif ! ! /* ** HOSTSIGNATURE -- return the "signature" for a host. ** ** The signature describes how we are going to send this -- it *************** *** 2339,2345 **** --- 2557,2566 ---- char *endp; int oldoptions; char *mxhosts[MAXMXHOSTS + 1]; + #if ANOTHER_MXPB + struct SigList *slp; #endif + #endif /* ** Check to see if this uses IPC -- if not, it can't have MX records. *************** *** 2399,2404 **** --- 2620,2639 ---- len = 0; for (i = 0; i < nmx; i++) { + #if MX_SAFETY + register MCI *mci; + + if (strncasecmp(hp, mxhosts[i], strlen(hp)) != 0) + { + mci = mci_get(mxhosts[i], m); + if (mci->mci_state == MCIS_CLOSED && + mci->mci_exitstat == EX_OK && + mci->mci_phase == NULL) + { + mci->mci_phase = MxSafety; + } + } + #endif /* MX_SAFETY */ len += strlen(mxhosts[i]) + 1; } if (s->s_hostsig != NULL) *************** *** 2425,2430 **** --- 2660,2672 ---- *endp++ = ':'; } makelower(s->s_hostsig); + #if NAMED_BIND && ANOTHER_MXPB + slp = (struct SigList*)xalloc(sizeof(struct SigList)); + slp->stab = s; + slp->signature = s->s_hostsig; + slp->next = siglist; + siglist = slp; + #endif if (ConfigLevel < 2) _res.options = oldoptions; #else *************** *** 2435,2437 **** --- 2677,2791 ---- printf("hostsignature(%s) = %s\n", host, s->s_hostsig); return s->s_hostsig; } + + #if NAMED_BIND && ANOTHER_MXPB + /* + ** CMPHOSTSIGNATURE -- compare the first entries of two hostsignatures. + ** + ** Parameters: + ** sig1 -- hostsignature 1 + ** sig2 -- hostsignature 2 + ** + ** Returns: + ** 0 is the first entries of two hostsignatures are equal. + ** + ** Side Effects: + ** None. + */ + + int + cmphostsignature(sig1, sig2) + char *sig1, *sig2; + { + char *p1, *p2, *index(); + int result; + + if (sig1 == NULL || sig2 == NULL) + return 1; + p1 = index(sig1, ':'); + if (p1 != NULL) + *p1 = '\0'; + p2 = index(sig2, ':'); + if (p2 != NULL) + *p2 = '\0'; + result = strcmp(sig1, sig2); + if (p1 != NULL) + *p1 = ':'; + if (p2 != NULL) + *p2 = ':'; + return result; + } + /* + ** TRIMHOSTSIGNATURE -- remove a specified entry from every hostsignature. + ** + ** Parameters: + ** sig -- a signature whose first entry is to be deleted + ** + ** Returns: + ** True if one or more entry remains. + ** + ** Side Effects: + ** Can tweak the symbol table. + */ + + bool + trimhostsignature(sig) + char *sig; + { + char sigbuf[MAXNAME]; + struct SigList *slp; + char *p; + int n; + bool remains; + + if (sig == NULL) + return FALSE; + p = strchr(sig, ':'); + if (p != NULL) + { + n = p - sig; + remains = TRUE; + } else { + n = strlen(sig); + remains = FALSE; + } + strncpy(sigbuf, sig, n); + sigbuf[n] = '\0'; + + for (slp = siglist; slp != NULL; slp = slp->next) + { + if (cmphostsignature(slp->stab->s_hostsig, sigbuf) == 0) + { + p = strchr(slp->stab->s_hostsig, ':'); + if (p != NULL) + { + slp->stab->s_hostsig = p+1; + } + } + } + return remains; + } + /* + ** RESETHOSTSIGNATURE -- recover all hostsignature. + ** + ** Parameters: + ** none + ** + ** Returns: + ** none + ** + ** Side Effects: + ** Can tweak the symbol table. + */ + + void + resethostsignature() + { + struct SigList *slp; + + for (slp = siglist; slp != NULL; slp = slp->next) + { + slp->stab->s_hostsig = slp->signature; + } + } + #endif diff -c ../src.org/domain.c ./domain.c *** ../src.org/domain.c Tue Mar 7 09:03:18 1995 --- ./domain.c Thu Mar 30 11:47:34 1995 *************** *** 35,40 **** --- 35,41 ---- #include "sendmail.h" #ifndef lint + static char Wsccsid[] = "@(#)domain.c 2.10 (motonori/WIDE) 3/14/94"; #if NAMED_BIND static char sccsid[] = "@(#)domain.c 8.19.1.1 (Berkeley) 3/6/95 (with name server)"; #else *************** *** 78,83 **** --- 79,92 ---- #define LONGSIZE 4 /* size of a long (really, must be 4) */ #define MAXCNAMEDEPTH 10 /* maximum depth of CNAME recursion */ + + #if CANON_OTHER + #ifndef T_TXT /* shoud be defined in arpa/nameser.h */ + #define T_TXT 16 /* text strings */ + #endif + + char Qseq[QSEQSIZ] = {T_A}; /* default is T_A only */ + #endif /* CANON_OTHER */ /* ** GETMXRR -- get MX resource records for a domain ** *************** *** 451,456 **** --- 460,468 ---- char nbuf[MAX(PACKETSZ, MAXDNAME*2+2)]; char *searchlist[MAXDNSRCH+2]; extern char *gethostalias(); + #if CANON_OTHER + int i; + #endif /* CANON_OTHER */ if (tTd(8, 2)) printf("getcanonname(%s)\n", host); *************** *** 493,500 **** --- 505,522 ---- *dp++ = ""; if (n >= 0 && *--cp != '.' && bitset(RES_DNSRCH, _res.options)) { + # if 1 /* VERIFY_DNSRCH */ + for (i = 0; i < MAXDNSRCH && _res.dnsrch[i] != NULL; i++) + *dp++ = _res.dnsrch[i]; + if (i == MAXDNSRCH && _res.dnsrch[i]) + { + syserr("Inconsistent with resolver."); + exit(EX_OSERR); + } + # else /* original */ for (domain = _res.dnsrch; *domain != NULL; ) *dp++ = *domain++; + # endif } else if (n == 0 && bitset(RES_DEFNAMES, _res.options)) { *************** *** 520,525 **** --- 542,557 ---- if (tTd(8, 5)) printf("getcanonname: trying %s.%s (%s)\n", host, *dp, qtype == T_ANY ? "ANY" : qtype == T_A ? "A" : + #if CANON_OTHER + qtype == T_HINFO ? "HINFO" : + qtype == T_MINFO ? "MINFO" : + qtype == T_NS ? "NS" : + qtype == T_NULL ? "NULL" : + qtype == T_PTR ? "PTR" : + qtype == T_SOA ? "SOA" : + qtype == T_TXT ? "TXT" : + qtype == T_WKS ? "WKS" : + #endif /* CANON_OTHER */ qtype == T_MX ? "MX" : "???"); ret = res_querydomain(host, *dp, C_IN, qtype, &answer, sizeof(answer)); *************** *** 544,554 **** --- 576,614 ---- qtype = T_A; continue; } + #if CANON_OTHER + if (*dp == '\0') { + /* search as absolute address */ + if (qtype == T_A && !gotmx) + { + qtype = T_MX; + continue; + } + } else { + int nextq = 0; + /* local domain part will be appended */ + for (i = 0; Qseq[i]; i++) { + if (qtype == Qseq[i]) { + nextq = Qseq[i+1]; + if (!nextq && !gotmx + && trymx) { + nextq = T_MX; + } + break; + } + } + if (nextq) { + qtype = nextq; + continue; + } + } + #else /* not CANON_OTHER */ else if (qtype == T_A && !gotmx && trymx) { qtype = T_MX; continue; } + #endif /* not CANON_OTHER */ } if (mxmatch != NULL) *************** *** 654,661 **** --- 714,734 ---- goto cnameloop; default: + #if CANON_OTHER + for (i = 0; Qseq[i]; i++) { + if (type == Qseq[i]) { + /* good show */ + amatch = TRUE; + break; + } + } + + /* continue in case a CNAME also exists */ + continue; + #else /* CANON_OTHER */ /* not a record of interest */ continue; + #endif /* CANON_OTHER */ } } *************** *** 673,678 **** --- 746,780 ---- if (qtype == T_ANY) qtype = T_A; + #if CANON_OTHER + else if (*dp == '\0') { + /* search as absolute address */ + if (qtype == T_A && !gotmx) { + qtype = T_MX; + } + } else { + int nextq = 0; + /* local domain part will be appended */ + for (i = 0; Qseq[i]; i++) { + if (qtype == Qseq[i]) { + nextq = Qseq[i+1]; + if (!nextq && !gotmx && trymx) { + nextq = T_MX; + } + break; + } + } + if (nextq) { + qtype = nextq; + continue; + } else { + /* really nothing in this domain; + try the next */ + qtype = T_ANY; + dp++; + } + } + #else /* not CANON_OTHER */ else if (qtype == T_A && !gotmx && trymx) qtype = T_MX; else *************** *** 681,686 **** --- 783,789 ---- qtype = T_ANY; dp++; } + #endif /* not CANON_OTHER */ } if (mxmatch == NULL) diff -c ../src.org/macro.c ./macro.c *** ../src.org/macro.c Fri Feb 10 05:22:00 1995 --- ./macro.c Thu Mar 30 11:47:34 1995 *************** *** 33,39 **** */ #ifndef lint ! static char sccsid[] = "@(#)macro.c 8.3 (Berkeley) 2/7/94"; #endif /* not lint */ # include "sendmail.h" --- 33,40 ---- */ #ifndef lint ! static char Wsccsid[] = "@(#)macro.c 2.4 (motonori/WIDE) 2/9/94"; ! static char sccsid[] = "@(#)macro.c 8.3 (Berkeley) 2/7/94"; #endif /* not lint */ # include "sendmail.h" *************** *** 115,121 **** --- 116,131 ---- continue; case MACROEXPAND: /* macro interpolation */ + #if EXTEND_MACRO + c = *++s & 0377; + if (c & 0x80) { + if (tTd(35, 9)) + printf("expand: extend macro ^%c\n", + c & 0177); + } + #else c = *++s & 0177; + #endif if (c != '\0') q = macvalue(c, e); else *************** *** 242,252 **** --- 252,274 ---- { if (tTd(35, 9)) { + #if EXTEND_MACRO + if (n & 0x80) + printf("define(^%c as ", n & 0x7f); + else + printf("define(%c as ", n); + #else /* not EXTEND_MACRO */ printf("define(%c as ", n); + #endif /* not EXTEND_MACRO */ + xputs(v); printf(")\n"); } + #if EXTEND_MACRO + e->e_macro[n & 0377] = v; + #else /* not EXTEND_MACRO */ e->e_macro[n & 0177] = v; + #endif /* not EXTEND_MACRO */ } /* ** MACVALUE -- return uninterpreted value of a macro. *************** *** 266,272 **** --- 288,298 ---- int n; register ENVELOPE *e; { + #if EXTEND_MACRO + n &= 0377; + #else /* not EXTEND_MACRO */ n &= 0177; + #endif /* not EXTEND_MACRO */ while (e != NULL) { register char *p = e->e_macro[n]; diff -c ../src.org/mailq.0 ./mailq.0 *** ../src.org/mailq.0 Thu Mar 30 11:52:13 1995 --- ./mailq.0 Thu Mar 30 11:47:34 1995 *************** *** 0 **** --- 1,39 ---- + MAILQ(1) UNIX Reference Manual MAILQ(1) + + NAME + mailq - print the mail queue + + SYNOPSIS + mailq [-v] + + DESCRIPTION + Mailq prints a summary of the mail messages queued for future delivery. + + The first line printed for each message shows the internal identifier + used on this host for the message, the size of the message in bytes, the + date and time the message was accepted into the queue, and the envelope + sender of the message. The second line shows the error message that + caused this message to be retained in the queue; it will not be present + if the message is being processed for the first time. The following + lines show message recipients, one per line. + + Mailq is completely equivalent to /_u_s_r/_s_b_i_n/_s_e_n_d_m_a_i_l -bp. + + Parameters + + -v Print verbose information. This adds the priority of the + message and a single character indicator (``+'' or blank) in- + dicating whether a warning message has been sent on the first + line of the message. Additionally, extra lines may be inter- + mixed with the recipients indicating the ``controlling user'' + information; this shows who will own any programs that are + executed on behalf of this message and the name of the alias + this command expanded from, if any. + + SEE ALSO + sendmail(8) + + HISTORY + The mailq command appeared in 4.0BSD. + + 4th Berkeley Distribution February 2, 1994 1 diff -c ../src.org/main.c ./main.c *** ../src.org/main.c Mon Mar 6 03:10:24 1995 --- ./main.c Thu Mar 30 11:47:35 1995 *************** *** 39,44 **** --- 39,45 ---- #endif /* not lint */ #ifndef lint + static char Wsccsid[] = "@(#)main.c 2.10 (motonori/WIDE) 4/20/94"; static char sccsid[] = "@(#)main.c 8.55.1.7 (Berkeley) 3/5/95"; #endif /* not lint */ *************** *** 129,134 **** --- 130,139 ---- char **av; extern int finis(); extern char Version[]; + # if LOGWVERSION + extern char WVersion[]; + extern char WhoAndWhere[]; + # endif /* LOGWVERSION */ char *ep, *from; typedef int (*fnptr)(); STAB *st; *************** *** 267,272 **** --- 272,280 ---- #if defined(NeXT) # define OPTIONS "B:b:C:cd:e:F:f:h:IimnOo:p:q:r:sTtvX:" #endif + #if defined(sony_news) + # define OPTIONS "B:b:C:cd:e:F:f:h:IJ:imno:p:q:r:sTtvX:" + #endif #ifndef OPTIONS # define OPTIONS "B:b:C:cd:e:F:f:h:Iimno:p:q:r:sTtvX:" #endif *************** *** 623,628 **** --- 631,641 ---- case 'O': /* random flag that NeXT Mail.app passes */ break; # endif + # if defined(sony_news) + case 'J': /* ignore flags for Japanese code conversion + (-J, -JE or -JS) impremented on Sony NEWS */ + break; + # endif default: ExitStat = EX_USAGE; *************** *** 958,963 **** --- 971,984 ---- { int stat; + # if NAMED_BIND && SHOW_MX_HOSTS + if (strcasecmp(p, "mx") == 0) + { + static void showmxhost(); + showmxhost(pvp); + break; + } + # endif stat = rewrite(pvp, atoi(p), 0, CurEnv); if (stat != EX_OK) printf("== Ruleset %s status %d\n", *************** *** 1019,1024 **** --- 1040,1049 ---- strcat(dtype, "+debugging"); #ifdef LOG + # if LOGWVERSION + syslog(LOG_INFO, "%s", WVersion); + syslog(LOG_INFO, "%s", WhoAndWhere); + # endif /* LOGWVERSION */ syslog(LOG_INFO, "starting daemon (%s): %s", Version, dtype + 1); #endif #ifdef XLA *************** *** 1388,1393 **** --- 1413,1425 ---- if (ap[0] != '-' || ap[1] == '-') return; + # if defined(sony_news) + /* if -J doesn't have an argument, use -JJ */ + /* this process should be before the following "skip over" */ + /* routine. this option has very odd expression... */ + if (ap[1] == 'J' && ap[2] == '\0') + *argv = "-JJ"; + # endif /* skip over options that do have a value */ op = strchr(OPTIONS, ap[1]); if (op != NULL && *++op == ':' && ap[2] == '\0' && *************** *** 1456,1463 **** --- 1488,1564 ---- vsprintf(p, msg, ap); VA_END; addheader("X-Authentication-Warning", buf, e); + # if LOG && AUTH_LOG + if (LogLevel > 0) + syslog(LOG_INFO, "Authentication-Warning: %s", buf); + # endif } } + + /* + ** SHOWMXHOST -- print MX hosts on testing + ** + ** Parameters: + ** pvp -- pointer to token vector + ** + ** Returns: + ** none. + */ + + # if NAMED_BIND && SHOW_MX_HOSTS + static void + showmxhost(pvp) + char **pvp; + { + ADDRESS *buildaddr(); + char *hostsignature(); + register MCI *mci; + register ADDRESS *a; + register char **mvp, *p, *q; + int i; + + OpMode = MD_VERIFY; + a = buildaddr(pvp, NULLADDR, RF_COPYALL, CurEnv); + OpMode = MD_TEST; + if (a == NULL || a->q_host == NULL || a->q_mailer == NULL) + return; + if (strcmp(a->q_mailer->m_mailer, "[IPC]") != 0 && + strcmp(a->q_mailer->m_mailer, "[TCP]") != 0) + return; + p = hostsignature(a->q_mailer, a->q_host, CurEnv); + printf("Mail exchanger(s):\n"); + while (p != NULL) + { + q = strchr(p, ':'); + if (q != NULL) + { + *q = '\0'; + } + printf("\t%s = ", p); + mci = mci_get(p, a->q_mailer); + i = mci->mci_exitstat; + if (i == EX_OK) + i = makeconnection(p, 0, mci, FALSE); + switch (i) + { + case EX_OK: + printf("\n"); + break; + case EX_TEMPFAIL: + printf("(name server lookup failure)\n"); + break; + default: + printf("(address unknown)\n"); + } + p = q; + if (q != NULL) + { + *q = ':'; + p++; + } + } + } + # endif /* ** DUMPSTATE -- dump state ** diff -c ../src.org/newaliases.0 ./newaliases.0 *** ../src.org/newaliases.0 Thu Mar 30 11:52:13 1995 --- ./newaliases.0 Thu Mar 30 11:47:35 1995 *************** *** 0 **** --- 1,22 ---- + NEWALIASES(1) UNIX Reference Manual NEWALIASES(1) + + NAME + newaliases - rebuild the data base for the mail aliases file + + SYNOPSIS + newaliases + + DESCRIPTION + Newaliases rebuilds the random access data base for the mail aliases file + /_e_t_c/_a_l_i_a_s_e_s. It must be run each time /_e_t_c/_a_l_i_a_s_e_s is changed in order + for the change to take effect. + + Newaliases is completely equivalent to /_u_s_r/_s_b_i_n/_s_e_n_d_m_a_i_l -bi. + + SEE ALSO + aliases(5), sendmail(8) + + HISTORY + The newaliases command appeared in 4.0BSD. + + 4th Berkeley Distribution February 3, 1994 1 diff -c ../src.org/newvers.sh ./newvers.sh *** ../src.org/newvers.sh Thu Mar 30 11:52:13 1995 --- ./newvers.sh Thu Mar 30 11:47:36 1995 *************** *** 0 **** --- 1,40 ---- + #!/bin/sh - + # + # Copyright (c) 1987 Regents of the University of California. + # All rights reserved. + # + # Redistribution and use in source and binary forms are permitted + # provided that the above copyright notice and this paragraph are + # duplicated in all such forms and that any documentation, + # advertising materials, and other materials related to such + # distribution and use acknowledge that the software was developed + # by the University of California, Berkeley. The name of the + # University may not be used to endorse or promote products derived + # from this software without specific prior written permission. + # THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR + # IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED + # WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. + # + # @(#)newvers.sh 2.4 (motonori/WIDE) 3/16/94 + # @(#)newvers.sh 4.6 (Berkeley) 5/11/89 + # + + PATH=/usr/ucb:/bin:/usr/bin:/usr/local/bin + export PATH + + # for JLE, etc... + LANG=C + export LANG + + umask 0022 + + if [ ! -r version ] + then + echo 0 > version + fi + touch version + rm -f version.o Version.c + v=`cat version` u=${USER-root} d=`pwd` h=`hostname` t=`date` + sed -e "s|%VERSION%|#${v}: ${t}|" -e "s|%WHOANDWHERE%|${u}@${h}:${d}|" \ + < version.c > Version.c + echo `expr ${v} + 1` > version diff -c ../src.org/parseaddr.c ./parseaddr.c *** ../src.org/parseaddr.c Fri Feb 10 05:22:04 1995 --- ./parseaddr.c Thu Mar 30 11:47:36 1995 *************** *** 33,38 **** --- 33,39 ---- */ #ifndef lint + static char Wsccsid[] = "@(#)parseaddr.c 2.11 (motonori/WIDE) 4/20/94"; static char sccsid[] = "@(#)parseaddr.c 8.31 (Berkeley) 4/15/94"; #endif /* not lint */ *************** *** 754,760 **** --- 755,766 ---- mlp->last = avp++; cataddr(mlp->first, mlp->last, buf, sizeof buf, '\0'); s = stab(buf, ST_CLASS, ST_FIND); + #if EXTEND_CLASS + if (s == NULL || !bitnset((unsigned char)rp[1], + s->s_class)) + #else /* not EXTEND_CLASS */ if (s == NULL || !bitnset(rp[1], s->s_class)) + #endif /* not EXTEND_CLASS */ { if (tTd(21, 36)) { *************** *** 774,780 **** --- 780,791 ---- case MATCHNCLASS: /* match any token not in a class */ s = stab(ap, ST_CLASS, ST_FIND); + #if EXTEND_CLASS + if (s != NULL && bitnset((unsigned char)rp[1], + s->s_class)) + #else /* not EXTEND_CLASS */ if (s != NULL && bitnset(rp[1], s->s_class)) + #endif /* not EXTEND_CLASS */ goto backup; /* fall through */ *************** *** 809,815 **** --- 820,830 ---- ** work for the usual cases. */ + #if EXTEND_MACRO + ap = macvalue((unsigned char)rp[1], e); + #else /* not EXTEND_MACRO */ ap = macvalue(rp[1], e); + #endif /* not EXTEND_MACRO */ mlp->first = avp; if (tTd(21, 2)) printf("rewrite: LHS $&%c => \"%s\"\n", *************** *** 1015,1021 **** --- 1030,1043 ---- char *argvect[10]; char pvpbuf[PSBUFSIZE]; char *nullpvp[1]; + #if NO_ALIAS_ON_REBUILD + int dbno; + bool nolookup; + extern MAP *AliasDB[]; + extern int NAliasDBs; + #endif + if ((**rvp & 0377) != HOSTBEGIN && (**rvp & 0377) != LOOKUPBEGIN) continue; *************** *** 1097,1103 **** --- 1119,1143 ---- /* look it up */ cataddr(key_rvp, NULL, buf, sizeof buf, '\0'); argvect[0] = buf; + #if NO_ALIAS_ON_REBUILD + nolookup = FALSE; + if (OpMode == MD_INITALIAS) + { + for (dbno = 0; dbno < NAliasDBs; dbno++) + { + if (map->s_map.map_file != NULL + && strcmp(map->s_map.map_file, + AliasDB[dbno]->map_file) == 0) + { + nolookup = TRUE; + break; + } + } + } + if (!nolookup && map != NULL && bitset(MF_OPEN, map->s_map.map_mflags)) + #else if (map != NULL && bitset(MF_OPEN, map->s_map.map_mflags)) + #endif { auto int stat = EX_OK; *************** *** 1265,1270 **** --- 1305,1315 ---- static MAILER errormailer; static char *errorargv[] = { "ERROR", NULL }; static char buf[MAXNAME]; + # if MULTI_MAILER + char **tvnext; + char *tvsave; + int nmailer = 0; + # endif if (tTd(24, 5)) { *************** *** 1276,1281 **** --- 1321,1344 ---- a = (ADDRESS *) xalloc(sizeof *a); bzero((char *) a, sizeof *a); + # if MULTI_MAILER + tvnext = tv; + do { + while (*++tvnext != NULL) + { + if ((**tvnext & 0377) == CANONNET) + { + break; + } + } + if (*tvnext != NULL) + { + tvsave = *tvnext; + *tvnext = NULL; + } else { + tvnext = NULL; + } + # endif /* figure out what net/mailer to use */ if (*tv == NULL || (**tv & 0377) != CANONNET) { *************** *** 1282,1288 **** --- 1345,1355 ---- syserr("554 buildaddr: no net"); badaddr: a->q_flags |= QBADADDR; + # if MULTI_MAILER + a->q_mailers[nmailer] = &errormailer; + # else a->q_mailer = &errormailer; + # endif if (errormailer.m_name == NULL) { /* initialize the bogus mailer */ *************** *** 1346,1352 **** --- 1413,1423 ---- syserr("554 buildaddr: unknown mailer %s", *tv); goto badaddr; } + # if MULTI_MAILER + a->q_mailers[nmailer] = m; + # else a->q_mailer = m; + # endif /* figure out what host (if any) */ tv++; *************** *** 1374,1380 **** --- 1445,1455 ---- spaceleft -= i; } *bp = '\0'; + # if MULTI_MAILER + a->q_hosts[nmailer] = newstr(buf); + # else a->q_host = newstr(buf); + # endif } else { *************** *** 1383,1389 **** --- 1458,1468 ---- syserr("554 buildaddr: no host"); goto badaddr; } + # if MULTI_MAILER + a->q_hosts[nmailer] = NULL; + # else a->q_host = NULL; + # endif } /* figure out the user */ *************** *** 1402,1410 **** --- 1481,1497 ---- if (*p == '"') p++; if (*p == '|') + # if MULTI_MAILER + a->q_mailers[nmailer] = m = ProgMailer; + # else a->q_mailer = m = ProgMailer; + # endif else if (*p == '/') + # if MULTI_MAILER + a->q_mailers[nmailer] = m = FileMailer; + # else a->q_mailer = m = FileMailer; + # endif else if (*p == ':') { /* may be :include: */ *************** *** 1413,1420 **** --- 1500,1512 ---- if (strncasecmp(buf, ":include:", 9) == 0) { /* if :include:, don't need further rewriting */ + # if MULTI_MAILER + a->q_mailers[nmailer] = m = InclMailer; + a->q_users[nmailer] = &buf[9]; + # else a->q_mailer = m = InclMailer; a->q_user = &buf[9]; + # endif return (a); } } *************** *** 1427,1433 **** --- 1519,1529 ---- } /* rewrite according recipient mailer rewriting rules */ + # if MULTI_MAILER + define('h', a->q_hosts[nmailer], e); + # else define('h', a->q_host, e); + # endif if (!bitset(RF_SENDERADDR|RF_HEADERADDR, flags)) { /* sender addresses done later */ *************** *** 1439,1455 **** --- 1535,1571 ---- /* save the result for the command line/RCPT argument */ cataddr(tv, NULL, buf, sizeof buf, '\0'); + # if MULTI_MAILER + a->q_users[nmailer] = buf; + # else a->q_user = buf; + # endif /* ** Do mapping to lower case as requested by mailer */ + # if MULTI_MAILER + if (a->q_hosts[nmailer] != NULL && !bitnset(M_HST_UPPER, m->m_flags)) + makelower(a->q_hosts[nmailer]); + if (!bitnset(M_USR_UPPER, m->m_flags)) + makelower(a->q_users[nmailer]); + # else if (a->q_host != NULL && !bitnset(M_HST_UPPER, m->m_flags)) makelower(a->q_host); if (!bitnset(M_USR_UPPER, m->m_flags)) makelower(a->q_user); + # endif + # if MULTI_MAILER + if (tvnext != NULL) + { + *tvnext = tvsave; + tv = tvnext; + nmailer++; + } + } while (tvnext && (nmailer < MAXDSPTMAILERS)); + # endif return (a); } /* diff -c ../src.org/readcf.c ./readcf.c *** ../src.org/readcf.c Mon Mar 6 03:36:11 1995 --- ./readcf.c Thu Mar 30 11:47:37 1995 *************** *** 33,38 **** --- 33,39 ---- */ #ifndef lint + static char Wsccsid[] = "@(#)readcf.c 2.11 (motonori/WIDE) 4/8/94"; static char sccsid[] = "@(#)readcf.c 8.23.1.3 (Berkeley) 3/5/95"; #endif /* not lint */ *************** *** 203,208 **** --- 204,248 ---- continue; } + #if EXTEND_MACRO + if (p[1] == '^') { /* extension prefix */ + if (tTd(37, 2)) + printf("readcf: extend macro ^%c\n", + p[2]); + (void) strcpy(p + 1, p + 2); + p[1] = (p[1] | 0x80); + } + #endif /* EXTEND_MACRO */ + #if EXTEND_MACRO || EXTEND_CLASS + switch (p[1]) { + #if EXTEND_CLASS + case '=': /* MATCHCLASS */ + case '~': /* MATCHNCLASS */ + if (p[2] == '^') { /* extension prefix */ + if (tTd(37, 2)) + printf("readcf: extend class ^%c\n", + p[3]); + (void) strcpy(p + 2, p + 3); + p[2] = (p[2] | 0x80); + } + break; + #endif /* EXTEND_CLASS */ + #if EXTEND_MACRO + case '&': /* MACRODEXPAND */ + if (p[2] == '^') { /* extension prefix */ + if (tTd(37, 2)) + printf("readcf: extend macro ^%c\n", + p[3]); + (void) strcpy(p + 2, p + 3); + p[2] = (p[2] | 0x80); + } + break; + #endif /* EXTEND_MACRO */ + default: + break; + } + #endif /* EXTEND_MACRO || EXTEND_CLASS */ + /* convert to macro expansion character */ *p = MACROEXPAND; } *************** *** 399,406 **** --- 439,497 ---- break; case 'D': /* macro definition */ + #if FILEMACRO + case 'G': /* macro definition from file */ + #endif /* FILEMACRO */ + #if EXTEND_MACRO + if (bp[1] == '^') { + if (tTd(37, 2)) + printf("readcf: extend macro ^%c\n", + bp[2]); + /* bp++; */ + (void) strcpy(bp + 1, bp + 2); + bp[1] = (bp[1] | 0x80); + } + #endif /* EXTEND_MACRO */ + #if FILEMACRO + if (bp[0] == 'G') + { + /* read from file */ + for (p = &bp[2]; isascii(*p) && isspace(*p); ) + p++; + if (p[0] == '-' && p[1] == 'o') + { + optional = TRUE; + while (*p != '\0' + && !(isascii(*p) && isspace(*p))) + p++; + while (isascii(*p) && isspace(*p)) + *p++; + } + else + optional = FALSE; + file = p; + while (*p != '\0' + && !(isascii(*p) && isspace(*p))) + p++; + if (*p == '\0') + p = "%s"; + else + { + *p = '\0'; + while (isascii(*++p) && isspace(*p)) + continue; + } + filemacro((unsigned char)bp[1], file, p, safe, + optional); + break; + } + #endif /* FILEMACRO */ p = munchstring(&bp[2], NULL); + #if EXTEND_MACRO + define((unsigned char)bp[1], newstr(p), e); + #else /* not EXTEND_MACRO */ define(bp[1], newstr(p), e); + #endif /* not EXTEND_MACRO */ break; case 'H': /* required header line */ *************** *** 408,413 **** --- 499,514 ---- break; case 'C': /* word class */ + #if EXTEND_CLASS + if (bp[1] == '^') { + if (tTd(37, 2)) + printf("readcf: extend class ^%c\n", + bp[2]); + /* bp++; */ + (void) strcpy(bp + 1, bp + 2); + bp[1] = (bp[1] | 0x80); + } + #endif /* EXTEND_CLASS */ /* scan the list of words and set class for all */ expand(&bp[2], exbuf, &exbuf[sizeof exbuf], e); for (p = exbuf; *p != '\0'; ) *************** *** 423,434 **** --- 524,549 ---- delim = *p; *p = '\0'; if (wd[0] != '\0') + #if EXTEND_CLASS + setclass((unsigned char)bp[1], wd); + #else /* not EXTEND_CLASS */ setclass(bp[1], wd); + #endif /* not EXTEND_CLASS */ *p = delim; } break; case 'F': /* word class from file */ + #if EXTEND_CLASS + if (bp[1] == '^') { + if (tTd(37, 2)) + printf("readcf: extend class ^%c\n", + bp[2]); + /* bp++; */ + (void) strcpy(bp + 1, bp + 2); + bp[1] = (bp[1] | 0x80); + } + #endif /* EXTEND_CLASS */ for (p = &bp[2]; isascii(*p) && isspace(*p); ) p++; if (p[0] == '-' && p[1] == 'o') *************** *** 452,458 **** --- 567,578 ---- while (isascii(*++p) && isspace(*p)) continue; } + #if EXTEND_CLASS + fileclass((unsigned char)bp[1], file, p, safe, + optional); + #else /* not EXTEND_CLASS */ fileclass(bp[1], file, p, safe, optional); + #endif /* not EXTEND_CLASS */ break; #ifdef XLA *************** *** 676,681 **** --- 796,898 ---- (void) fclose(f); } + + #if FILEMACRO + /* + ** FILEMACRO -- read macro definition from a file + ** + ** Parameters: + ** defn -- macro name to define. + ** filename -- name of file to read. + ** fmt -- scanf string to use for match. + ** safe -- if set, this is a safe read. + ** optional -- if set, it is not an error for the file to + ** not exist. + ** + ** Returns: + ** none + ** + ** Side Effects: + ** + ** puts all lines in filename that match a scanf into + ** the named macro. + */ + + filemacro(defn, filename, fmt, safe, optional) + int defn; + char *filename; + char *fmt; + bool safe; + bool optional; + { + FILE *f; + struct stat stbuf; + char *munchstring(); + char buf[MAXLINE]; + + if (stat(filename, &stbuf) < 0) + { + if (!optional) + syserr("filemacro: cannot stat %s", filename); + return; + } + if (!S_ISREG(stbuf.st_mode)) + { + syserr("filemacro: %s not a regular file", filename); + return; + } + if (!safe && access(filename, R_OK) < 0) + { + syserr("filemacro: access denied on %s", filename); + return; + } + f = fopen(filename, "r"); + if (f == NULL) + { + syserr("filemacro: cannot open %s", filename); + return; + } + + if (fgets(buf, sizeof buf, f) != NULL) + { + register char *p; + # ifdef SCANF + char wordbuf[MAXNAME+1]; + + if (sscanf(buf, fmt, wordbuf) != 1) + goto fm_exit; + p = wordbuf; + # else /* SCANF */ + p = buf; + # endif /* SCANF */ + + /* + ** Break up the match into words. + */ + + /* strip leading spaces */ + while (isascii(*p) && isspace(*p)) + p++; + if (*p != '\0') + { + register char *q; + + /* find the end of the word */ + q = p; + while (*p != '\0' && !(isascii(*p) && isspace(*p))) + p++; + if (*p != '\0') + *p++ = '\0'; + + /* enter the word in the symbol table */ + define(defn, newstr(munchstring(q, NULL)), CurEnv); + } + } + fm_exit: + + (void) fclose(f); + } + #endif /* FILEMACRO */ /* ** MAKEMAILER -- define a new mailer. ** *************** *** 1038,1045 **** --- 1255,1286 ---- NULL, 0 }; + #if CANON_OTHER + #ifndef T_TXT /* shoud be defined in arpa/nameser.h */ + #define T_TXT 16 /* text strings */ #endif + struct + { + char *name; /* string of query types */ + char value; /* internal values of query types */ + } QueryFlags[] = + { + /* records which can be treated as A record for canonicalization */ + "hinfo", T_HINFO, + "minfo", T_MINFO, + "ns", T_NS, + "null", T_NULL, + "ptr", T_PTR, + "soa", T_SOA, + "txt", T_TXT, + "wks", T_WKS, + NULL, 0 + }; + #endif /* CANON_OTHER */ + + #endif + setoption(opt, val, safe, sticky, e) char opt; char *val; *************** *** 1233,1243 **** --- 1474,1501 ---- bool clearmode; char *q; struct resolverflags *rfp; + #if CANON_MX_CNTL || CANON_OTHER + int queryflag; + #endif /* CANON_MX_CNTL || CANON_OTHER */ + #if CANON_MX_CNTL + extern int TryMXforCanon; + #endif /* CANON_MX_CNTL */ + #if CANON_OTHER + extern char Qseq[]; + int qno, sno; + #endif /* CANON_OTHER */ while (*p == ' ') p++; if (*p == '\0') break; + #if CANON_MX_CNTL || CANON_OTHER + queryflag = FALSE; + if (*p == '?') { + queryflag = TRUE; + p++; + } + #endif /* CANON_MX_CNTL || CANON_OTHER */ clearmode = FALSE; if (*p == '-') clearmode = TRUE; *************** *** 1249,1254 **** --- 1507,1549 ---- p++; if (*p != '\0') *p++ = '\0'; + #if CANON_MX_CNTL || CANON_OTHER + if (queryflag) { + #if CANON_MX_CNTL + if (strcasecmp(q, "nowildcardmx") == 0) { + TryMXforCanon = !clearmode; + if (tTd(8, 2)) + printf("nowildcardmx: %s\n", + TryMXforCanon?"True":"False"); + continue; + } + #endif /* CANON_MX_CNTL */ + #if CANON_OTHER + for (qno = 0; QueryFlags[qno].name ; qno++) { + if (strcasecmp(q, + QueryFlags[qno].name) == 0) + { + if (tTd(8, 2)) + printf("query += %s\n", q); + break; + } + } + if (QueryFlags[qno].name == NULL) + break; + for (sno = 0; sno < QSEQSIZ-1; sno++) { + if (Qseq[sno] == 0) { + Qseq[sno] = + QueryFlags[qno].value; + break; + } + /* ignore record specified already */ + if (Qseq[sno] == QueryFlags[qno].value) + break; + } + #endif /* CANON_OTHER */ + continue; + } + #endif /* CANON_MX_CNTL || CANON_OTHER */ for (rfp = ResolverFlags; rfp->rf_name != NULL; rfp++) { if (strcasecmp(q, rfp->rf_name) == 0) *************** *** 1300,1309 **** --- 1595,1617 ---- break; case 'M': /* define macro */ + #if EXTEND_MACRO + if (val[0] == '^') { + if (tTd(37, 2)) + printf("readcf: extend macro ^%c\n", + val[1]); + val++; + val[0] = (val[0] | 0x80); + } + #endif /* not EXTEND_MACRO */ p = newstr(&val[1]); if (!safe) cleanstrcpy(p, p, MAXNAME); + #if EXTEND_MACRO + define((unsigned char)val[0], p, CurEnv); + #else /* not EXTEND_MACRO */ define(val[0], p, CurEnv); + #endif /* not EXTEND_MACRO */ sticky = FALSE; break; *************** *** 1493,1500 **** --- 1801,1818 ---- { register STAB *s; + #if EXTEND_CLASS if (tTd(37, 8)) + { + if (class & 0x80) + printf("setclass(^%c, %s)\n", class & 0x7f, word); + else + printf("setclass(%c, %s)\n", class, word); + } + #else /* not EXTEND_CLASS */ + if (tTd(37, 8)) printf("setclass(%c, %s)\n", class, word); + #endif /* not EXTEND_CLASS */ s = stab(word, ST_CLASS, ST_ENTER); setbitn(class, s->s_class); } diff -c ../src.org/recipient.c ./recipient.c *** ../src.org/recipient.c Mon Mar 6 03:10:23 1995 --- ./recipient.c Thu Mar 30 11:47:37 1995 *************** *** 33,38 **** --- 33,39 ---- */ #ifndef lint + static char Wsccsid[] = "@(#)recipient.c 2.3 (motonori/WIDE) 3/14/94"; static char sccsid[] = "@(#)recipient.c 8.44.1.6 (Berkeley) 3/5/95"; #endif /* not lint */ *************** *** 982,987 **** --- 983,994 ---- *p = '\0'; if (buf[0] == '#' || buf[0] == '\0') continue; + # if ALL_HASH_CMNT + if ((p = strchr(buf, '#')) && isspace(*(p-1))) + { + *p = '\0'; + } + # endif e->e_to = NULL; message("%s to %s", forwarding ? "forwarding" : "sending", buf); diff -c ../src.org/savemail.c ./savemail.c *** ../src.org/savemail.c Fri Feb 10 05:24:49 1995 --- ./savemail.c Thu Mar 30 11:47:37 1995 *************** *** 33,38 **** --- 33,39 ---- */ #ifndef lint + static char Wsccsid[] = "@(#)savemail.c 2.3 (motonori/WIDE) 3/14/94"; static char sccsid[] = "@(#)savemail.c 8.29 (Berkeley) 5/10/94"; #endif /* not lint */ *************** *** 497,502 **** --- 498,507 ---- ee->e_flags &= ~EF_OLDSTYLE; ee->e_sendqueue = returnq; ee->e_msgsize = ERRORFUDGE; + #if QUICK_RESPONSE + if (ee->e_sendmode == SM_QUEUE) + ee->e_sendmode = SM_FORK; + #endif if (!NoReturn) ee->e_msgsize += e->e_msgsize; initsys(ee); diff -c ../src.org/sendmail.0 ./sendmail.0 *** ../src.org/sendmail.0 Thu Mar 30 11:52:13 1995 --- ./sendmail.0 Thu Mar 30 11:47:38 1995 *************** *** 0 **** --- 1,281 ---- + SENDMAIL(8) UNIX System Manager's Manual SENDMAIL(8) + + NAME + sendmail - send mail over the internet + + SYNOPSIS + sendmail [_f_l_a_g_s] [_a_d_d_r_e_s_s ...] + newaliases + mailq [-v] + + DESCRIPTION + Sendmail sends a message to one or more _r_e_c_i_p_i_e_n_t_s, routing the message + over whatever networks are necessary. Sendmail does internetwork for- + warding as necessary to deliver the message to the correct place. + + Sendmail is not intended as a user interface routine; other programs pro- + vide user-friendly front ends; sendmail is used only to deliver pre- + formatted messages. + + With no flags, sendmail reads its standard input up to an end-of-file or + a line consisting only of a single dot and sends a copy of the message + found there to all of the addresses listed. It determines the network(s) + to use based on the syntax and contents of the addresses. + + Local addresses are looked up in a file and aliased appropriately. + Aliasing can be prevented by preceding the address with a backslash. + Normally the sender is not included in any alias expansions, e.g., if + `john' sends to `group', and `group' includes `john' in the expansion, + then the letter will not be delivered to `john'. + + Parameters + + -B_t_y_p_e Set the body type to _t_y_p_e. Current legal values 7BIT or + 8BITMIME. + + -ba Go into ARPANET mode. All input lines must end with a CR-LF, + and all messages will be generated with a CR-LF at the end. + Also, the ``From:'' and ``Sender:'' fields are examined for + the name of the sender. + + -bd Run as a daemon. This requires Berkeley IPC. Sendmail will + fork and run in background listening on socket 25 for incom- + ing SMTP connections. This is normally run from /_e_t_c/_r_c. + + -bi Initialize the alias database. + + -bm Deliver mail in the usual way (default). + + -bp Print a listing of the queue. + + -bs Use the SMTP protocol as described in RFC821 on standard in- + put and output. This flag implies all the operations of the + -ba flag that are compatible with SMTP. + + -bt Run in address test mode. This mode reads addresses and + shows the steps in parsing; it is used for debugging confi- + guration tables. + + -bv Verify names only - do not try to collect or deliver a mes- + sage. Verify mode is normally used for validating users or + mailing lists. + + -C_f_i_l_e Use alternate configuration file. Sendmail refuses to run as + + + root if an alternate configuration file is specified. + + -d_X Set debugging value to _X. + + -F_f_u_l_l_n_a_m_e Set the full name of the sender. + + -f_n_a_m_e Sets the name of the ``from'' person (i.e., the sender of the + mail). -f can only be used by ``trusted'' users (normally + _r_o_o_t, _d_a_e_m_o_n, and _n_e_t_w_o_r_k) or if the person you are trying to + become is the same as the person you are. + + -h_N Set the hop count to _N. The hop count is incremented every + time the mail is processed. When it reaches a limit, the + mail is returned with an error message, the victim of an + aliasing loop. If not specified, ``Received:'' lines in the + message are counted. + + -n Don't do aliasing. + + -o_x _v_a_l_u_e Set option _x to the specified _v_a_l_u_e. Options are described + below. + + -p_p_r_o_t_o_c_o_l Set the name of the protocol used to receive the message. + This can be a simple protocol name such as ``UUCP'' or a pro- + tocol and hostname, such as ``UUCP:ucbvax''. + + -q[_t_i_m_e] Processed saved messages in the queue at given intervals. If + _t_i_m_e is omitted, process the queue once. Time is given as a + tagged number, with `s' being seconds, `m' being minutes, `h' + being hours, `d' being days, and `w' being weeks. For exam- + ple, `-q1h30m' or `-q90m' would both set the timeout to one + hour thirty minutes. If _t_i_m_e is specified, sendmail will run + in background. This option can be used safely with -bd. + + -r_n_a_m_e An alternate and obsolete form of the -f flag. + + -t Read message for recipients. To:, Cc:, and Bcc: lines will + be scanned for recipient addresses. The Bcc: line will be + deleted before transmission. Any addresses in the argument + list will be suppressed, that is, they will _n_o_t receive + copies even if listed in the message header. + + -v Go into verbose mode. Alias expansions will be announced, + etc. + + -X _l_o_g_f_i_l_e Log all traffic in and out of mailers in the indicated log + file. This should only be used as a last resort for debug- + ging mailer bugs. It will log a lot of data very quickly. + + Options + There are also a number of processing options that may be set. Normally + these will only be used by a system administrator. Options may be set + either on the command line using the -o flag or in the configuration + file. This is a partial list; for a complete list (and details), consult + the _S_e_n_d_m_a_i_l _I_n_s_t_a_l_l_a_t_i_o_n _a_n_d _O_p_e_r_a_t_i_o_n _G_u_i_d_e. The options are: + + A_f_i_l_e Use alternate alias file. + + b_n_b_l_o_c_k_s The minimum number of free blocks needed on the spool + filesystem. + + c On mailers that are considered ``expensive'' to connect to, + don't initiate immediate connection. This requires queueing. + + C _N Checkpoint the queue file after every _N successful deliveries + (default 10). This avoids excessive duplicate deliveries + when sending to long mailing lists interrupted by system + crashes. + + d_x Set the delivery mode to _x. Delivery modes are `i' for in- + teractive (synchronous) delivery, `b' for background (asyn- + chronous) delivery, and `q' for queue only - i.e., actual + delivery is done the next time the queue is run. + + D Try to automatically rebuild the alias database if necessary. + + e_x Set error processing to mode _x. Valid modes are `m' to mail + back the error message, `w' to ``write'' back the error mes- + sage (or mail it back if the sender is not logged in), `p' to + print the errors on the terminal (default), `q' to throw away + error messages (only exit status is returned), and `e' to do + special processing for the BerkNet. If the text of the mes- + sage is not mailed back by modes `m' or `w' and if the sender + is local to this machine, a copy of the message is appended + to the file _d_e_a_d._l_e_t_t_e_r in the sender's home directory. + + f Save UNIX-style From lines at the front of messages. + + G Match local mail names against the GECOS portion of the pass- + word file. + + g _N The default group id to use when calling mailers. + + H_f_i_l_e The SMTP help file. + + h _N The maximum number of times a message is allowed to ``hop'' + before we decide it is in a loop. + + i Do not take dots on a line by themselves as a message termi- + nator. + + j Send error messages in MIME format. + + K_t_i_m_e_o_u_t Set connection cache timeout. + + k_N Set connection cache size. + + L_n The log level. + + l Pay attention to the Errors-To: header. + + m Send to ``me'' (the sender) also if I am in an alias expan- + sion. + + n Validate the right hand side of aliases during a + newaliases(1) command. + + o If set, this message may have old style headers. If not set, + this message is guaranteed to have new style headers (i.e., + commas instead of spaces between addresses). If set, an + adaptive algorithm is used that will correctly determine the + header format in most cases. + + Q_q_u_e_u_e_d_i_r Select the directory in which to queue messages. + + S_f_i_l_e Save statistics in the named file. + + s Always instantiate the queue file, even under circumstances + where it is not strictly necessary. This provides safety + against system crashes during delivery. + + T_t_i_m_e Set the timeout on undelivered messages in the queue to the + specified time. After delivery has failed (e.g., because of + a host being down) for this amount of time, failed messages + will be returned to the sender. The default is three days. + + t_s_t_z, _d_t_z Set the name of the time zone. + + U_u_s_e_r_d_a_t_a_b_a_s_e + If set, a user database is consulted to get forwarding infor- + mation. You can consider this an adjunct to the aliasing + mechanism, except that the database is intended to be distri- + buted; aliases are local to a particular host. This may not + be available if your sendmail does not have the USERDB option + compiled in. + + u_N Set the default user id for mailers. + + Y Fork each job during queue runs. May be convenient on + memory-poor machines. + + 7 Strip incoming messages to seven bits. + + In aliases, the first character of a name may be a vertical bar to cause + interpretation of the rest of the name as a command to pipe the mail to. + It may be necessary to quote the name to keep sendmail from suppressing + the blanks from between arguments. For example, a common alias is: + + msgs: "|/usr/bin/msgs -s" + + Aliases may also have the syntax ``:include:_f_i_l_e_n_a_m_e'' to ask sendmail to + read the named file for a list of recipients. For example, an alias such + as: + + poets: ":include:/usr/local/lib/poets.list" + + would read /_u_s_r/_l_o_c_a_l/_l_i_b/_p_o_e_t_s._l_i_s_t for the list of addresses making up + the group. + + Sendmail returns an exit status describing what it did. The codes are + defined in <_s_y_s_e_x_i_t_s._h>: + EX_OK Successful completion on all addresses. + EX_NOUSER User name not recognized. + EX_UNAVAILABLE Catchall meaning necessary resources were not + available. + EX_SYNTAX Syntax error in address. + EX_SOFTWARE Internal software error, including bad arguments. + EX_OSERR Temporary operating system error, such as ``cannot + fork''. + EX_NOHOST Host name not recognized. + EX_TEMPFAIL Message could not be sent immediately, but was + queued. + + If invoked as newaliases, sendmail will rebuild the alias database. If + invoked as mailq, sendmail will print the contents of the mail queue. + + FILES + Except for the file /_e_t_c/_s_e_n_d_m_a_i_l._c_f itself, the following pathnames are + all specified in /_e_t_c/_s_e_n_d_m_a_i_l._c_f. Thus, these values are only approxima- + tions. + + /etc/aliases raw data for alias names + /etc/aliases.db data base of alias names + /etc/sendmail.cf configuration file + /etc/sendmail.hf help file + /var/log/sendmail.st collected statistics + + + /var/spool/mqueue/* temp files + /var/run/sendmail.pid + The process id of the daemon + + SEE ALSO + binmail(1), mail(1), rmail(1), syslog(3), aliases(5), mailaddr(7), + rc(8); + + DARPA Internet Request For Comments _R_F_C_8_1_9, _R_F_C_8_2_1, _R_F_C_8_2_2. + + _S_e_n_d_m_a_i_l - _A_n _I_n_t_e_r_n_e_t_w_o_r_k _M_a_i_l _R_o_u_t_e_r, No. 9, SMM. + + _S_e_n_d_m_a_i_l _I_n_s_t_a_l_l_a_t_i_o_n _a_n_d _O_p_e_r_a_t_i_o_n _G_u_i_d_e, No. 8, SMM. + + HISTORY + The sendmail command appeared in 4.2BSD. + + 4th Berkeley Distribution December 11, 1993 4 diff -c ../src.org/sendmail.h ./sendmail.h *** ../src.org/sendmail.h Mon Mar 6 02:58:23 1995 --- ./sendmail.h Thu Mar 30 11:47:38 1995 *************** *** 31,36 **** --- 31,37 ---- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * + * @(#)sendmail.h 2.8 (motonori/WIDE) 4/20/94 * @(#)sendmail.h 8.43.1.3 (Berkeley) 3/5/95 */ *************** *** 122,131 **** --- 123,144 ---- struct address { char *q_paddr; /* the printname for the address */ + # if !MULTI_MAILER char *q_user; /* user name */ + # endif char *q_ruser; /* real user name, or NULL if q_user */ + # if !MULTI_MAILER char *q_host; /* host name */ struct mailer *q_mailer; /* mailer to use */ + # endif + # if MULTI_MAILER + # define q_user q_users[0] + # define q_host q_hosts[0] + # define q_mailer q_mailers[0] + char *q_users[MAXDSPTMAILERS]; /* user name */ + char *q_hosts[MAXDSPTMAILERS]; /* host name */ + struct mailer *q_mailers[MAXDSPTMAILERS]; /* mailer to use */ + # endif u_short q_flags; /* status flags, see below */ uid_t q_uid; /* user-id of receiver (if known) */ gid_t q_gid; /* group-id of receiver (if known) */ *************** *** 358,364 **** --- 371,381 ---- char *e_statmsg; /* stat msg (changes per delivery) */ char *e_msgboundary; /* MIME-style message part boundary */ char *e_origrcpt; /* original recipient (one only) */ + #if EXTEND_MACRO + char *e_macro[256]; /* macro definitions */ + #else /* not EXTEND_MACRO */ char *e_macro[128]; /* macro definitions */ + #endif /* not EXTEND_MACRO */ }; /* values for e_flags */ diff -c ../src.org/sendmail.hf ./sendmail.hf *** ../src.org/sendmail.hf Fri Feb 10 05:22:07 1995 --- ./sendmail.hf Thu Mar 30 11:47:39 1995 *************** *** 3,8 **** --- 3,9 ---- cpyr Copyright (c) 1988, 1993 cpyr The Regents of the University of California. All rights reserved. cpyr + cpyr @(#)sendmail.hf 2.2 (motonori/WIDE) 10/8/93 cpyr @(#)sendmail.hf 8.2 (Berkeley) 7/16/93 cpyr smtp Commands: *************** *** 12,17 **** --- 13,22 ---- smtp For more info use "HELP ". smtp To report bugs in the implementation send email to smtp sendmail@CS.Berkeley.EDU. + smtp This sendmail includes "WIDE-Internet patch package" which provides + smtp some useful improvements. + smtp To report bugs/questions about this patch send email to + smtp motonori@wide.ad.jp smtp For local information send email to Postmaster at your site. help HELP [ ] help The HELP command gives help info. diff -c ../src.org/sendmail.restart ./sendmail.restart *** ../src.org/sendmail.restart Thu Mar 30 11:52:13 1995 --- ./sendmail.restart Thu Mar 30 11:47:39 1995 *************** *** 0 **** --- 1,29 ---- + #! /bin/sh - + # + # @(#)sendmail.restart 2.2 (motonori/WIDE) 3/19/94 + # + + PATH=/usr/ucb:/bin:/usr/bin + export PATH + + PIDFILE=/etc/sendmail.pid + + # unset TZ + # for old versions + unset NAME + unset HOSTALIASES + # for mailtonews + unset LOGNAME + unset USER + + kill `head -1 $PIDFILE` + sleep 2 + ARGS=`tail +2 $PIDFILE` + if [ "$ARGS" ]; then + eval $ARGS + else + /usr/lib/sendmail -bd -q1h + fi + + # sleep 1 + # tail -5 /var/log/syslog diff -c ../src.org/srvrsmtp.c ./srvrsmtp.c *** ../src.org/srvrsmtp.c Sat Feb 11 00:54:38 1995 --- ./srvrsmtp.c Thu Mar 30 11:47:39 1995 *************** *** 35,40 **** --- 35,41 ---- # include "sendmail.h" #ifndef lint + static char Wsccsid[] = "@(#)srvrsmtp.c 2.9 (motonori/WIDE) 4/20/94"; #ifdef SMTP static char sccsid[] = "@(#)srvrsmtp.c 8.37 (Berkeley) 4/13/94 (with SMTP)"; #else *************** *** 146,151 **** --- 147,157 ---- char cmdbuf[MAXLINE]; extern char Version[]; extern ENVELOPE BlankEnvelope; + #if ESMTPPEERSCLS + STAB *st; + bool brokensmtppeers; + char bsp_buf[MAXHOSTNAMELEN]; + #endif if (fileno(OutChannel) != fileno(stdout)) { *************** *** 163,169 **** --- 169,205 ---- setproctitle("server %s startup", CurSmtpClient); expand("\201e", inp, &inp[sizeof inp], e); + #if ESMTPPEERSCLS + brokensmtppeers = BrokenSmtpPeers; + p = RealHostName; + while (!brokensmtppeers && p != NULL) + { + if ((st = stab(p, ST_CLASS, ST_FIND)) != NULL && + bitnset('e', st->s_class)) + { + break; + } + sprintf(bsp_buf, "!%s", p); + if ((st = stab(bsp_buf, ST_CLASS, ST_FIND)) != NULL && + bitnset('e', st->s_class)) + { + brokensmtppeers = TRUE; + break; + } + p = strchr(p+1, '.'); + } + if (p == NULL) + { + if ((st = stab("!all", ST_CLASS, ST_FIND)) != NULL && + bitnset('e', st->s_class)) + { + brokensmtppeers = TRUE; + } + } + if (brokensmtppeers) + #else if (BrokenSmtpPeers) + #endif { p = strchr(inp, '\n'); if (p != NULL) diff -c ../src.org/strcasecmp.c ./strcasecmp.c *** ../src.org/strcasecmp.c Thu Mar 30 11:52:13 1995 --- ./strcasecmp.c Thu Mar 30 11:47:39 1995 *************** *** 0 **** --- 1,89 ---- + /* + * Copyright (c) 1987 Regents of the University of California. + * All rights reserved. + * + * Redistribution and use in source and binary forms are permitted + * provided that the above copyright notice and this paragraph are + * duplicated in all such forms and that any documentation, + * advertising materials, and other materials related to such + * distribution and use acknowledge that the software was developed + * by the University of California, Berkeley. The name of the + * University may not be used to endorse or promote products derived + * from this software without specific prior written permission. + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED + * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. + */ + + #if defined(LIBC_SCCS) && !defined(lint) + static char sccsid[] = "@(#)strcasecmp.c 5.6 (Berkeley) 6/27/88"; + #endif /* LIBC_SCCS and not lint */ + + #include + + /* + * This array is designed for mapping upper and lower case letter + * together for a case independent comparison. The mappings are + * based upon ascii character sequences. + */ + static u_char charmap[] = { + '\000', '\001', '\002', '\003', '\004', '\005', '\006', '\007', + '\010', '\011', '\012', '\013', '\014', '\015', '\016', '\017', + '\020', '\021', '\022', '\023', '\024', '\025', '\026', '\027', + '\030', '\031', '\032', '\033', '\034', '\035', '\036', '\037', + '\040', '\041', '\042', '\043', '\044', '\045', '\046', '\047', + '\050', '\051', '\052', '\053', '\054', '\055', '\056', '\057', + '\060', '\061', '\062', '\063', '\064', '\065', '\066', '\067', + '\070', '\071', '\072', '\073', '\074', '\075', '\076', '\077', + '\100', '\141', '\142', '\143', '\144', '\145', '\146', '\147', + '\150', '\151', '\152', '\153', '\154', '\155', '\156', '\157', + '\160', '\161', '\162', '\163', '\164', '\165', '\166', '\167', + '\170', '\171', '\172', '\133', '\134', '\135', '\136', '\137', + '\140', '\141', '\142', '\143', '\144', '\145', '\146', '\147', + '\150', '\151', '\152', '\153', '\154', '\155', '\156', '\157', + '\160', '\161', '\162', '\163', '\164', '\165', '\166', '\167', + '\170', '\171', '\172', '\173', '\174', '\175', '\176', '\177', + '\200', '\201', '\202', '\203', '\204', '\205', '\206', '\207', + '\210', '\211', '\212', '\213', '\214', '\215', '\216', '\217', + '\220', '\221', '\222', '\223', '\224', '\225', '\226', '\227', + '\230', '\231', '\232', '\233', '\234', '\235', '\236', '\237', + '\240', '\241', '\242', '\243', '\244', '\245', '\246', '\247', + '\250', '\251', '\252', '\253', '\254', '\255', '\256', '\257', + '\260', '\261', '\262', '\263', '\264', '\265', '\266', '\267', + '\270', '\271', '\272', '\273', '\274', '\275', '\276', '\277', + '\300', '\341', '\342', '\343', '\344', '\345', '\346', '\347', + '\350', '\351', '\352', '\353', '\354', '\355', '\356', '\357', + '\360', '\361', '\362', '\363', '\364', '\365', '\366', '\367', + '\370', '\371', '\372', '\333', '\334', '\335', '\336', '\337', + '\340', '\341', '\342', '\343', '\344', '\345', '\346', '\347', + '\350', '\351', '\352', '\353', '\354', '\355', '\356', '\357', + '\360', '\361', '\362', '\363', '\364', '\365', '\366', '\367', + '\370', '\371', '\372', '\373', '\374', '\375', '\376', '\377', + }; + + strcasecmp(s1, s2) + char *s1, *s2; + { + register u_char *cm = charmap, + *us1 = (u_char *)s1, + *us2 = (u_char *)s2; + + while (cm[*us1] == cm[*us2++]) + if (*us1++ == '\0') + return(0); + return(cm[*us1] - cm[*--us2]); + } + + strncasecmp(s1, s2, n) + char *s1, *s2; + register int n; + { + register u_char *cm = charmap, + *us1 = (u_char *)s1, + *us2 = (u_char *)s2; + + while (--n >= 0 && cm[*us1] == cm[*us2++]) + if (*us1++ == '\0') + return(0); + return(n < 0 ? 0 : cm[*us1] - cm[*--us2]); + } diff -c ../src.org/usersmtp.c ./usersmtp.c *** ../src.org/usersmtp.c Fri Feb 10 05:21:57 1995 --- ./usersmtp.c Thu Mar 30 11:47:40 1995 *************** *** 35,40 **** --- 35,41 ---- # include "sendmail.h" #ifndef lint + static char Wsccsid[] = "@(#)usersmtp.c 2.2 (motonori/WIDE) 2/9/94"; #ifdef SMTP static char sccsid[] = "@(#)usersmtp.c 8.18 (Berkeley) 1/24/94 (with SMTP)"; #else *************** *** 533,541 **** --- 534,549 ---- } timeout = e->e_msgsize / 16; + # if 0 /* original */ + /* longer value is required, this value should be configurable */ if (timeout < (time_t) 60) timeout = (time_t) 60; timeout += e->e_nrcpts * 90; + # else + if (timeout < (time_t) 600) + timeout = (time_t) 600; + timeout += e->e_nrcpts * 300; + # endif ev = setevent(timeout, datatimeout, 0); /* now output the actual message */ diff -c ../src.org/version.c ./version.c *** ../src.org/version.c Wed Mar 29 11:27:07 1995 --- ./version.c Thu Mar 30 11:50:27 1995 *************** *** 33,39 **** */ #ifndef lint static char sccsid[] = "@(#)version.c 8.6.12.1 (Berkeley) 3/28/95"; #endif /* not lint */ ! char Version[] = "8.6.12"; --- 33,245 ---- */ #ifndef lint + static char Wsccsid[] = "@(#)version.c 2.4 (motonori/WIDE) 4/20/94"; static char sccsid[] = "@(#)version.c 8.6.12.1 (Berkeley) 3/28/95"; #endif /* not lint */ ! char Version[] = "8.6.12+2.4W"; ! #if NAMED_BIND ! char WVersion[] = "@(#)sendmail.mx 8.6.12+2.4W %VERSION%"; ! #else ! char WVersion[] = "@(#)sendmail.nomx 8.6.12+2.4W %VERSION%"; ! #endif ! char WhoAndWhere[] = "@(#)%WHOANDWHERE%"; ! ! ! #include "sendmail.h" ! #if COMPILEOPTIONS ! /* ! ** Compile Options ! */ ! ! char *CompileOptions[] = { ! "Compile options:", ! # if ADJUST_TZ ! "[ADJUST_TZ]", ! # endif ! # if ALL_HASH_CMNT ! "[ALL_HASH_CMNT]", ! # endif ! # if ANOTHER_MXPB ! "[ANOTHER_MXBP]", ! # endif ! # if AUTH_LOG ! "[AUTH_LOG]", ! # endif ! # if BROKEN_LISTEN ! "[BROKEN_LISTEN]", ! # endif ! # ifdef BROKENSMTPPEERS ! "[BROKENSMTPPEERS]", ! # endif ! # if CANON_MX_CNTL ! "[CANON_MX_CNTL]", ! # endif ! # if CANON_OTHER ! "[CANON_OTHER]", ! # endif ! # if ESMTPPEERSCLS ! "[ESMTPPEERSCLS]", ! # endif ! # if EXTEND_CLASS ! "[EXTEND_CLASS]", ! # endif ! # if EXTEND_MACRO ! "[EXTEND_MACRO]", ! # endif ! # if FILEMACRO ! "[FILEMACRO]", ! # endif ! # if HASFLOCK ! "[HASFLOCK]", ! # endif ! # ifdef HASGETDTABLESIZE ! "[HASGETDTABLESIZE]", ! # endif ! # if HASGETUSERSHELL ! "[HASGETUSERSHELL]", ! # endif ! # ifdef HASINITGROUPS ! "[HASINITGROUPS]", ! # endif ! # ifdef HASLSTAT ! "[HASLSTAT]", ! # endif ! # ifdef HASSETREUID ! "[HASSETREUID]", ! # endif ! # ifdef HASSETSID ! "[HASSETSID]", ! # endif ! # ifdef HASSETVBUF ! "[HASSETVBUF]", ! # endif ! # ifdef HASUNAME ! "[HASUNAME]", ! # endif ! # ifdef HASUNSETENV ! "[HASUNSETENV]", ! # endif ! # ifdef HASWAITPID ! "[HASWAITPID]", ! # endif ! # if IDENTPEERSCLS ! "[IDENTPEERSCLS]", ! # endif ! # if IDENTPROTO ! "[IDENTPROTO]", ! # endif ! # if LHS_CHECK_CNTL ! "[LHS_CHECK_CNTL]", ! # endif ! # ifdef LOG ! "[LOG]", ! # endif ! # if LOGWVERSION ! "[LOGWVERSION]", ! # endif ! # ifdef MATCHGECOS ! "[MATCHGECOS]", ! # endif ! # ifdef MIME ! "[MIME]", ! # endif ! # if MULTI_MAILER ! "[MULTI_MAILER]", ! # endif ! # if MX_SAFETY ! "[MX_SAFETY]", ! # endif ! # ifdef NAMED_BIND ! "[NAMED_BIND]", ! # endif ! # ifdef NDBM ! "[NDBM]", ! # endif ! # ifdef NEEDFSYNC ! "[NEEDFSYNC]", ! # endif ! # ifdef NEEDGETOPT ! "[NEEDGETOPT]", ! # endif ! # ifdef NEEDSTRTOL ! "[NEEDSTRTOL]", ! # endif ! # ifdef NEEDVPRINTF ! "[NEEDVPRINTF]", ! # endif ! # ifdef NETINET ! "[NETINET]", ! # endif ! # ifdef NETISO ! "[NETISO]", ! # endif ! # ifdef NETNS ! "[NETNS]", ! # endif ! # ifdef NETUNIX ! "[NETUNIX]", ! # endif ! # ifdef NETX25 ! "[NETX25]", ! # endif ! # ifdef NEWDB ! "[NEWDB]", ! # endif ! # ifdef NIS ! "[NIS]", ! # endif ! # if NO_ALIAS_ON_REBUILD ! "[NO_ALIAS_ON_REBUILD]", ! # endif ! # ifdef NOLOOPBACKCHECK ! "[NOLOOPBACKCHECK]", ! # endif ! # if NOTUNIX ! "[NOTUNIX]", ! # endif ! # ifdef OLD_NEWDB ! "[OLD_NEWDB]", ! # endif ! # if QUICK_RESPONSE ! "[QUICK_RESPONSE]", ! # endif ! # if RCPT_NEXT ! "[RCPT_NEXT]", ! # endif ! # ifdef RCPTSTREAM ! "[RCPTSTREAM]", ! # endif ! # ifdef SCANF ! "[SCANF]", ! # endif ! # ifdef SETPROCTITLE ! "[SETPROCTITLE]", ! # endif ! # if SHOW_MX_HOSTS ! "[SHOW_MX_HOSTS]", ! # endif ! # ifdef SMTPDEBUG ! "[SMTPDEBUG]", ! # endif ! # ifdef SUID_ROOT_FILES_OK ! "[SUID_ROOT_FILES_OK]", ! # endif ! # ifdef TRUST_POPEN ! "[TRUST_POPEN]", ! # endif ! # ifdef UGLYUUCP ! "[UGLYUUCP]", ! # endif ! # ifdef USERDB ! "[USERDB]", ! # endif ! # ifdef XDEBUG ! "[XDEBUG]", ! # endif ! # ifdef XLA ! "[XLA]", ! # endif ! 0 ! }; ! #endif /* COMPILEOPTIONS */ diff -c ../src.org/Makefile.WIDE.BSDI ./Makefile.WIDE.BSDI *** ../src.org/Makefile.WIDE.BSDI Thu Mar 30 11:52:11 1995 --- ./Makefile.WIDE.BSDI Thu Mar 30 11:47:40 1995 *************** *** 0 **** --- 1,203 ---- + # + # This Makefile is designed to work on the old "make" program. It does + # not use the obj subdirectory. It also does not install documentation + # automatically -- think of it as a quick start for sites that have the + # old make program (I recommend that you get and port the new make if you + # are going to be doing any signficant work on sendmail). + # + # @(#)Makefile.WIDE.BSDI 2.10 (motonori/WIDE) 4/22/94 + # @(#)Makefile.dist 8.1 (Berkeley) 6/7/93 + # + # Makefile for BSDI's BSD/386 + # This has been tested on release 1.1 + + # name of this Makefile + MAKEFILE=Makefile.WIDE.BSDI + MAKE= make + + # object directory for this architecture + OS= bsdi.1.1 + + # use O=-O (usual) or O=-g (debugging) + O= -O + + # define the database mechanisms available for map & alias lookups: + # -DNDBM -- use new DBM + # -DNEWDB -- use new Berkeley DB + # -DNIS -- include client NIS support + # The really old (V7) DBM library is no longer supported. + # See READ_ME for a description of how these flags interact. + # + DBMDEF= -DNEWDB + + # see also conf.h for additional compilation flags + + # environment definitions (e.g., -D_AIX3) + ENVDEF= + + # directory for BIND + BINDDIR=../../../bind + # directory for new Berkeley DB + NEWDBDIR=../../../db/PORT/bsdi.1.1 + + # include directories + #BINDINCDIRS= -I${BINDDIR}/include -I${BINDDIR}/compat/include + #NEWDBINCDIRS= -I${NEWDBDIR}/include -I${NEWDBDIR} + INCDIRS= ${BINDINCDIRS} ${NEWDBINCDIRS} + + # loader options + LDOPTS= + + # library directories + #BIND_LIBDIRS= -L${BINDDIR}/res + #NEWDB_LIBDIRS= -L${NEWDBDIR} + LIBDIRS= ${BINDLIBDIRS} ${NEWDBLIBDIRS} + + # libraries required on your system + LIBS= -lutil -lkvm # -ldb + RESLIB= -lresolv + + # location of sendmail binary (usually /usr/sbin or /usr/lib) + BINDIR= ${DESTDIR}/usr/sbin + + # location of sendmail.st file (usually /var/log or /usr/lib) + STDIR= ${DESTDIR}/var/log + + # location of sendmail.hf file (usually /usr/share/misc or /usr/lib) + HFDIR= ${DESTDIR}/usr/share/misc + + # additional .c files needed + SRCADD= + # additional .o files needed + OBJADD= + + ################### end of user configuration flags ###################### + + CFLAGS= -I. $O ${INCDIRS} ${DBMDEF} ${ENVDEF} + + SRCS= alias.c arpadate.c clock.c collect.c conf.c convtime.c daemon.c \ + deliver.c domain.c envelope.c err.c headers.c macro.c main.c \ + map.c mci.c parseaddr.c queue.c readcf.c recipient.c \ + savemail.c srvrsmtp.c stab.c stats.c sysexits.c \ + trace.c udb.c usersmtp.c util.c ${SRCADD} + OBJS= alias.o arpadate.o clock.o collect.o conf.o convtime.o envelope.o \ + headers.o macro.o map.o mci.o parseaddr.o queue.o recipient.o \ + srvrsmtp.o stab.o stats.o sysexits.o trace.o usersmtp.o util.o ${OBJADD} + MXOBJS= daemon-mx.o deliver-mx.o domain-mx.o err-mx.o main-mx.o readcf-mx.o \ + savemail-mx.o udb-mx.o + NOMXOBJS= daemon.o deliver.o domain.o err.o main.o readcf.o \ + savemail.o udb.o + + LINKS= ${DESTDIR}/usr/bin/newaliases ${DESTDIR}/usr/bin/mailq + BINOWN= root + BINGRP= kmem + BINMODE=6555 + + ALL= sendmail + + all: + if [ -f ${MAKEFILE} ]; then \ + ${MAKE} -f ${MAKEFILE} mkdir; \ + (cd ${OS}; ${MAKE} ${ALL}); \ + else \ + ${MAKE} ${ALL}; \ + fi + + mkdir: + @test -x newvers.sh || chmod +x newvers.sh + @if [ ! -d ${OS} ]; then \ + echo Creating directory ${OS}....; \ + (mkdir ${OS}; cd ${OS}; \ + ln -s ../*.[ch] ../newvers.sh .; \ + ln -s ../sendmail.restart ../sendmail.hf .; \ + ln -s ../aliases.5 ../mailq.1 ../newaliases.1 ../sendmail.8 .; \ + ln -s ../${MAKEFILE} Makefile); \ + else true; fi + + sendmail: sendmail.mx sendmail.nomx + + sendmail.nomx: ${OBJS} ${NOMXOBJS} Version.o + ${CC} -o $@ ${OBJS} ${NOMXOBJS} Version.o ${LDOPTS} ${LIBDIRS} ${LIBS} + size $@; ls -l $@; what < Version.o + + sendmail.mx: ${OBJS} ${MXOBJS} Version-mx.o + ${CC} -o $@ ${OBJS} ${MXOBJS} Version-mx.o ${LDOPTS} ${LIBDIRS} \ + ${RESLIB} ${LIBS} + size $@; ls -l $@; what < Version-mx.o + + Version.c: ${SRCS} version.c + @echo generating Version.c from version.c + sh newvers.sh + + # Here are MX depend sources. + daemon-mx.o: daemon.c + deliver-mx.o: deliver.c + domain-mx.o: domain.c + err-mx.o: err.c + main-mx.o: main.c + readcf-mx.o: readcf.c + savemail-mx.o: savemail.c + udb-mx.o: udb.c + Version-mx.o: Version.c + + ${MXOBJS} Version-mx.o: + ${CC} ${CFLAGS} -DNAMED_BIND=1 -c `expr $@ : '\(.*\)-mx.o'`.c -o $@ + + NROFF= nroff + + aliases.0: aliases.5 + ${NROFF} -mandoc aliases.5 > aliases.0 + + mailq.0: mailq.1 + ${NROFF} -mandoc mailq.1 > mailq.0 + + newaliases.0: newaliases.1 + ${NROFF} -mandoc newaliases.1 > newaliases.0 + + sendmail.0: sendmail.8 + ${NROFF} -mandoc sendmail.8 > sendmail.0 + + restart: + test -x sendmail.restart || chmod +x sendmail.restart + sh sendmail.restart + + INSTALL=install-sendmail # install-docs + + install: + if [ -d ${OS} ]; then \ + (cd ${OS}; ${MAKE} ${INSTALL}); \ + else \ + ${MAKE} ${INSTALL}; \ + fi + + install-sendmail: sendmail + mv -f ${BINDIR}/sendmail.mx ${BINDIR}/sendmail.mx.OLD + install -c -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \ + sendmail.mx ${BINDIR} + mv -f ${BINDIR}/sendmail.nomx ${BINDIR}/sendmail.nomx.OLD + install -c -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \ + sendmail.nomx ${BINDIR} + rm -f ${BINDIR}/sendmail; ln -s ${BINDIR}/sendmail.mx ${BINDIR}/sendmail + for i in ${LINKS}; do (rm -f $$i; ln -s ${BINDIR}/sendmail $$i); done + install -c -o ${BINOWN} -g ${BINGRP} -m 644 /dev/null \ + ${STDIR}/sendmail.st + mv -f ${HFDIR}/sendmail.hf ${HFDIR}/sendmail.hf.OLD + install -c -o ${BINOWN} -g ${BINGRP} -m 444 sendmail.hf ${HFDIR} + + # doesn't actually install them -- you may want to install pre-nroff versions + install-docs: aliases.0 mailq.0 newaliases.0 sendmail.0 + + clean: + if [ -d ${OS} ]; then \ + (cd ${OS}; ${MAKE} clean); \ + else \ + rm -f ${OBJS} ${MXOBJS} ${NOMXOBJS} Version.o Version-mx.o \ + sendmail.mx sendmail.nomx \ + aliases.0 mailq.0 newaliases.0 sendmail.0 core; \ + fi + + # dependencies + # gross overkill, and yet still not quite enough.... + ${OBJS}: sendmail.h conf.h + ${MXOBJS}: sendmail.h conf.h + ${NOMXOBJS}: sendmail.h conf.h diff -c ../src.org/Makefile.WIDE.EWS ./Makefile.WIDE.EWS *** ../src.org/Makefile.WIDE.EWS Thu Mar 30 11:52:11 1995 --- ./Makefile.WIDE.EWS Thu Mar 30 11:47:41 1995 *************** *** 0 **** --- 1,213 ---- + # + # This Makefile is designed to work on the old "make" program. It does + # not use the obj subdirectory. It also does not install documentation + # automatically -- think of it as a quick start for sites that have the + # old make program (I recommend that you get and port the new make if you + # are going to be doing any signficant work on sendmail). + # + # @(#)Makefile.WIDE.EWS 2.3 (motonori/WIDE) 4/22/94 + # @(#)Makefile.dist 8.1 (Berkeley) 6/7/93 + # + # Makefile for NEC/EWS-UX/V 4.1 + + # name of this Makefile + MAKEFILE=Makefile.WIDE.EWS + MAKE= make + + # object directory for this architecture + OS= ews.41 + + # use O=-O (usual) or O=-g (debugging) + O= -O + CC= /usr/bin/cc # do not use /usr/ucb/cc + + # define the database mechanisms available for map & alias lookups: + # -DNDBM -- use new DBM + # -DNEWDB -- use new Berkeley DB + # -DNIS -- include client NIS support + # The really old (V7) DBM library is no longer supported. + # See READ_ME for a description of how these flags interact. + # + DBMDEF= -DNDBM # -DNEWDB -DNIS + + # see also conf.h for additional compilation flags + + # environment definitions (e.g., -D_AIX3) + ENVDEF= -KOlimit=900 + + # directory for BIND + BINDDIR=../../../bind + # directory for new Berkeley DB + NEWDBDIR=../../../db/PORT/${OS} + + # include directories + BINDINCDIRS= -I${BINDDIR}/include -I${BINDDIR}/compat/include + NEWDBINCDIRS= -I${NEWDBDIR}/include -I${NEWDBDIR} + INCDIRS= ${BINDINCDIRS} ${NEWDBINCDIRS} + + # loader options + LDOPTS= + + # library directories + BINDLIBDIRS= -L${BINDDIR}/res # -L${BINDDIR}/compat/lib + NEWDBLIBDIRS= -L${NEWDBDIR} + LIBDIRS= ${BINDLIBDIRS} ${NEWDBLIBDIRS} + + # libraries required on your system + # -l44bsd is needed with bind4.9 in RESLIB + LIBS= ndbm.o -lsocket -lnsl -lelf # with NDBM + #LIBS= -lsocket -lnsl -lelf -ldb # with NEWDB + RESLIB= -lresolv # -l44bsd + + # location of sendmail binary (usually /usr/sbin or /usr/lib) + BINDIR= ${DESTDIR}/usr/ucblib + + # location of sendmail.st file (usually /var/log or /usr/lib) + STDIR= ${DESTDIR}/var/ucblib + + # location of sendmail.hf file (usually /usr/share/misc or /usr/lib) + HFDIR= ${DESTDIR}/var/ucblib + + # additional .c files needed + SRCADD= + # additional .o files needed + OBJADD= + + ################### end of user configuration flags ###################### + + CFLAGS= -I. $O ${INCDIRS} ${DBMDEF} ${ENVDEF} + + SRCS= alias.c arpadate.c clock.c collect.c conf.c convtime.c daemon.c \ + deliver.c domain.c envelope.c err.c headers.c macro.c main.c \ + map.c mci.c parseaddr.c queue.c readcf.c recipient.c \ + savemail.c srvrsmtp.c stab.c stats.c sysexits.c \ + trace.c udb.c usersmtp.c util.c strcasecmp.c ${SRCADD} + OBJS= alias.o arpadate.o clock.o collect.o conf.o convtime.o envelope.o \ + headers.o macro.o map.o mci.o parseaddr.o queue.o recipient.o \ + srvrsmtp.o stab.o stats.o sysexits.o trace.o usersmtp.o util.o ${OBJADD} + MXOBJS= daemon-mx.o deliver-mx.o domain-mx.o err-mx.o main-mx.o readcf-mx.o \ + savemail-mx.o udb-mx.o + NOMXOBJS= daemon.o deliver.o domain.o err.o main.o readcf.o \ + savemail.o udb.o strcasecmp.o + + LINKS= ${DESTDIR}/usr/ucb/newaliases ${DESTDIR}/usr/ucb/mailq + BINOWN= root + BINGRP= kmem + BINMODE=6555 + + ALL= sendmail + + all: + if [ -f ${MAKEFILE} ]; then \ + ${MAKE} -f ${MAKEFILE} mkdir; \ + (cd ${OS}; ${MAKE} ${ALL}); \ + else \ + ${MAKE} ${ALL}; \ + fi + + mkdir: + @test -x newvers.sh || chmod +x newvers.sh + @if [ ! -d ${OS} ]; then \ + echo Creating directory ${OS}....; \ + (mkdir ${OS}; cd ${OS}; \ + ln -s ../*.[ch] ../newvers.sh .; \ + ln -s ../sendmail.restart ../sendmail.hf .; \ + ln -s ../aliases.5 ../mailq.1 ../newaliases.1 ../sendmail.8 .; \ + if [ ! -f /usr/include/sysexits.h -a -f /usr/ucbinclude/sysexits.h ]; then \ + cp /usr/ucbinclude/sysexits.h .; \ + if expr "${DBMDEF}" : ".*-DNDBM.*" > /dev/null; then \ + cp /usr/ucbinclude/ndbm.h .; \ + ar x /usr/ucblib/libucb.a ndbm.o; \ + fi; \ + fi; \ + ln -s ../${MAKEFILE} Makefile); \ + else true; fi + + sendmail: sendmail.mx sendmail.nomx + + sendmail.nomx: ${OBJS} ${NOMXOBJS} Version.o + ${CC} -o $@ ${OBJS} ${NOMXOBJS} Version.o ${LDOPTS} ${LIBDIRS} ${LIBS} + size $@; ls -l $@; what < Version.o + + sendmail.mx: ${OBJS} ${MXOBJS} Version-mx.o + ${CC} -o $@ ${OBJS} ${MXOBJS} Version-mx.o ${LDOPTS} ${LIBDIRS} ${RESLIB} ${LIBS} + size $@; ls -l $@; what < Version-mx.o + + Version.c: ${SRCS} version.c + @echo generating Version.c from version.c + sh newvers.sh + + # Here are MX depend sources. + daemon-mx.o: daemon.c + deliver-mx.o: deliver.c + domain-mx.o: domain.c + err-mx.o: err.c + main-mx.o: main.c + readcf-mx.o: readcf.c + savemail-mx.o: savemail.c + udb-mx.o: udb.c + Version-mx.o: Version.c + + ${MXOBJS} Version-mx.o: + ln -s `expr $@ : '\(.*\)-mx.o'`.c `expr $@ : '\(.*-mx\).o'`.c + ${CC} ${CFLAGS} -DNAMED_BIND=1 -c `expr $@ : '\(.*-mx\).o'`.c + rm `expr $@ : '\(.*-mx\).o'`.c + + NROFF= nroff -h + + aliases.0: aliases.5 + ${NROFF} -mandoc aliases.5 > aliases.0 + + mailq.0: mailq.1 + ${NROFF} -mandoc mailq.1 > mailq.0 + + newaliases.0: newaliases.1 + ${NROFF} -mandoc newaliases.1 > newaliases.0 + + sendmail.0: sendmail.8 + ${NROFF} -mandoc sendmail.8 > sendmail.0 + + restart: + test -x sendmail.restart || chmod +x sendmail.restart + sh sendmail.restart + + INSTALL=install-sendmail # install-docs + + install: + if [ -d ${OS} ]; then \ + (cd ${OS}; ${MAKE} ${INSTALL}); \ + else \ + ${MAKE} ${INSTALL}; \ + fi + + install-sendmail: sendmail + mv -f ${BINDIR}/sendmail.mx ${BINDIR}/sendmail.mx.OLD + install -c -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \ + sendmail.mx ${BINDIR} + mv -f ${BINDIR}/sendmail.nomx ${BINDIR}/sendmail.nomx.OLD + install -c -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \ + sendmail.nomx ${BINDIR} + rm -f ${BINDIR}/sendmail; ln -s ${BINDIR}/sendmail.mx ${BINDIR}/sendmail + for i in ${LINKS}; do (rm -f $$i; ln -s ${BINDIR}/sendmail $$i); done + install -c -o ${BINOWN} -g ${BINGRP} -m 644 /dev/null \ + ${STDIR}/sendmail.st + mv -f ${HFDIR}/sendmail.hf ${HFDIR}/sendmail.hf.OLD + install -c -o ${BINOWN} -g ${BINGRP} -m 444 sendmail.hf ${HFDIR} + + # doesn't actually install them -- you may want to install pre-nroff versions + install-docs: aliases.0 mailq.0 newaliases.0 sendmail.0 + + clean: + if [ -d ${OS} ]; then \ + (cd ${OS}; ${MAKE} clean); \ + else \ + rm -f ${OBJS} ${MXOBJS} ${NOMXOBJS} Version.o Version-mx.o \ + sendmail.mx sendmail.nomx \ + aliases.0 mailq.0 newaliases.0 sendmail.0 core; \ + fi + + # dependencies + # gross overkill, and yet still not quite enough.... + ${OBJS}: sendmail.h conf.h + ${MXOBJS}: sendmail.h conf.h + ${NOMXOBJS}: sendmail.h conf.h diff -c ../src.org/Makefile.WIDE.HP-UX ./Makefile.WIDE.HP-UX *** ../src.org/Makefile.WIDE.HP-UX Thu Mar 30 11:52:11 1995 --- ./Makefile.WIDE.HP-UX Thu Mar 30 11:47:41 1995 *************** *** 0 **** --- 1,211 ---- + # + # This Makefile is designed to work on the old "make" program. It does + # not use the obj subdirectory. It also does not install documentation + # automatically -- think of it as a quick start for sites that have the + # old make program (I recommend that you get and port the new make if you + # are going to be doing any signficant work on sendmail). + # + # @(#)Makefile.WIDE.HP-UX 2.2 (hayashi@kuic) 5/18/94 + # @(#)Makefile.dist 8.1 (Berkeley) 6/7/93 + # + # Makefile for HP-UX A.08.07 and A.09.01 + # This has been tested on HP-UX A.08.07 and A.09.01 (without -DNIS) + + # name of this Makefile + MAKEFILE=Makefile.WIDE.HP-UX + MAKE= make + + # object directory for this architecture + # ex) "HP-UX-A.08.07" + OS= `uname -s`-`uname -r` + + # use O=-O (usual) or O=-g (debugging) + # +O2 is OK on 7xx at 8.07 + #O= -O + #O= +O2 # for HP-UX A.08.07 + O= +O1 # for HP-UX A.09.01 + + # define the database mechanisms available for map & alias lookups: + # -DNDBM -- use new DBM + # -DNEWDB -- use new Berkeley DB + # -DNIS -- include client NIS support + # The really old (V7) DBM library is no longer supported. + # See READ_ME for a description of how these flags interact. + # + DBMDEF= -DNDBM -DNEWDB # -DNIS + + # see also conf.h for additional compilation flags + + # environment definitions (e.g., -D_AIX3) + ENVDEF= -D__hpux + + # directory for BIND + #BINDDIR=../../../bind + # directory for new Berkeley DB + NEWDBDIR=../../../db/PORT/hpux.`uname -r` + + # include directories + #BINDINCDIRS= -I${BINDDIR}/include -I${BINDDIR}/compat/include + NEWDBINCDIRS= -I${NEWDBDIR}/include -I${NEWDBDIR} + INCDIRS= ${BINDINCDIRS} ${NEWDBINCDIRS} + + # loader options + LDOPTS= + + # library directories + #BINDLIBDIRS= -L${BINDDIR}/res # -L${BINDDIR}/compat/lib + NEWDBLIBDIRS= -L${NEWDBDIR} + LIBDIRS= ${BINDLIBDIRS} ${NEWDBLIBDIRS} + + # libraries required on your system + # -l44bsd is needed with bind4.9 in RESLIB + LIBS= -ldb -ldbm + #RESLIB= -lresolv # -l44bsd + + # location of sendmail binary (usually /usr/sbin or /usr/lib) + BINDIR= ${DESTDIR}/usr/lib + + # location of sendmail.st file (usually /var/log or /usr/lib) + #STDIR= ${DESTDIR}/etc + STDIR= ${DESTDIR}/usr/lib + + # location of sendmail.hf file (usually /usr/share/misc or /usr/lib) + HFDIR= ${DESTDIR}/usr/lib + + # additional .c files needed + SRCADD= + # additional .o files needed + OBJADD= + + ################### end of user configuration flags ###################### + + CFLAGS= -I. $O ${INCDIRS} ${DBMDEF} ${ENVDEF} + + SRCS= alias.c arpadate.c clock.c collect.c conf.c convtime.c daemon.c \ + deliver.c domain.c envelope.c err.c headers.c macro.c main.c \ + map.c mci.c parseaddr.c queue.c readcf.c recipient.c \ + savemail.c srvrsmtp.c stab.c stats.c sysexits.c \ + trace.c udb.c usersmtp.c util.c ${SRCADD} + OBJS= alias.o arpadate.o clock.o collect.o conf.o convtime.o envelope.o \ + headers.o macro.o map.o mci.o parseaddr.o queue.o recipient.o \ + srvrsmtp.o stab.o stats.o sysexits.o trace.o usersmtp.o util.o ${OBJADD} + MXOBJS= daemon-mx.o deliver-mx.o domain-mx.o err-mx.o main-mx.o readcf-mx.o \ + savemail-mx.o udb-mx.o + NOMXOBJS= daemon.o deliver.o domain.o err.o main.o readcf.o \ + savemail.o udb.o + + LINKS= ${DESTDIR}/usr/bin/newaliases ${DESTDIR}/usr/bin/mailq + BINOWN= root + BINGRP= mail + BINMODE=6555 + + ALL= sendmail + + all: + if [ -f ${MAKEFILE} ]; then \ + ${MAKE} -f ${MAKEFILE} mkdir; \ + (cd ${OS}; ${MAKE} ${ALL}); \ + else \ + ${MAKE} ${ALL}; \ + fi + + mkdir: + @test -x newvers.sh || chmod +x newvers.sh + @if [ ! -d ${OS} ]; then \ + echo Creating directory ${OS}....; \ + (mkdir ${OS}; cd ${OS}; \ + ln -s ../*.[ch] ../newvers.sh .; \ + ln -s ../sendmail.restart ../sendmail.hf .; \ + ln -s ../aliases.5 ../mailq.1 ../newaliases.1 ../sendmail.8 .; \ + ln -s ../${MAKEFILE} Makefile); \ + else true; fi + + sendmail: sendmail.mx sendmail.nomx + + sendmail.nomx: ${OBJS} ${NOMXOBJS} Version.o + ${CC} -o $@ ${OBJS} ${NOMXOBJS} Version.o ${LDOPTS} ${LIBDIRS} ${LIBS} + size $@; ls -l $@; what < Version.o + + sendmail.mx: ${OBJS} ${MXOBJS} Version-mx.o + ${CC} -o $@ ${OBJS} ${MXOBJS} Version-mx.o ${LDOPTS} ${LIBDIRS} ${RESLIB} ${LIBS} + size $@; ls -l $@; what < Version-mx.o + + Version.c: ${SRCS} version.c + @echo generating Version.c from version.c + sh newvers.sh + + # Here are MX depend sources. + daemon-mx.o: daemon.c + deliver-mx.o: deliver.c + domain-mx.o: domain.c + err-mx.o: err.c + main-mx.o: main.c + readcf-mx.o: readcf.c + savemail-mx.o: savemail.c + udb-mx.o: udb.c + Version-mx.o: Version.c + + ${MXOBJS} Version-mx.o: + ${CC} ${CFLAGS} -DNAMED_BIND=1 -c `expr $@ : '\(.*\)-mx.o'`.c -o $@ + + NROFF= nroff -h + + aliases.0: aliases.5 + ${NROFF} -mandoc aliases.5 > aliases.0 + + mailq.0: mailq.1 + ${NROFF} -mandoc mailq.1 > mailq.0 + + newaliases.0: newaliases.1 + ${NROFF} -mandoc newaliases.1 > newaliases.0 + + sendmail.0: sendmail.8 + ${NROFF} -mandoc sendmail.8 > sendmail.0 + + restart: + test -x sendmail.restart || chmod +x sendmail.restart + sh sendmail.restart + + INSTALL=install-sendmail # install-docs + + install: + if [ -d ${OS} ]; then \ + (cd ${OS}; ${MAKE} ${INSTALL}); \ + else \ + ${MAKE} ${INSTALL}; \ + fi + + install-sendmail: sendmail + if [ -f ${BINDIR}/sendmail.mx ]; then \ + (mv -f ${BINDIR}/sendmail.mx ${BINDIR}/sendmail.mx.OLD); \ + fi + cpset sendmail.mx ${BINDIR} ${BINMODE} ${BINOWN} ${BINGRP} + if [ -f ${BINDIR}/sendmail.nomx ]; then \ + (mv -f ${BINDIR}/sendmail.nomx ${BINDIR}/sendmail.nomx.OLD); \ + fi + cpset sendmail.nomx ${BINDIR} ${BINMODE} ${BINOWN} ${BINGRP} + rm -f ${BINDIR}/sendmail; ln -s ${BINDIR}/sendmail.mx ${BINDIR}/sendmail + for i in ${LINKS}; do (rm -f $$i; ln -s ${BINDIR}/sendmail $$i); done + cpset /dev/null ${STDIR}/sendmail.st 644 ${BINOWN} ${BINGRP} + if [ -f ${HFDIR}/sendmail.hf ]; then \ + (mv -f ${HFDIR}/sendmail.hf ${HFDIR}/sendmail.hf.OLD); \ + fi + cpset sendmail.hf ${HFDIR} 444 ${BINOWN} ${BINGRP} + + # doesn't actually install them -- you may want to install pre-nroff versions + install-docs: aliases.0 mailq.0 newaliases.0 sendmail.0 + + clean: + if [ -d ${OS} ]; then \ + (cd ${OS}; ${MAKE} clean); \ + else \ + rm -f ${OBJS} ${MXOBJS} ${NOMXOBJS} Version.o Version-mx.o \ + sendmail.mx sendmail.nomx \ + aliases.0 mailq.0 newaliases.0 sendmail.0 core; \ + fi + + # dependencies + # gross overkill, and yet still not quite enough.... + ${OBJS}: sendmail.h conf.h + ${MXOBJS}: sendmail.h conf.h + ${NOMXOBJS}: sendmail.h conf.h diff -c ../src.org/Makefile.WIDE.LUNA ./Makefile.WIDE.LUNA *** ../src.org/Makefile.WIDE.LUNA Thu Mar 30 11:52:12 1995 --- ./Makefile.WIDE.LUNA Thu Mar 30 11:47:42 1995 *************** *** 0 **** --- 1,219 ---- + # + # This Makefile is designed to work on the old "make" program. It does + # not use the obj subdirectory. It also does not install documentation + # automatically -- think of it as a quick start for sites that have the + # old make program (I recommend that you get and port the new make if you + # are going to be doing any signficant work on sendmail). + # + # @(#)Makefile.WIDE.LUNA 2.14 (motonori/WIDE) 4/20/94 + # @(#)Makefile.dist 8.1 (Berkeley) 6/7/93 + # + # Makefile for OMRON/LUNA UniOS-B 3.0, LUNA2 Mach and LUNA88K Mach + # + # You may need to prepare following softwares before making sendmail. + # for LUNA/UniOS-B -- new Berkeley DB, BIND 4.8.3 or later + # for LUNA2/Mach -- new Berkeley DB + # for LUNA88K/Mach -- new Berkeley DB, BIND 4.8.3 or later + + + # name of this Makefile + MAKEFILE=Makefile.WIDE.LUNA + MAKE= make + #CC= gcc + + # object directory for this architecture + OS= unios-b3.0 + #OS= luna2m + #OS= luna88k + + # use O=-O (usual) or O=-g (debugging) + O= -O + + # define the database mechanisms available for map & alias lookups: + # -DNDBM -- use new DBM + # -DNEWDB -- use new Berkeley DB + # -DNIS -- include client NIS support + # The really old (V7) DBM library is no longer supported. + # See READ_ME for a description of how these flags interact. + # + DBMDEF= -DNDBM # -DNEWDB -DNIS + + # see also conf.h for additional compilation flags + + # environment definitions. + ENVDEF= + + # directory for BIND + BINDDIR=../../../bind + # directory for new Berkeley DB + NEWDBDIR=../../../db/PORT/${OS} + + # include directories + BINDINCDIRS= -I${BINDDIR}/include -I${BINDDIR}/compat/include + NEWDBINCDIRS= -I${NEWDBDIR}/include -I${NEWDBDIR} + INCDIRS= ${BINDINCDIRS} ${NEWDBINCDIRS} + + # loader options + LDOPTS= + + # library directories + BINDLIBDIRS= -L${BINDDIR}/res # -L${BINDDIR}/compat/lib + NEWDBLIBDIRS= -L${NEWDBDIR} + LIBDIRS= ${BINDLIBDIRS} ${NEWDBLIBDIRS} + + # libraries required on your system + # -l44bsd is needed with bind4.9 in RESLIB + LIBS= # -ldb + RESLIB= -lresolv # -l44bsd + + # location of sendmail binary (usually /usr/sbin or /usr/lib) + BINDIR= ${DESTDIR}/usr/lib + + # location of sendmail.st file (usually /var/log or /usr/lib) + STDIR= ${DESTDIR}/usr/lib + + # location of sendmail.hf file (usually /usr/share/misc or /usr/lib) + HFDIR= ${DESTDIR}/usr/lib + + # additional .c files needed + SRCADD= + # additional .o files needed + OBJADD= + + ################### end of user configuration flags ###################### + + CFLAGS= -I. $O ${INCDIRS} ${DBMDEF} ${ENVDEF} + + SRCS= alias.c arpadate.c clock.c collect.c conf.c convtime.c daemon.c \ + deliver.c domain.c envelope.c err.c headers.c macro.c main.c \ + map.c mci.c parseaddr.c queue.c readcf.c recipient.c \ + savemail.c srvrsmtp.c stab.c stats.c sysexits.c \ + trace.c udb.c usersmtp.c util.c ${SRCADD} + OBJS= alias.o arpadate.o clock.o collect.o conf.o convtime.o envelope.o \ + headers.o macro.o map.o mci.o parseaddr.o queue.o recipient.o \ + srvrsmtp.o stab.o stats.o sysexits.o trace.o usersmtp.o util.o ${OBJADD} + MXOBJS= daemon-mx.o deliver-mx.o domain-mx.o err-mx.o main-mx.o readcf-mx.o \ + savemail-mx.o udb-mx.o + NOMXOBJS= daemon.o deliver.o domain.o err.o main.o readcf.o \ + savemail.o udb.o + + LINKS= ${DESTDIR}/usr/ucb/newaliases ${DESTDIR}/usr/ucb/mailq + BINOWN= root + BINGRP= kmem + BINMODE=6555 + + ALL= sendmail + + all: + if [ -f ${MAKEFILE} ]; then \ + ${MAKE} -f ${MAKEFILE} mkdir; \ + (cd ${OS}; ${MAKE} ${ALL}); \ + else \ + ${MAKE} ${ALL}; \ + fi + + mkdir: + @chmod +x newvers.sh + @if [ ! -d ${OS} ]; then \ + echo Creating directory ${OS}....; \ + (mkdir ${OS}; cd ${OS}; \ + ln -s ../*.[ch] ../newvers.sh .; \ + ln -s ../sendmail.restart ../sendmail.hf .; \ + ln -s ../aliases.5 ../mailq.1 ../newaliases.1 ../sendmail.8 .; \ + if [ "${OS}" != luna88k ]; then \ + touch limits.h stddef.h stdlib.h unistd.h; \ + fi; \ + echo Creating lacked headers....; \ + echo "#include " > dirent.h; \ + echo "#define dirent direct" >> dirent.h; \ + ln -s ../${MAKEFILE} Makefile); \ + else true; fi + + sendmail: sendmail.mx sendmail.nomx + + sendmail.nomx: ${OBJS} ${NOMXOBJS} Version.o + ${CC} -o $@ ${OBJS} ${NOMXOBJS} Version.o ${LDOPTS} ${LIBDIRS} ${LIBS} + size $@; ls -l $@; what < Version.o + + sendmail.mx: ${OBJS} ${MXOBJS} Version-mx.o + ${CC} -o $@ ${OBJS} ${MXOBJS} Version-mx.o ${LDOPTS} ${LIBDIRS} ${RESLIB} ${LIBS} + size $@; ls -l $@; what < Version-mx.o + + Version.c: ${SRCS} version.c + @echo generating Version.c from version.c + sh newvers.sh + + # Here are MX depend sources. + daemon-mx.o: daemon.c + deliver-mx.o: deliver.c + domain-mx.o: domain.c + err-mx.o: err.c + main-mx.o: main.c + readcf-mx.o: readcf.c + savemail-mx.o: savemail.c + udb-mx.o: udb.c + Version-mx.o: Version.c + + ${MXOBJS} Version-mx.o: + ln -s `expr $@ : '\(.*\)-mx.o'`.c `expr $@ : '\(.*-mx\).o'`.c + ${CC} ${CFLAGS} -DNAMED_BIND=1 -c `expr $@ : '\(.*-mx\).o'`.c + rm `expr $@ : '\(.*-mx\).o'`.c + + NROFF= nroff -h + + aliases.0: aliases.5 + ${NROFF} -mandoc aliases.5 > aliases.0 + + mailq.0: mailq.1 + ${NROFF} -mandoc mailq.1 > mailq.0 + + newaliases.0: newaliases.1 + ${NROFF} -mandoc newaliases.1 > newaliases.0 + + sendmail.0: sendmail.8 + ${NROFF} -mandoc sendmail.8 > sendmail.0 + + restart: + chmod +x sendmail.restart + sh sendmail.restart + + INSTALL=install-sendmail # install-docs + + install: + if [ -d ${OS} ]; then \ + (cd ${OS}; ${MAKE} ${INSTALL}); \ + else \ + ${MAKE} ${INSTALL}; \ + fi + + install-sendmail: sendmail + mv -f ${BINDIR}/sendmail.mx ${BINDIR}/sendmail.mx.OLD + install -c -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \ + sendmail.mx ${BINDIR} + mv -f ${BINDIR}/sendmail.nomx ${BINDIR}/sendmail.nomx.OLD + install -c -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \ + sendmail.nomx ${BINDIR} + rm -f ${BINDIR}/sendmail; ln -s ${BINDIR}/sendmail.mx ${BINDIR}/sendmail + for i in ${LINKS}; do (rm -f $$i; ln -s ${BINDIR}/sendmail $$i); done + install -c -o ${BINOWN} -g ${BINGRP} -m 644 /dev/null \ + ${STDIR}/sendmail.st + mv -f ${HFDIR}/sendmail.hf ${HFDIR}/sendmail.hf.OLD + install -c -o ${BINOWN} -g ${BINGRP} -m 444 sendmail.hf ${HFDIR} + + # doesn't actually install them -- you may want to install pre-nroff versions + install-docs: aliases.0 mailq.0 newaliases.0 sendmail.0 + + clean: + if [ -d ${OS} ]; then \ + (cd ${OS}; ${MAKE} clean); \ + else \ + rm -f ${OBJS} ${MXOBJS} ${NOMXOBJS} Version.o Version-mx.o \ + sendmail.mx sendmail.nomx \ + aliases.0 mailq.0 newaliases.0 sendmail.0 core; \ + fi + + # dependencies + # gross overkill, and yet still not quite enough.... + ${OBJS}: sendmail.h conf.h + ${MXOBJS}: sendmail.h conf.h + ${NOMXOBJS}: sendmail.h conf.h diff -c ../src.org/Makefile.WIDE.NEWS ./Makefile.WIDE.NEWS *** ../src.org/Makefile.WIDE.NEWS Thu Mar 30 11:52:12 1995 --- ./Makefile.WIDE.NEWS Thu Mar 30 11:47:42 1995 *************** *** 0 **** --- 1,219 ---- + # + # This Makefile is designed to work on the old "make" program. It does + # not use the obj subdirectory. It also does not install documentation + # automatically -- think of it as a quick start for sites that have the + # old make program (I recommend that you get and port the new make if you + # are going to be doing any signficant work on sendmail). + # + # @(#)Makefile.WIDE.NEWS 2.17 (motonori/WIDE) 4/22/94 + # @(#)Makefile.dist 8.1 (Berkeley) 6/7/93 + # + # Makefile for SONY/NEWS NEWS-OS 4.1/4.2, NEWS-OS 6.0.1 + # This has been tested on NEWS-OS 4.2R. + + # name of this Makefile + MAKEFILE=Makefile.WIDE.NEWS + MAKE= make + + # object directory for this architecture + #OS= newsos.41 + #OS= newsos.42r + OS= newsos.60 # do not use /usr/ucb/cc + + # use O=-O (usual) or O=-g (debugging) + O= -O + + # define the database mechanisms available for map & alias lookups: + # -DNDBM -- use new DBM + # -DNEWDB -- use new Berkeley DB + # -DNIS -- include client NIS support + # The really old (V7) DBM library is no longer supported. + # See READ_ME for a description of how these flags interact. + # + DBMDEF= -DNDBM # -DNEWDB -DNIS + + # see also conf.h for additional compilation flags + + # environment definitions (e.g., -D_AIX3) + # for 4.1 + #ENVDEF= -DSLEEP_T=void + # for 4.2 or later + ENVDEF= + + # directory for BIND + BINDDIR=../../../bind + # directory for new Berkeley DB + NEWDBDIR=../../../db/PORT/${OS} + + # include directories + BINDINCDIRS= -I${BINDDIR}/include -I${BINDDIR}/compat/include + NEWDBINCDIRS= -I${NEWDBDIR}/include -I${NEWDBDIR} + INCDIRS= ${BINDINCDIRS} ${NEWDBINCDIRS} + + # loader options + LDOPTS= + + # library directories + BINDLIBDIRS= -L${BINDDIR}/res # -L${BINDDIR}/compat/lib + NEWDBLIBDIRS= -L${NEWDBDIR} + LIBDIRS= ${BINDLIBDIRS} ${NEWDBLIBDIRS} + + # libraries required on your system + # -l44bsd is needed with bind4.9 in RESLIB + #LIBS= -lmld # -ldb # for NEWS-OS 4 + LIBS= ndbm.o -lmld -lsocket -lnsl # for NEWS-OS 6 with NDBM + #LIBS= -lmld -lsocket -lnsl -ldb # for NEWS-OS 6 with NEWDB + RESLIB= -lresolv # -l44bsd + + # location of sendmail binary (usually /usr/sbin or /usr/lib) + BINDIR= ${DESTDIR}/usr/lib + + # location of sendmail.st file (usually /var/log or /usr/lib) + STDIR= ${DESTDIR}/usr/lib + + # location of sendmail.hf file (usually /usr/share/misc or /usr/lib) + HFDIR= ${DESTDIR}/usr/lib + + # additional .c files needed + SRCADD= + # additional .o files needed + OBJADD= + + ################### end of user configuration flags ###################### + + SHELL= /bin/sh + + CFLAGS= -I. $O ${INCDIRS} ${DBMDEF} ${ENVDEF} + + SRCS= alias.c arpadate.c clock.c collect.c conf.c convtime.c daemon.c \ + deliver.c domain.c envelope.c err.c headers.c macro.c main.c \ + map.c mci.c parseaddr.c queue.c readcf.c recipient.c \ + savemail.c srvrsmtp.c stab.c stats.c sysexits.c \ + trace.c udb.c usersmtp.c util.c ${SRCADD} + OBJS= alias.o arpadate.o clock.o collect.o conf.o convtime.o envelope.o \ + headers.o macro.o map.o mci.o parseaddr.o queue.o recipient.o \ + srvrsmtp.o stab.o stats.o sysexits.o trace.o usersmtp.o util.o ${OBJADD} + MXOBJS= daemon-mx.o deliver-mx.o domain-mx.o err-mx.o main-mx.o readcf-mx.o \ + savemail-mx.o udb-mx.o + NOMXOBJS= daemon.o deliver.o domain.o err.o main.o readcf.o \ + savemail.o udb.o + + LINKS= ${DESTDIR}/usr/ucb/newaliases ${DESTDIR}/usr/ucb/mailq + BINOWN= root + BINGRP= kmem + BINMODE=6555 + + ALL= sendmail + + all: + if [ -f ${MAKEFILE} ]; then \ + ${MAKE} -f ${MAKEFILE} mkdir; \ + (cd ${OS}; ${MAKE} ${ALL}); \ + else \ + ${MAKE} ${ALL}; \ + fi + + mkdir: + @test -x newvers.sh || chmod +x newvers.sh + @if [ ! -d ${OS} ]; then \ + echo Creating directory ${OS}....; \ + (mkdir ${OS}; cd ${OS}; \ + ln -s ../*.[ch] ../newvers.sh .; \ + ln -s ../sendmail.restart ../sendmail.hf .; \ + ln -s ../aliases.5 ../mailq.1 ../newaliases.1 ../sendmail.8 .; \ + if [ ! -f /usr/include/sysexits.h -a -f /usr/ucbinclude/sysexits.h ]; then \ + cp /usr/ucbinclude/sysexits.h .; \ + if expr "${DBMDEF}" : ".*-DNDBM.*" > /dev/null; then \ + cp /usr/ucbinclude/ndbm.h .; \ + ar x /usr/ucblib/libucb.a ndbm.o; \ + fi; \ + fi; \ + ln -s ../${MAKEFILE} Makefile); \ + else true; fi + + sendmail: sendmail.mx sendmail.nomx + + sendmail.nomx: ${OBJS} ${NOMXOBJS} Version.o + ${CC} -o $@ ${OBJS} ${NOMXOBJS} Version.o ${LDOPTS} ${LIBDIRS} ${LIBS} + size $@; ls -l $@; what < Version.o + + sendmail.mx: ${OBJS} ${MXOBJS} Version-mx.o + ${CC} -o $@ ${OBJS} ${MXOBJS} Version-mx.o ${LDOPTS} ${LIBDIRS} ${RESLIB} ${LIBS} + size $@; ls -l $@; what < Version-mx.o + + Version.c: ${SRCS} version.c + @echo generating Version.c from version.c + sh newvers.sh + + # Here are MX depend sources. + daemon-mx.o: daemon.c + deliver-mx.o: deliver.c + domain-mx.o: domain.c + err-mx.o: err.c + main-mx.o: main.c + readcf-mx.o: readcf.c + savemail-mx.o: savemail.c + udb-mx.o: udb.c + Version-mx.o: Version.c + + ${MXOBJS} Version-mx.o: + ${CC} ${CFLAGS} -DNAMED_BIND=1 -c `expr $@ : '\(.*\)-mx.o'`.c -o $@ + + NROFF= nroff -h + + aliases.0: aliases.5 + ${NROFF} -mandoc aliases.5 > aliases.0 + + mailq.0: mailq.1 + ${NROFF} -mandoc mailq.1 > mailq.0 + + newaliases.0: newaliases.1 + ${NROFF} -mandoc newaliases.1 > newaliases.0 + + sendmail.0: sendmail.8 + ${NROFF} -mandoc sendmail.8 > sendmail.0 + + restart: + test -x sendmail.restart || chmod +x sendmail.restart + sh sendmail.restart + + INSTALL=install-sendmail # install-docs + + install: + if [ -d ${OS} ]; then \ + (cd ${OS}; ${MAKE} ${INSTALL}); \ + else \ + ${MAKE} ${INSTALL}; \ + fi + + install-sendmail: sendmail + mv -f ${BINDIR}/sendmail.mx ${BINDIR}/sendmail.mx.OLD + install -c -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \ + sendmail.mx ${BINDIR} + mv -f ${BINDIR}/sendmail.nomx ${BINDIR}/sendmail.nomx.OLD + install -c -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \ + sendmail.nomx ${BINDIR} + rm -f ${BINDIR}/sendmail; ln -s ${BINDIR}/sendmail.mx ${BINDIR}/sendmail + for i in ${LINKS}; do (rm -f $$i; ln -s ${BINDIR}/sendmail $$i); done + install -c -o ${BINOWN} -g ${BINGRP} -m 644 /dev/null \ + ${STDIR}/sendmail.st + mv -f ${HFDIR}/sendmail.hf ${HFDIR}/sendmail.hf.OLD + install -c -o ${BINOWN} -g ${BINGRP} -m 444 sendmail.hf ${HFDIR} + + # doesn't actually install them -- you may want to install pre-nroff versions + install-docs: aliases.0 mailq.0 newaliases.0 sendmail.0 + + clean: + if [ -d ${OS} ]; then \ + (cd ${OS}; ${MAKE} clean); \ + else \ + rm -f ${OBJS} ${MXOBJS} ${NOMXOBJS} Version.o Version-mx.o \ + sendmail.mx sendmail.nomx \ + aliases.0 mailq.0 newaliases.0 sendmail.0 core; \ + fi + + # dependencies + # gross overkill, and yet still not quite enough.... + ${OBJS}: sendmail.h conf.h + ${MXOBJS}: sendmail.h conf.h + ${NOMXOBJS}: sendmail.h conf.h diff -c ../src.org/Makefile.WIDE.SEIUX ./Makefile.WIDE.SEIUX *** ../src.org/Makefile.WIDE.SEIUX Thu Mar 30 11:52:12 1995 --- ./Makefile.WIDE.SEIUX Thu Mar 30 11:47:42 1995 *************** *** 0 **** --- 1,200 ---- + # + # This Makefile is designed to work on the old "make" program. It does + # not use the obj subdirectory. It also does not install documentation + # automatically -- think of it as a quick start for sites that have the + # old make program (I recommend that you get and port the new make if you + # are going to be doing any signficant work on sendmail). + # + # @(#)Makefile.WIDE.SEIUX 2.10 (motonori/WIDE) 4/20/94 + # @(#)Makefile.dist 8.1 (Berkeley) 6/7/93 + # + # Makefile for SEIUX 3.2 + # This has been tested on SUMISTATION/SEIUX.3.2. + + # name of this Makefile + MAKEFILE=Makefile.WIDE.SEIUX + MAKE= make + + # object directory for this architecture + OS= `uname -v`-`uname -r` + + # use O=-O (usual) or O=-g (debugging) + O= -O + + # define the database mechanisms available for map & alias lookups: + # -DNDBM -- use new DBM + # -DNEWDB -- use new Berkeley DB + # -DNIS -- include client NIS support + # The really old (V7) DBM library is no longer supported. + # See READ_ME for a description of how these flags interact. + # + DBMDEF= -DNDBM # -DNEWDB -DNIS + + # see also conf.h for additional compilation flags + + # environment definitions (e.g., -D_AIX3) + ENVDEF= -D`uname -v` -Olimit 2000 -Wf,-XNd8400,-XNp12000 + + # directory for BIND + BINDDIR=../../../bind + # directory for new Berkeley DB + NEWDBDIR=../../../db/PORT/seiux.`uname -r` + + # include directories + #BINDINCDIRS= -I${BINDDIR}/include -I${BINDDIR}/compat/include + NEWDBINCDIRS= -I${NEWDBDIR}/include -I${NEWDBDIR} + INCDIRS= ${BINDINCDIRS} ${NEWDBINCDIRS} + + # loader options + LDOPTS= + + # library directories + #BINDLIBDIRS= -L${BINDDIR}/res # -L${BINDDIR}/compat/lib + NEWDBLIBDIRS= -L${NEWDBDIR} + LIBDIRS= ${BINDLIBDIRS} ${NEWDBLIBDIRS} + + # libraries required on your system + # -l44bsd is needed with bind4.9 in RESLIB + LIBS= -ldbm -lmld # -ldb + #RESLIB= -lresolv # -l44bsd + + # location of sendmail binary (usually /usr/sbin or /usr/lib) + BINDIR= ${DESTDIR}/usr/lib + + # location of sendmail.st file (usually /var/log or /usr/lib) + STDIR= ${DESTDIR}/usr/lib + + # location of sendmail.hf file (usually /usr/share/misc or /usr/lib) + HFDIR= ${DESTDIR}/usr/lib + + # additional .c files needed + SRCADD= + # additional .o files needed + OBJADD= + + ################### end of user configuration flags ###################### + + CFLAGS= -I. $O ${INCDIRS} ${DBMDEF} ${ENVDEF} + + SRCS= alias.c arpadate.c clock.c collect.c conf.c convtime.c daemon.c \ + deliver.c domain.c envelope.c err.c headers.c macro.c main.c \ + map.c mci.c parseaddr.c queue.c readcf.c recipient.c \ + savemail.c srvrsmtp.c stab.c stats.c sysexits.c \ + trace.c udb.c usersmtp.c util.c ${SRCADD} + OBJS= alias.o arpadate.o clock.o collect.o conf.o convtime.o envelope.o \ + headers.o macro.o map.o mci.o parseaddr.o queue.o recipient.o \ + srvrsmtp.o stab.o stats.o sysexits.o trace.o usersmtp.o util.o ${OBJADD} + MXOBJS= daemon-mx.o deliver-mx.o domain-mx.o err-mx.o main-mx.o readcf-mx.o \ + savemail-mx.o udb-mx.o + NOMXOBJS= daemon.o deliver.o domain.o err.o main.o readcf.o \ + savemail.o udb.o + + LINKS= ${DESTDIR}/usr/ucb/newaliases ${DESTDIR}/usr/ucb/mailq + BINOWN= root + BINGRP= kmem + BINMODE=6555 + + ALL= sendmail + + all: + if [ -f ${MAKEFILE} ]; then \ + ${MAKE} -f ${MAKEFILE} mkdir; \ + (cd ${OS}; ${MAKE} ${ALL}); \ + else \ + ${MAKE} ${ALL}; \ + fi + + mkdir: + @test -x newvers.sh || chmod +x newvers.sh + @if [ ! -d ${OS} ]; then \ + echo Creating directory ${OS}....; \ + (mkdir ${OS}; cd ${OS}; \ + ln -s ../*.[ch] ../newvers.sh .; \ + ln -s ../sendmail.restart ../sendmail.hf .; \ + ln -s ../aliases.5 ../mailq.1 ../newaliases.1 ../sendmail.8 .; \ + ln -s ../${MAKEFILE} Makefile); \ + else true; fi + + sendmail: sendmail.mx sendmail.nomx + + sendmail.nomx: ${OBJS} ${NOMXOBJS} Version.o + ${CC} -o $@ ${OBJS} ${NOMXOBJS} Version.o ${LDOPTS} ${LIBDIRS} ${LIBS} + size $@; ls -l $@; what < Version.o + + sendmail.mx: ${OBJS} ${MXOBJS} Version-mx.o + ${CC} -o $@ ${OBJS} ${MXOBJS} Version-mx.o ${LDOPTS} ${LIBDIRS} ${RESLIB} ${LIBS} + size $@; ls -l $@; what < Version-mx.o + + Version.c: ${SRCS} version.c + @echo generating Version.c from version.c + sh newvers.sh + + # Here are MX depend sources. + daemon-mx.o: daemon.c + deliver-mx.o: deliver.c + domain-mx.o: domain.c + err-mx.o: err.c + main-mx.o: main.c + readcf-mx.o: readcf.c + savemail-mx.o: savemail.c + udb-mx.o: udb.c + Version-mx.o: Version.c + + ${MXOBJS} Version-mx.o: + ${CC} ${CFLAGS} -DNAMED_BIND=1 -c `expr $@ : '\(.*\)-mx.o'`.c -o $@ + + NROFF= nroff + + aliases.0: aliases.5 + ${NROFF} -mandoc aliases.5 > aliases.0 + + mailq.0: mailq.1 + ${NROFF} -mandoc mailq.1 > mailq.0 + + sendmail.0: sendmail.8 + ${NROFF} -mandoc sendmail.8 > sendmail.0 + + restart: + test -x sendmail.restart || chmod +x sendmail.restart + sh sendmail.restart + + INSTALL=install-sendmail # install-docs + + install: + if [ -d ${OS} ]; then \ + (cd ${OS}; ${MAKE} ${INSTALL}); \ + else \ + ${MAKE} ${INSTALL}; \ + fi + + install-sendmail: sendmail + mv -f ${BINDIR}/sendmail.mx ${BINDIR}/sendmail.mx.OLD + install -c -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \ + sendmail.mx ${BINDIR} + mv -f ${BINDIR}/sendmail.nomx ${BINDIR}/sendmail.nomx.OLD + install -c -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \ + sendmail.nomx ${BINDIR} + rm -f ${BINDIR}/sendmail; ln -s ${BINDIR}/sendmail.mx ${BINDIR}/sendmail + for i in ${LINKS}; do (rm -f $$i; ln -s ${BINDIR}/sendmail $$i); done + install -c -o ${BINOWN} -g ${BINGRP} -m 644 /dev/null \ + ${STDIR}/sendmail.st + mv -f ${HFDIR}/sendmail.hf ${HFDIR}/sendmail.hf.OLD + install -c -o ${BINOWN} -g ${BINGRP} -m 444 sendmail.hf ${HFDIR} + + # doesn't actually install them -- you may want to install pre-nroff versions + install-docs: aliases.0 mailq.0 newaliases.0 sendmail.0 + + clean: + if [ -d ${OS} ]; then \ + (cd ${OS}; ${MAKE} clean); \ + else \ + rm -f ${OBJS} ${MXOBJS} ${NOMXOBJS} Version.o Version-mx.o \ + sendmail.mx sendmail.nomx \ + aliases.0 mailq.0 newaliases.0 sendmail.0 core; \ + fi + + # dependencies + # gross overkill, and yet still not quite enough.... + ${OBJS}: sendmail.h conf.h + ${MXOBJS}: sendmail.h conf.h + ${NOMXOBJS}: sendmail.h conf.h diff -c ../src.org/Makefile.WIDE.Solaris ./Makefile.WIDE.Solaris *** ../src.org/Makefile.WIDE.Solaris Thu Mar 30 11:52:12 1995 --- ./Makefile.WIDE.Solaris Thu Mar 30 11:47:42 1995 *************** *** 0 **** --- 1,217 ---- + # + # This Makefile is designed to work on the old "make" program. It does + # not use the obj subdirectory. It also does not install documentation + # automatically -- think of it as a quick start for sites that have the + # old make program (I recommend that you get and port the new make if you + # are going to be doing any signficant work on sendmail). + # + # @(#)Makefile.WIDE.Solaris 2.6 (motonori/WIDE) 3/11/95 + # @(#)Makefile.dist 8.1 (Berkeley) 6/7/93 + # + # Makefile for SunOS 5.3 + # This has been tested on SunOS 5.3 + + # name of this Makefile + MAKEFILE=Makefile.WIDE.Solaris + MAKE= make + + # object directory for this architecture + OS= `/usr/kvm/arch`-`uname -r` + + # name of C Compiler + #CC= gcc + + # use O=-O (usual) or O=-g (debugging) + # warning: do not use -O with gcc + O= -O + + # define the database mechanisms available for map & alias lookups: + # -DNDBM -- use new DBM + # -DNEWDB -- use new Berkeley DB + # -DNIS -- include client NIS support + # The really old (V7) DBM library is no longer supported. + # See READ_ME for a description of how these flags interact. + # + DBMDEF= -DNDBM # -DNEWDB # -DNIS + + # see also conf.h for additional compilation flags + + # environment definitions (e.g., -D_AIX3) + # need to add -DSUNOS403 if you are on a SunOS 4.0.3 system + # (SUNOS403 will be defined in pseudo stddef.h) + # need to add -DSOLARIS if you are on a SunOS 5.x system + #ENVDEF= -DSOLARIS + ENVDEF= -DSOLARIS_2_3 + + # directory for BIND + BINDDIR=../../../bind + # directory for new Berkeley DB + # If you are using JLE, you must modify correspondence of directory name + NEWDBDIR=../../../db/PORT/sunos.`uname -r` + + # include directories + BINDINCDIRS= -I${BINDDIR}/include -I${BINDDIR}/compat/include + NEWDBINCDIRS= -I${NEWDBDIR}/include -I${NEWDBDIR} + INCDIRS= ${BINDINCDIRS} ${NEWDBINCDIRS} + + # loader options + LDOPTS= # -Bstatic + + # library directories + BINDLIBDIRS= -L${BINDDIR}/res # -L${BINDDIR}/compat/lib + NEWDBLIBDIRS= -L${NEWDBDIR} + LIBDIRS= ${BINDLIBDIRS} ${NEWDBLIBDIRS} + + # libraries required on your system + # -l44bsd is needed with bind4.9 in RESLIB + LIBS= -lsocket -lnsl -lelf # -ldb + RESLIB= -lresolv # -l44bsd + + # location of sendmail binary (usually /usr/sbin or /usr/lib) + BINDIR= ${DESTDIR}/usr/lib + + # location of sendmail.st file (usually /var/log or /usr/lib) + STDIR= ${DESTDIR}/etc/mail + + # location of sendmail.hf file (usually /usr/share/misc or /usr/lib) + HFDIR= ${DESTDIR}/etc/mail + + # additional .c files needed + SRCADD= + # additional .o files needed + OBJADD= + + ################### end of user configuration flags ###################### + + CFLAGS= -I. $O ${INCDIRS} ${DBMDEF} ${ENVDEF} + + SRCS= alias.c arpadate.c clock.c collect.c conf.c convtime.c daemon.c \ + deliver.c domain.c envelope.c err.c headers.c macro.c main.c \ + map.c mci.c parseaddr.c queue.c readcf.c recipient.c \ + savemail.c srvrsmtp.c stab.c stats.c sysexits.c \ + trace.c udb.c usersmtp.c util.c ${SRCADD} # strcasecmp.c + OBJS= alias.o arpadate.o clock.o collect.o conf.o convtime.o envelope.o \ + headers.o macro.o map.o mci.o parseaddr.o queue.o recipient.o \ + srvrsmtp.o stab.o stats.o sysexits.o trace.o usersmtp.o util.o ${OBJADD} + MXOBJS= daemon-mx.o deliver-mx.o domain-mx.o err-mx.o main-mx.o readcf-mx.o \ + savemail-mx.o udb-mx.o res_send-mx.o + NOMXOBJS= daemon.o deliver.o domain.o err.o main.o readcf.o \ + savemail.o udb.o # strcasecmp.o + + LINKS= ${DESTDIR}/usr/ucb/newaliases ${DESTDIR}/usr/ucb/mailq + BINOWN= root + BINGRP= sys + BINMODE=6555 + + ALL= sendmail + + all: + if [ -f ${MAKEFILE} ]; then \ + ${MAKE} -f ${MAKEFILE} mkdir; \ + (cd ${OS}; ${MAKE} ${ALL}); \ + else \ + ${MAKE} ${ALL}; \ + fi + + mkdir: + @test -x newvers.sh || chmod +x newvers.sh + @if [ ! -d ${OS} ]; then \ + echo Creating directory ${OS}....; \ + (mkdir ${OS}; cd ${OS}; \ + ln -s ../*.[ch] ../newvers.sh .; \ + ln -s ../sendmail.restart ../sendmail.hf .; \ + ln -s ../aliases.5 ../mailq.1 ../newaliases.1 ../sendmail.8 .; \ + if [ ! -f /usr/include/sysexits.h -a -f /usr/ucbinclude/sysexits.h ]; then \ + cp /usr/ucbinclude/sysexits.h .; \ + fi; \ + ln -s ../${MAKEFILE} Makefile); \ + else true; fi + + sendmail: sendmail.mx sendmail.nomx + + sendmail.nomx: ${OBJS} ${NOMXOBJS} Version.o + ${CC} -o $@ ${OBJS} ${NOMXOBJS} Version.o ${LDOPTS} ${LIBDIRS} ${LIBS} + /usr/ccs/bin/size $@; ls -l $@; what < Version.o + + sendmail.mx: ${OBJS} ${MXOBJS} Version-mx.o + ${CC} -o $@ ${OBJS} ${MXOBJS} Version-mx.o ${LDOPTS} ${LIBDIRS} ${RESLIB} ${LIBS} + /usr/ccs/bin/size $@; ls -l $@; what < Version-mx.o + + Version.c: ${SRCS} version.c + @echo generating Version.c from version.c + sh newvers.sh + + # Here are MX depend sources. + daemon-mx.o: daemon.c + deliver-mx.o: deliver.c + domain-mx.o: domain.c + err-mx.o: err.c + main-mx.o: main.c + readcf-mx.o: readcf.c + savemail-mx.o: savemail.c + udb-mx.o: udb.c + Version-mx.o: Version.c + res_send-mx.o: res_send.c + + ${MXOBJS} Version-mx.o: + ${CC} ${CFLAGS} -DNAMED_BIND=1 -c `expr $@ : '\(.*\)-mx.o'`.c -o $@ + + NROFF= nroff -h + + aliases.0: aliases.5 + ${NROFF} -mandoc aliases.5 > aliases.0 + + mailq.0: mailq.1 + ${NROFF} -mandoc mailq.1 > mailq.0 + + newaliases.0: newaliases.1 + ${NROFF} -mandoc newaliases.1 > newaliases.0 + + sendmail.0: sendmail.8 + ${NROFF} -mandoc sendmail.8 > sendmail.0 + + restart: + test -x sendmail.restart || chmod +x sendmail.restart + sh sendmail.restart + + INSTALL=install-sendmail # install-docs + + install: + if [ -d ${OS} ]; then \ + (cd ${OS}; ${MAKE} ${INSTALL}); \ + else \ + ${MAKE} ${INSTALL}; \ + fi + + install-sendmail: sendmail + -mv -f ${BINDIR}/sendmail.mx ${BINDIR}/sendmail.mx.OLD + /usr/ucb/install -c -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \ + sendmail.mx ${BINDIR} + -mv -f ${BINDIR}/sendmail.nomx ${BINDIR}/sendmail.nomx.OLD + /usr/ucb/install -c -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \ + sendmail.nomx ${BINDIR} + rm -f ${BINDIR}/sendmail; ln -s ${BINDIR}/sendmail.mx ${BINDIR}/sendmail + for i in ${LINKS}; do (rm -f $$i; ln -s ${BINDIR}/sendmail $$i); done + /usr/ucb/install -c -o ${BINOWN} -g ${BINGRP} -m 644 /dev/null \ + ${STDIR}/sendmail.st + -mv -f ${HFDIR}/sendmail.hf ${HFDIR}/sendmail.hf.OLD + /usr/ucb/install -c -o ${BINOWN} -g ${BINGRP} -m 444 sendmail.hf \ + ${HFDIR} + + # doesn't actually install them -- you may want to install pre-nroff versions + install-docs: aliases.0 mailq.0 newaliases.0 sendmail.0 + + clean: + if [ -d ${OS} ]; then \ + (cd ${OS}; ${MAKE} clean); \ + else \ + rm -f ${OBJS} ${MXOBJS} ${NOMXOBJS} Version.o Version-mx.o \ + sendmail.mx sendmail.nomx \ + aliases.0 mailq.0 newaliases.0 sendmail.0 core; \ + fi + + # dependencies + # gross overkill, and yet still not quite enough.... + ${OBJS}: sendmail.h conf.h + ${MXOBJS}: sendmail.h conf.h + ${NOMXOBJS}: sendmail.h conf.h diff -c ../src.org/Makefile.WIDE.Sun ./Makefile.WIDE.Sun *** ../src.org/Makefile.WIDE.Sun Thu Mar 30 11:52:12 1995 --- ./Makefile.WIDE.Sun Thu Mar 30 11:47:43 1995 *************** *** 0 **** --- 1,211 ---- + # + # This Makefile is designed to work on the old "make" program. It does + # not use the obj subdirectory. It also does not install documentation + # automatically -- think of it as a quick start for sites that have the + # old make program (I recommend that you get and port the new make if you + # are going to be doing any signficant work on sendmail). + # + # @(#)Makefile.WIDE.Sun 2.18 (motonori/WIDE) 4/20/94 + # @(#)Makefile.dist 8.1 (Berkeley) 6/7/93 + # + # Makefile for SunOS 4.1.X and 4.0.3 + # This has been tested on SunOS 4.1.1 and 4.0.3. + + # name of this Makefile + MAKEFILE=Makefile.WIDE.Sun + MAKE= make + + # object directory for this architecture + OS= `arch`-`uname -r` + + # use O=-O (usual) or O=-g (debugging) + O= -O + + # define the database mechanisms available for map & alias lookups: + # -DNDBM -- use new DBM + # -DNEWDB -- use new Berkeley DB + # -DNIS -- include client NIS support + # The really old (V7) DBM library is no longer supported. + # See READ_ME for a description of how these flags interact. + # + DBMDEF= -DNDBM # -DNEWDB -DNIS + + # see also conf.h for additional compilation flags + + # environment definitions (e.g., -D_AIX3) + # need to add -DSUNOS403 if you are on a SunOS 4.0.3 system + # (SUNOS403 will be defined in pseudo stddef.h) + ENVDEF= + + # directory for BIND + BINDDIR=../../../bind + # directory for new Berkeley DB + # If you are using JLE, you must modify correspondence of directory name + NEWDBDIR=../../../db/PORT/sunos.`uname -r` + + # include directories + BINDINCDIRS= -I${BINDDIR}/include -I${BINDDIR}/compat/include + NEWDBINCDIRS= -I${NEWDBDIR}/include -I${NEWDBDIR} + INCDIRS= ${BINDINCDIRS} ${NEWDBINCDIRS} + + # loader options + LDOPTS= -Bstatic + + # library directories + BINDLIBDIRS= -L${BINDDIR}/res # -L${BINDDIR}/compat/lib + NEWDBLIBDIRS= -L${NEWDBDIR} + LIBDIRS= ${BINDLIBDIRS} ${NEWDBLIBDIRS} + + # libraries required on your system + # -l44bsd is needed with bind4.9 in RESLIB + LIBS= -ldbm # -ldb + RESLIB= -lresolv # -l44bsd + + # location of sendmail binary (usually /usr/sbin or /usr/lib) + BINDIR= ${DESTDIR}/usr/lib + + # location of sendmail.st file (usually /var/log or /usr/lib) + STDIR= ${DESTDIR}/etc + + # location of sendmail.hf file (usually /usr/share/misc or /usr/lib) + HFDIR= ${DESTDIR}/usr/lib + + # additional .c files needed + SRCADD= + # additional .o files needed + OBJADD= + + ################### end of user configuration flags ###################### + + CFLAGS= -I. $O ${INCDIRS} ${DBMDEF} ${ENVDEF} + + SRCS= alias.c arpadate.c clock.c collect.c conf.c convtime.c daemon.c \ + deliver.c domain.c envelope.c err.c headers.c macro.c main.c \ + map.c mci.c parseaddr.c queue.c readcf.c recipient.c \ + savemail.c srvrsmtp.c stab.c stats.c sysexits.c \ + trace.c udb.c usersmtp.c util.c ${SRCADD} # strcasecmp.c + OBJS= alias.o arpadate.o clock.o collect.o conf.o convtime.o envelope.o \ + headers.o macro.o map.o mci.o parseaddr.o queue.o recipient.o \ + srvrsmtp.o stab.o stats.o sysexits.o trace.o usersmtp.o util.o ${OBJADD} + MXOBJS= daemon-mx.o deliver-mx.o domain-mx.o err-mx.o main-mx.o readcf-mx.o \ + savemail-mx.o udb-mx.o + NOMXOBJS= daemon.o deliver.o domain.o err.o main.o readcf.o \ + savemail.o udb.o # strcasecmp.o + + LINKS= ${DESTDIR}/usr/ucb/newaliases ${DESTDIR}/usr/ucb/mailq + BINOWN= root + BINGRP= kmem + BINMODE=6555 + + ALL= sendmail + + all: + if [ -f ${MAKEFILE} ]; then \ + ${MAKE} -f ${MAKEFILE} mkdir; \ + (cd ${OS}; ${MAKE} ${ALL}); \ + else \ + ${MAKE} ${ALL}; \ + fi + + mkdir: + @test -x newvers.sh || chmod +x newvers.sh + @if [ ! -d ${OS} ]; then \ + echo Creating directory ${OS}....; \ + (mkdir ${OS}; cd ${OS}; \ + ln -s ../*.[ch] ../newvers.sh .; \ + ln -s ../sendmail.restart ../sendmail.hf .; \ + ln -s ../aliases.5 ../mailq.1 ../newaliases.1 ../sendmail.8 .; \ + if [ `uname -r` = "4.0" ]; then \ + echo Creating lacked headers....; \ + echo '#define SUNOS403' > stddef.h; \ + touch stdlib.h; \ + fi; \ + ln -s ../${MAKEFILE} Makefile); \ + else true; fi + + sendmail: sendmail.mx sendmail.nomx + + sendmail.nomx: ${OBJS} ${NOMXOBJS} Version.o + ${CC} -o $@ ${OBJS} ${NOMXOBJS} Version.o ${LDOPTS} ${LIBDIRS} ${LIBS} + size $@; ls -l $@; what < Version.o + + sendmail.mx: ${OBJS} ${MXOBJS} Version-mx.o + ${CC} -o $@ ${OBJS} ${MXOBJS} Version-mx.o ${LDOPTS} ${LIBDIRS} ${RESLIB} ${LIBS} + size $@; ls -l $@; what < Version-mx.o + + Version.c: ${SRCS} version.c + @echo generating Version.c from version.c + sh newvers.sh + + # Here are MX depend sources. + daemon-mx.o: daemon.c + deliver-mx.o: deliver.c + domain-mx.o: domain.c + err-mx.o: err.c + main-mx.o: main.c + readcf-mx.o: readcf.c + savemail-mx.o: savemail.c + udb-mx.o: udb.c + Version-mx.o: Version.c + + ${MXOBJS} Version-mx.o: + ${CC} ${CFLAGS} -DNAMED_BIND=1 -c `expr $@ : '\(.*\)-mx.o'`.c -o $@ + + NROFF= nroff + + aliases.0: aliases.5 + ${NROFF} -mandoc aliases.5 > aliases.0 + + mailq.0: mailq.1 + ${NROFF} -mandoc mailq.1 > mailq.0 + + newaliases.0: newaliases.1 + ${NROFF} -mandoc newaliases.1 > newaliases.0 + + sendmail.0: sendmail.8 + ${NROFF} -mandoc sendmail.8 > sendmail.0 + + restart: + test -x sendmail.restart || chmod +x sendmail.restart + sh sendmail.restart + + INSTALL=install-sendmail # install-docs + + install: + if [ -d ${OS} ]; then \ + (cd ${OS}; ${MAKE} ${INSTALL}); \ + else \ + ${MAKE} ${INSTALL}; \ + fi + + install-sendmail: sendmail + mv -f ${BINDIR}/sendmail.mx ${BINDIR}/sendmail.mx.OLD + install -c -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \ + sendmail.mx ${BINDIR} + mv -f ${BINDIR}/sendmail.nomx ${BINDIR}/sendmail.nomx.OLD + install -c -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \ + sendmail.nomx ${BINDIR} + rm -f ${BINDIR}/sendmail; ln -s ${BINDIR}/sendmail.mx ${BINDIR}/sendmail + for i in ${LINKS}; do (rm -f $$i; ln -s ${BINDIR}/sendmail $$i); done + install -c -o ${BINOWN} -g ${BINGRP} -m 644 /dev/null \ + ${STDIR}/sendmail.st + mv -f ${HFDIR}/sendmail.hf ${HFDIR}/sendmail.hf.OLD + install -c -o ${BINOWN} -g ${BINGRP} -m 444 sendmail.hf ${HFDIR} + + # doesn't actually install them -- you may want to install pre-nroff versions + install-docs: aliases.0 mailq.0 newaliases.0 sendmail.0 + + clean: + if [ -d ${OS} ]; then \ + (cd ${OS}; ${MAKE} clean); \ + else \ + rm -f ${OBJS} ${MXOBJS} ${NOMXOBJS} Version.o Version-mx.o \ + sendmail.mx sendmail.nomx \ + aliases.0 mailq.0 newaliases.0 sendmail.0 core; \ + fi + + # dependencies + # gross overkill, and yet still not quite enough.... + ${OBJS}: sendmail.h conf.h + ${MXOBJS}: sendmail.h conf.h + ${NOMXOBJS}: sendmail.h conf.h