This commit was generated by cvs2svn to compensate for changes in r19146,
which included commits to RCS files with non-trunk default branches.
This commit is contained in:
commit
3b50ea913d
|
@ -1,731 +1,9 @@
|
|||
Newsgroups: comp.mail.sendmail,comp.mail.misc,comp.mail.smail,comp.answers,news.answers
|
||||
Subject: comp.mail.sendmail Frequently Asked Questions (FAQ)
|
||||
From: brad@birch.ims.disa.mil (Brad Knowles)
|
||||
Followup-to: comp.mail.sendmail
|
||||
Summary: This posting contains a list of Frequently Asked Questions
|
||||
(and their answers) about the program "sendmail", distributed
|
||||
with many versions of Unix (and available for some other
|
||||
operating systems). This FAQ is shared between
|
||||
comp.mail.sendmail and the Sendmail V8 distribution. It should
|
||||
be read by anyone who wishes to post to comp.mail.sendmail, or
|
||||
anyone having questions about the newsgroup itself.
|
||||
|
||||
Archive-name: mail/sendmail-faq
|
||||
Posting-Frequency: monthly (first Monday)
|
||||
|
||||
|
||||
[The most recent copy of this document can be obtained via anonymous
|
||||
FTP from rtfm.mit.edu in /pub/usenet/news.answers/mail/sendmail-faq.
|
||||
The FAQ is no longer maintained with the sendmail release. It is
|
||||
posted regularly to comp.mail.sendmail, comp.mail.misc, comp.mail.smail,
|
||||
comp.answers, and news.answers, and can be obtained via anonymous FTP
|
||||
from ftp://rtfm.mit.edu/pub/usenet/news.answers/mail/sendmail-faq.
|
||||
If you do not have access to anonymous FTP, you can retrieve it by
|
||||
sending email to mail-server@rtfm.mit.edu with the command "send
|
||||
usenet/news.answers/mail/sendmail-faq" in the message.]
|
||||
usenet/news.answers/mail/sendmail-faq" in the message.
|
||||
|
||||
|
||||
|
||||
Sendmail Version 8
|
||||
Frequently Asked Questions
|
||||
Last updated 9/17/95
|
||||
|
||||
|
||||
This FAQ is specific to Version 8.6.10 of sendmail. Other questions,
|
||||
particularly regarding compilation and configuration, are answered in
|
||||
src/READ_ME and cf/README (found in the V8 sendmail distribution).
|
||||
|
||||
This is also the official FAQ for the Usenet newsgroup
|
||||
comp.mail.sendmail.
|
||||
|
||||
======================================================================
|
||||
BEFORE YOU GO ANY FURTHER
|
||||
======================================================================
|
||||
|
||||
* What do you wish everyone would do before sending you mail or
|
||||
posting to comp.mail.sendmail?
|
||||
|
||||
Read this FAQ completely. Read src/READ_ME and cf/README
|
||||
completely. Read the books written to help with common
|
||||
problems such as compilation and installation, configuration,
|
||||
security issues, etc.... Ask themselves if their question
|
||||
hasn't already been answered.
|
||||
----------------------------------------------------------------------
|
||||
* How can I be sure if this is the right place to look for answers
|
||||
to my questions?
|
||||
|
||||
1. Do you know, for a fact, that the question is related to
|
||||
sendmail V8?
|
||||
|
||||
2. Do you know, for a fact, that the question is related to an
|
||||
older version of sendmail?
|
||||
|
||||
3. Is the question about a sendmail-like program (e.g., Smail,
|
||||
Zmailer, MMDF, etc...)?
|
||||
|
||||
4. Is the question about an SMTP Gateway product for a LAN
|
||||
mail package (e.g., cc:Mail, MS-Mail, WordPerfect
|
||||
Office/GroupWise, etc...)?
|
||||
|
||||
If you answered "yes" to the question #1, then this is the
|
||||
right place.
|
||||
|
||||
If you answered "yes" to questions #2 or #3, then you should
|
||||
seriously consider upgrading to the most recent version of
|
||||
sendmail V8.
|
||||
|
||||
For question #2, If you're going to continue using an older
|
||||
version of sendmail, you may not find much help and will
|
||||
probably get some responses that amount to "Get V8".
|
||||
Otherwise, this is probably the best place to look for
|
||||
answers.
|
||||
|
||||
If you answered "yes" to question #3 and are not going to
|
||||
upgrade to sendmail V8, then this is probably not the right
|
||||
place to look.
|
||||
|
||||
If you answered "yes" to question #4, then this is almost
|
||||
certainly not the right place to look.
|
||||
|
||||
For questions #3 and #4, try looking around elsewhere in the
|
||||
"comp.mail.*" hierarchy for a more appropriate newsgroup.
|
||||
For example, you might want to try posting to comp.mail.misc
|
||||
or comp.mail.smail.
|
||||
|
||||
If you couldn't answer "yes" to any of the above questions,
|
||||
then you're DEFINITELY in the wrong place. For the sake of
|
||||
your sanity and ego, not to mention avoiding the waste of
|
||||
your time and ours, try asking your System or E-Mail
|
||||
Administrator(s) before you post any questions publicly.
|
||||
----------------------------------------------------------------------
|
||||
* Where can I find the latest version of this FAQ?
|
||||
|
||||
It is included in the most recent Version 8 distribution of
|
||||
sendmail (described below), as well as via anonymous FTP from
|
||||
rtfm.mit.edu in /pub/usenet/news.answers/mail/sendmail-faq.
|
||||
If you do not have access to anonymous FTP, you can retrieve
|
||||
it by sending email to mail-server@rtfm.mit.edu with the
|
||||
command "send usenet/news.answers/mail/sendmail-faq" in the
|
||||
message.
|
||||
----------------------------------------------------------------------
|
||||
* I don't have access to Usenet news. Can I still get access to
|
||||
comp.mail.sendmail?
|
||||
|
||||
Yes. Send email to mxt@dl.ac.uk with the command "sub
|
||||
comp-news.comp.mail.sendmail <full-US-ordered-email-address>"
|
||||
in the message.
|
||||
|
||||
E-mail you want posted on comp.mail.sendmail should be sent
|
||||
to comp-mail-sendmail@dl.ac.uk
|
||||
----------------------------------------------------------------------
|
||||
* I have sendmail-related DNS questions. Where should I ask them?
|
||||
|
||||
Depending on how deeply they get into the DNS, they can be
|
||||
asked here. However, you'll probably be told that you should
|
||||
send them to the Info-BIND mailing list (if the question is
|
||||
specific to that program) or to the Usenet newsgroup
|
||||
comp.protocols.tcp-ip.domains (DNS in general).
|
||||
----------------------------------------------------------------------
|
||||
* How do I subscribe to either of these?
|
||||
|
||||
For comp.protocols.tcp-ip.domains, you have to be on Usenet.
|
||||
They don't have a news-to-mail gateway yet.
|
||||
|
||||
For the Info-BIND mailing list, send email to
|
||||
bind-request@uunet.uu.net with the command "subscribe" in the
|
||||
message. Submissions should be sent to bind@uunet.uu.net
|
||||
|
||||
======================================================================
|
||||
GENERAL QUESTIONS
|
||||
======================================================================
|
||||
|
||||
* Where can I get Version 8?
|
||||
|
||||
Via anonymous FTP from FTP.CS.Berkeley.EDU in /ucb/sendmail.
|
||||
----------------------------------------------------------------------
|
||||
* What are the differences between Version 8 and other versions?
|
||||
|
||||
See doc/changes/changes.me in the sendmail distribution.
|
||||
----------------------------------------------------------------------
|
||||
* What happened to sendmail 6.x and 7.x?
|
||||
|
||||
When a new (Alpha/Beta) version of sendmail was released, it
|
||||
was changed to Release 6. Development continued in that tree
|
||||
until 4.4BSD was released, when everything on the 4.4 tape
|
||||
was set to be version 8.1. Version 7.x never existed.
|
||||
----------------------------------------------------------------------
|
||||
* What books are available describing sendmail?
|
||||
|
||||
There is one book available devoted to sendmail:
|
||||
|
||||
Costales, Allman, and Rickert, _Sendmail_. O'Reilly &
|
||||
Associates.
|
||||
|
||||
Several books have sendmail chapters, for example:
|
||||
|
||||
Nemeth, Snyder, and Seebass, _Unix System Administration
|
||||
Handbook_. Prentice-Hall.
|
||||
Carl-Mitchell and Quarterman, _Practical Internetworking with
|
||||
TCP/IP and UNIX_. Addison-Wesley.
|
||||
Hunt, _TCP/IP Network Administration_. O'Reilly & Associates.
|
||||
|
||||
Another book about sendmail is due out "soon":
|
||||
|
||||
Avolio & Vixie, _Sendmail Theory and Practice_. Digital
|
||||
Press (release date unknown).
|
||||
|
||||
For details on sendmail-related DNS issues, consult:
|
||||
|
||||
Liu and Albitz, _DNS and BIND_. O'Reilly & Associates.
|
||||
|
||||
For details on UUCP, see:
|
||||
|
||||
O'Reilly and Todino, _Managing UUCP and Usenet_.
|
||||
O'Reilly & Associates.
|
||||
|
||||
======================================================================
|
||||
COMPILING AND INSTALLING SENDMAIL 8
|
||||
======================================================================
|
||||
|
||||
* Version 8 requires a new version of "make". Where can I get this?
|
||||
|
||||
Actually, Version 8 does not require a new version of "make".
|
||||
It includes a collection of Makefiles for different architectures,
|
||||
only one or two of which require the new "make". For a supported
|
||||
architecture, use ``sh makesendmail''. If you are porting to a
|
||||
new architecture, start with Makefile.dist.
|
||||
|
||||
If you really do want the new make, it is available on any of
|
||||
the BSD Net2 or 4.4-Lite distribution sites. These include:
|
||||
|
||||
ftp.uu.net /systems/unix/bsd-sources
|
||||
gatekeeper.dec.com /.0/BSD/net2
|
||||
ucquais.cba.uc.edu /pub/net2
|
||||
ftp.luth.se /pub/unix/4.3bsd/net2
|
||||
|
||||
Diffs and instructions for building this version of make
|
||||
under SunOS 4.1.x are available on ftp.css.itd.umich.edu in
|
||||
/pub/systems/sun/Net2-make.sun4.diff.Z. A patchkit for
|
||||
Ultrix is on ftp.vix.com in /pub/patches/pmake-for-ultrix.Z.
|
||||
Patches for AIX 3.2.4 are available on ftp.uni-stuttgart.de
|
||||
in /sw/src/patches/bsd-make-rus-patches.
|
||||
|
||||
There is also a Linux version available on the main Linux
|
||||
distribution sites as pmake; this version is included as
|
||||
standard with the current Slackware distributions.
|
||||
----------------------------------------------------------------------
|
||||
* What macro package do I use to format the V8 man pages?
|
||||
|
||||
The BSD group switched over the the ``mandoc'' macros for the
|
||||
4.4 release. These include more hooks designed for hypertext
|
||||
handling. However, new man pages won't format under the old
|
||||
man macros. Fortunately, old man pages will format under the
|
||||
new mandoc macros.
|
||||
|
||||
Get the new macros with the BSD Net2 or 4.4-Lite release (see
|
||||
above for locations; for example, on FTP.UU.NET the files
|
||||
/system/unix/bsd-sources/share/tmac/me/strip/sed and
|
||||
/system/unix/bsd-sources/share/tmac/* are what you need).
|
||||
|
||||
This macro set is also included with newer versions of groff.
|
||||
----------------------------------------------------------------------
|
||||
* What modes should be used when installing sendmail?
|
||||
|
||||
The sendmail binary should be owned by root, mode 4755.
|
||||
The queue directory should be owned by root, with a mode
|
||||
between 700 and 755. Under no circumstances should
|
||||
it be group or other writable!
|
||||
The sendmail config file should be owned by root, mode 644.
|
||||
The aliases file should generally be owned by one trusted
|
||||
user and writable only by that user, although it is
|
||||
not unreasonable to have it group writable by a
|
||||
"sysadmin" group. It should not be world writable.
|
||||
The aliases database files (aliases.db or aliases.{pag,dir}
|
||||
depending on what database format you compile with)
|
||||
should be owned by root, mode 644.
|
||||
|
||||
======================================================================
|
||||
CONFIGURATION QUESTIONS
|
||||
======================================================================
|
||||
|
||||
* How do I make all my addresses appear to be from a single host?
|
||||
|
||||
Using the V8 configuration macros, use:
|
||||
|
||||
MASQUERADE_AS(my.dom.ain)
|
||||
|
||||
This will cause all addresses to be sent out as being from
|
||||
the indicated domain.
|
||||
----------------------------------------------------------------------
|
||||
* How do I rewrite my From: lines to read ``First_Last@My.Domain''?
|
||||
|
||||
There are a couple of ways of doing this. This describes
|
||||
using the "user database" code. This is still experimental,
|
||||
and was intended for a different purpose -- however, it does
|
||||
work with a bit of care. It does require that you have the
|
||||
Berkeley "db" package installed (it won't work with DBM).
|
||||
|
||||
First, create your input file. This should have lines like:
|
||||
|
||||
loginname:mailname First_Last
|
||||
First_Last:maildrop loginname
|
||||
|
||||
Install it in (say) /etc/userdb. Create the database:
|
||||
|
||||
makemap btree /etc/userdb.db < /etc/userdb
|
||||
|
||||
You can then create a config file that uses this. You will
|
||||
have to include the following in your .mc file:
|
||||
|
||||
define(confUSERDB_SPEC, /etc/userdb.db)
|
||||
FEATURE(notsticky)
|
||||
----------------------------------------------------------------------
|
||||
* So what was the user database feature intended for?
|
||||
|
||||
The intent was to have all information for a given user
|
||||
(where the user is the unique login name, not an inherently
|
||||
non-unique full name) in one place. This would include phone
|
||||
numbers, addresses, and so forth. The "maildrop" feature is
|
||||
because Berkeley does not use a centralized mail server
|
||||
(there are a number of reasons for this that are mostly
|
||||
historic), and so we need to know where each user gets his or
|
||||
her mail delivered -- i.e., the mail drop.
|
||||
|
||||
We are in the process of setting up our environment so that
|
||||
mail sent to an unqualified "name" goes to that person's
|
||||
preferred maildrop; mail sent to "name@host" goes to that
|
||||
host. The purpose of "FEATURE(notsticky)" is to cause
|
||||
"name@host" to be looked up in the user database for delivery
|
||||
to the maildrop.
|
||||
----------------------------------------------------------------------
|
||||
* Why are you so hostile to using full names for e-mail addresses?
|
||||
|
||||
Because full names are not unique. For example, the computer
|
||||
community has two Andy Tannenbaums and two Peter Deutsches.
|
||||
At one time, Bell Labs had two Stephen R. Bournes with
|
||||
offices a few doors apart. You can create alternative
|
||||
addresses (e.g., Stephen_R_Bourne_2), but that's even worse
|
||||
-- which one of them has to have their name desecrated in
|
||||
this way? And you can bet that one of them will get most of
|
||||
the other person's e-mail.
|
||||
|
||||
So called "full names" are just an attempt to create longer
|
||||
versions of unique names. Rather that lulling people into a
|
||||
sense of security, I'd rather that it be clear that these
|
||||
handles are arbitrary. People should use good user agents
|
||||
that have alias mappings so that they can attach arbitrary
|
||||
names for their personal use to those with whom they
|
||||
correspond (such as the MH alias file).
|
||||
|
||||
Even worse is fuzzy matching in e-mail -- this can make good
|
||||
addresses turn bad. For example, Eric Allman is currently
|
||||
(to the best of our knowledge) the only ``Allman'' at
|
||||
Berkeley, so mail sent to "Allman@Berkeley.EDU" should get to
|
||||
him. But if another Allman ever appears, this address could
|
||||
suddenly become ambiguous. He's been the only Allman at
|
||||
Berkeley for over fifteen years -- to suddenly have this
|
||||
"good address" bounce mail because it is ambiguous would be a
|
||||
heinous wrong.
|
||||
|
||||
Finger services should be as fuzzy as possible (within
|
||||
reason, of course). Mail services should be unique.
|
||||
----------------------------------------------------------------------
|
||||
* Should I use a wildcard MX for my domain?
|
||||
|
||||
If at all possible, no.
|
||||
|
||||
Wildcard MX records have lots of semantic "gotcha"s. For
|
||||
example, they will match a host "unknown.your.domain" -- if
|
||||
you don't explicitly test for unknown hosts in your domain,
|
||||
you will get "config error: mail loops back to myself"
|
||||
errors.
|
||||
|
||||
See RFCs 1535-1537 for more detail and other related (or
|
||||
common) problems.
|
||||
----------------------------------------------------------------------
|
||||
* How can I get sendmail to process messages sent to an account and
|
||||
send the results back to the originator?
|
||||
|
||||
This is a local mailer issue, not a sendmail issue.
|
||||
Depending on what you're doing, look at procmail (mentioned
|
||||
again below), ftpmail, or Majordomo.
|
||||
|
||||
Check your local archie server to see what machine(s) nearest
|
||||
you have the most recent versions of these programs.
|
||||
----------------------------------------------------------------------
|
||||
* How can I get sendmail to deliver local mail to $HOME/.mail
|
||||
instead of into /usr/spool/mail (or /usr/mail)?
|
||||
|
||||
Again, this is a local mailer issue, not a sendmail issue.
|
||||
Either modify your local mailer (source code will be
|
||||
required) or change the program called in the "local" mailer
|
||||
configuration description to be a new program that does this
|
||||
local delivery. One program that is capable of doing this is
|
||||
"procmail", although there are probably many others as well.
|
||||
|
||||
You might be interested in reading the paper ``HLFSD:
|
||||
Delivering Email to your $HOME'' available in the Proceedings
|
||||
of the USENIX System Administration (LISA VII) Conference
|
||||
(November 1993). This is also available via public FTP from
|
||||
ftp.cs.columbia.edu in /pub/hlfsd/{README.hlfsd,hlfsd.ps}.
|
||||
----------------------------------------------------------------------
|
||||
* I'm trying to to get my mail to go into queue only mode, and it
|
||||
delivers the mail interactively anyway. (Or, I'm trying to use
|
||||
the "don't deliver to expensive mailer" flag, and it delivers the
|
||||
mail interactively anyway.) I can see it does it: here's the
|
||||
output of "sendmail -v foo@somehost" (or Mail -v or equivalent).
|
||||
|
||||
The -v flag to sendmail (which is implied by the -v flag to
|
||||
Mail and other programs in that family) tells sendmail to
|
||||
watch the transaction. Since you have explicitly asked to
|
||||
see what's going on, it assumes that you do not want to to
|
||||
auto-queue, and turns that feature off. Remove the -v flag
|
||||
and use a "tail -f" of the log instead to see what's going
|
||||
on.
|
||||
|
||||
If you are trying to use the "don't deliver to expensive
|
||||
mailer" flag (mailer flag "e"), be sure you also turn on
|
||||
global option "c" -- otherwise it ignores the mailer flag.
|
||||
----------------------------------------------------------------------
|
||||
* There are four UUCP mailers listed in the configuration files.
|
||||
Which one should I use?
|
||||
|
||||
The choice is partly a matter of local preferences and what
|
||||
is running at the other end of your UUCP connection. Unlike
|
||||
good protocols that define what will go over the wire, UUCP
|
||||
uses the policy that you should do what is right for the
|
||||
other end; if they change, you have to change. This makes it
|
||||
hard to do the right thing, and discourages people from
|
||||
updating their software. In general, if you can avoid UUCP,
|
||||
please do.
|
||||
|
||||
If you can't avoid it, you'll have to find the version that
|
||||
is closest to what the other end accepts. Following is a
|
||||
summary of the UUCP mailers available.
|
||||
|
||||
uucp-old (obsolete name: "uucp")
|
||||
This is the oldest, the worst (but the closest to UUCP) way
|
||||
of sending messages across UUCP connections. It does
|
||||
bangify everything and prepends $U (your UUCP name) to the
|
||||
sender's address (which can already be a bang path
|
||||
itself). It can only send to one address at a time, so it
|
||||
spends a lot of time copying duplicates of messages. Avoid
|
||||
this if at all possible.
|
||||
|
||||
uucp-new (obsolete name: "suucp")
|
||||
The same as above, except that it assumes that in one rmail
|
||||
command you can specify several recipients. It still has a
|
||||
lot of other problems.
|
||||
|
||||
uucp-dom
|
||||
This UUCP mailer keeps everything as domain addresses.
|
||||
Basically, it uses the SMTP mailer rewriting rules.
|
||||
|
||||
Unfortunately, a lot of UUCP mailer transport agents
|
||||
require bangified addresses in the envelope, although you
|
||||
can use domain-based addresses in the message header. (The
|
||||
envelope shows up as the From_ line on UNIX mail.) So....
|
||||
|
||||
uucp-uudom
|
||||
This is a cross between uucp-new (for the envelope
|
||||
addresses) and uucp-dom (for the header addresses). It
|
||||
bangifies the envelope sender (From_ line in messages)
|
||||
without adding the local hostname, unless there is no host
|
||||
name on the address at all (e.g., "wolf") or the host
|
||||
component is a UUCP host name instead of a domain name
|
||||
("somehost!wolf" instead of "some.dom.ain!wolf").
|
||||
|
||||
Examples:
|
||||
|
||||
We are on host grasp.insa-lyon.fr (UUCP host name "grasp").
|
||||
The following summarizes the sender rewriting for various
|
||||
mailers.
|
||||
|
||||
Mailer sender rewriting in the envelope
|
||||
------ ------ -------------------------
|
||||
uucp-{old,new} wolf grasp!wolf
|
||||
uucp-dom wolf wolf@grasp.insa-lyon.fr
|
||||
uucp-uudom wolf grasp.insa-lyon.fr!wolf
|
||||
|
||||
uucp-{old,new} wolf@fr.net grasp!fr.net!wolf
|
||||
uucp-dom wolf@fr.net wolf@fr.net
|
||||
uucp-uudom wolf@fr.net fr.net!wolf
|
||||
|
||||
uucp-{old,new} somehost!wolf grasp!somehost!wolf
|
||||
uucp-dom somehost!wolf somehost!wolf@grasp.insa-lyon.fr
|
||||
uucp-uudom somehost!wolf grasp.insa-lyon.fr!somehost!wolf
|
||||
|
||||
======================================================================
|
||||
RESOLVING PROBLEMS
|
||||
======================================================================
|
||||
|
||||
* When I compile, I get "undefined symbol inet_aton" messages.
|
||||
|
||||
You've probably replaced your resolver with the version from
|
||||
BIND 4.9.3. You need to compile with -l44bsd in order to get
|
||||
the additional routines.
|
||||
----------------------------------------------------------------------
|
||||
* I'm getting "Local configuration error" messages, such as:
|
||||
|
||||
553 relay.domain.net config error: mail loops back to myself
|
||||
554 <user@domain.net>... Local configuration error
|
||||
|
||||
How can I solve this problem?
|
||||
|
||||
You have asked mail to the domain (e.g., domain.net) to be
|
||||
forwarded to a specific host (in this case, relay.domain.net)
|
||||
by using an MX record, but the relay machine doesn't
|
||||
recognize itself as domain.net. Add domain.net to
|
||||
/etc/sendmail.cw (if you are using FEATURE(use_cw_file)) or
|
||||
add "Cw domain.net" to your configuration file.
|
||||
|
||||
IMPORTANT: Be sure you kill and restart the sendmail daemon
|
||||
after you change the configuration file (for ANY change in
|
||||
the configuration, not just this one):
|
||||
|
||||
kill `head -1 /etc/sendmail.pid`
|
||||
sh -c "`tail -1 /etc/sendmail.pid`"
|
||||
|
||||
NOTA BENE: kill -1 does not work!
|
||||
----------------------------------------------------------------------
|
||||
* When I use sendmail V8 with a Sun config file I get lines like:
|
||||
|
||||
/etc/sendmail.cf: line 273: replacement $3 out of bounds
|
||||
|
||||
the line in question reads:
|
||||
|
||||
R$*<@$%y>$* $1<@$2.LOCAL>$3 user@ether
|
||||
|
||||
what does this mean? How do I fix it?
|
||||
|
||||
V8 doesn't recognize the Sun "$%y" syntax, so as far as it is
|
||||
concerned, there is only a $1 and a $2 (but no $3) in this
|
||||
line. Read Rick McCarty's paper on "Converting Standard Sun
|
||||
Config Files to Sendmail Version 8", in the contrib directory
|
||||
(file "converting.sun.configs") on the sendmail distribution
|
||||
for a full discussion of how to do this.
|
||||
----------------------------------------------------------------------
|
||||
* When I use sendmail V8 on a Sun, I sometimes get lines like:
|
||||
|
||||
/etc/sendmail.cf: line 445: bad ruleset 96 (50 max)
|
||||
|
||||
what does this mean? How do I fix it?
|
||||
|
||||
You're somehow trying to start up the old Sun sendmail (or
|
||||
sendmail.mx) with a sendmail V8 config file, which Sun's
|
||||
sendmail doesn't like. Check your /etc/rc.local, any
|
||||
procedures that have been created to stop and re-start the
|
||||
sendmail processes, etc.... Make sure that you've switched
|
||||
everything over to using the new sendmail. To keep this
|
||||
problem from ever happening again, try the following:
|
||||
|
||||
mv /usr/lib/sendmail /usr/lib/sendmail.old
|
||||
ln -s /usr/local/lib/sendmail.v8 /usr/lib/sendmail
|
||||
mv /usr/lib/sendmail.mx /usr/lib/sendmail.mx.old
|
||||
ln -s /usr/local/lib/sendmail.v8 /usr/lib/sendmail.mx
|
||||
chmod 0000 /usr/lib/sendmail.old
|
||||
chmod 0000 /usr/lib/sendmail.mx.old
|
||||
|
||||
Assuming you have installed sendmail V8 in /usr/local/lib.
|
||||
----------------------------------------------------------------------
|
||||
* When I use sendmail V8 on an IBM RS/6000 running AIX, the system
|
||||
resource controller always reports sendmail as "inoperative" even
|
||||
though it is running. What's wrong?
|
||||
|
||||
IBM's system resource controller is one of their "value
|
||||
added" features to AIX -- it's not a Unix standard. You'll
|
||||
need to either redefine the subsystem to use signals (see
|
||||
chssys(1)) or dump the entire subsystem and invoke sendmail
|
||||
in /etc/rc.tcpip or some other boot script.
|
||||
----------------------------------------------------------------------
|
||||
* When I use sendmail V8 on an Intel x86 machine running Linux, I
|
||||
have some problems. Specifically, I have....
|
||||
|
||||
The current versions of Linux are generally considered to be
|
||||
great for hobbyists and anyone else who wants to learn Unix
|
||||
inside and out, or wants to always have something to do, or
|
||||
wants a machine for light-duty mostly personal use and not
|
||||
high-volume multi-user purposes.
|
||||
|
||||
However, for those who want a system that will just sit in
|
||||
the background and work without a fuss handling thousands of
|
||||
mail messages a day for lots of different users, it's not
|
||||
(yet) stable enough to fit the bill.
|
||||
|
||||
Unfortunately, there are no known shareware/freeware
|
||||
implementations of any operating system that provides the
|
||||
level of stability necessary to handle that kind of load
|
||||
(i.e., there are no free lunches).
|
||||
|
||||
If you're wedded to the Intel x86 platform and want to run
|
||||
sendmail, we suggest you look at commercial implementations
|
||||
of Unix such as Interactive, UnixWare, Solaris, or BSD/386
|
||||
(just a sample of the dozens of different versions of Unix
|
||||
for Intel x86).
|
||||
|
||||
Of all known vendor supported versions of Unix for Intel x86,
|
||||
BSDI's BSD/386 is least expensive and the only one known to
|
||||
currently ship with sendmail V8 pre-installed. Since sendmail
|
||||
V8 is continuing to be developed at UC Berkeley, and BSD/386
|
||||
is a full BSD 4.4 implementation, this is obviously be the most
|
||||
"native" sendmail V8 environment.
|
||||
----------------------------------------------------------------------
|
||||
* When I use sendmail on an Intel x86 machine running OS/2, I have
|
||||
some problems. Specifically, I have....
|
||||
|
||||
The OS/2 port of sendmail is known to have left out huge
|
||||
chunks of the code and functionality of even much older
|
||||
versions of sendmail, in large part because the underlying OS
|
||||
just doesn't have the necessary hooks to make it happen.
|
||||
This port is so broken that we make no attempt to provide any
|
||||
kind of support for it. Try BSDI's BSD/386 instead.
|
||||
----------------------------------------------------------------------
|
||||
* I'm connected to the network via a SLIP/PPP link. Sometimes my
|
||||
sendmail process hangs (although it looks like part of the
|
||||
message has been transfered). Everything else works. What's
|
||||
wrong?
|
||||
|
||||
Most likely, the problem isn't sendmail at all, but the low
|
||||
level network connection. It's important that the MTU
|
||||
(Maximum Transfer Unit) for the SLIP connection be set
|
||||
properly at both ends. If they disagree, large packets will
|
||||
be trashed and the connection will hang.
|
||||
----------------------------------------------------------------------
|
||||
* I just upgraded to 8.x and suddenly I'm getting messages in my
|
||||
syslog of the form "collect: I/O error on connection". What is
|
||||
going wrong?
|
||||
|
||||
Nothing. This is just a diagnosis of a condition that had
|
||||
not been diagnosed before. If you are getting a lot of these
|
||||
from a single host, there is probably some incompatibility
|
||||
between 8.x and that host. If you get a lot of them in
|
||||
general, you may have network problems that are causing
|
||||
connections to get reset.
|
||||
----------------------------------------------------------------------
|
||||
* I just upgraded to 8.x and now when my users try to forward their
|
||||
mail to a program they get an "illegal shell" message and their
|
||||
mail is not delivered. What's wrong?
|
||||
|
||||
In order for people to be able to run a program from their
|
||||
.forward file, 8.x insists that their shell (that is, the
|
||||
shell listed for that user in the passwd entry) be a "valid"
|
||||
shell, meaning a shell listed in /etc/shells. If /etc/shells
|
||||
does not exist, a default list is used, typically consisting
|
||||
of /bin/sh and /bin/csh.
|
||||
|
||||
This is to support environments that may have NFS-shared
|
||||
directories mounted on machines on which users do not have
|
||||
login permission. For example, many people make their
|
||||
file server inaccessible for performance or security
|
||||
reasons; although users have directories, their shell on
|
||||
the server is /usr/local/etc/nologin or some such. If you
|
||||
allowed them to run programs anyway you might as well let
|
||||
them log in.
|
||||
|
||||
If you are willing to let users run programs from their
|
||||
.forward file even though they cannot telnet or rsh in (as
|
||||
might be reasonable if you run smrsh to control the list of
|
||||
programs they can run) then add the line
|
||||
|
||||
/SENDMAIL/ANY/SHELL/
|
||||
|
||||
to /etc/shells. This must be typed exactly as indicated,
|
||||
in caps, with the trailing slash. NOTA BENE: DO NOT
|
||||
list /usr/local/etc/nologin in /etc/shells -- this will
|
||||
open up other security problems.
|
||||
----------------------------------------------------------------------
|
||||
* I just upgraded to 8.x and suddenly connections to the SMTP port
|
||||
take a long time. What is going wrong?
|
||||
|
||||
It's probably something weird in your TCP implementation that
|
||||
makes the IDENT code act oddly. On most systems V8 tries to
|
||||
do a ``callback'' to the connecting host to get a validated
|
||||
user name (see RFC 1413 for detail). If the connecting host
|
||||
does not support such a service it will normally fail quickly
|
||||
with "Connection refused", but certain kinds of packet
|
||||
filters and certain TCP implementations just time out.
|
||||
|
||||
To test this, set the IDENT timeout to zero using
|
||||
``OrIdent=0'' in the configuration file. This will
|
||||
completely disable all use of the IDENT protocol.
|
||||
|
||||
Another possible problem is that you have your name server
|
||||
and/or resolver configured improperly. Make sure that all
|
||||
"nameserver" entries in /etc/resolv.conf point to functional
|
||||
servers. If you are running your own server make certain
|
||||
that all the servers listed in your root cache (usually
|
||||
called something like "/var/namedb/root.cache"; see your
|
||||
/etc/named.boot file to get your value) are up to date.
|
||||
Either of these can cause long delays.
|
||||
----------------------------------------------------------------------
|
||||
* I just upgraded to 8.x and suddenly I get errors such as ``unknown
|
||||
mailer error 5 -- mail: options MUST PRECEDE recipients.'' What is
|
||||
going wrong?
|
||||
|
||||
You need OSTYPE(systype) in your .mc file -- otherwise the
|
||||
configurations use a default that probably disagrees with
|
||||
your local mail system. See cf/README for details.
|
||||
----------------------------------------------------------------------
|
||||
* Under V8, the "From " header gets mysteriously munged when I send
|
||||
to an alias.
|
||||
|
||||
``It's not a bug, it's a feature.'' This happens when you
|
||||
have a "owner-list" alias and you send to "list". V8
|
||||
propagates the owner information into the envelope sender
|
||||
field (which appears as the "From " header on UNIX mail or as
|
||||
the Return-Path: header) so that downstream errors are
|
||||
properly returned to the mailing list owner instead of to the
|
||||
sender. In order to make this appear as sensible as possible
|
||||
to end users, I recommend making the owner point to a
|
||||
"request" address -- for example:
|
||||
|
||||
list: :include:/path/name/list.list
|
||||
owner-list: list-request
|
||||
list-request: eric
|
||||
|
||||
This will make message sent to "list" come out as being "From
|
||||
list-request" instead of "From eric".
|
||||
----------------------------------------------------------------------
|
||||
* I am trying to use MASQUERADE_AS (or the user database) to
|
||||
rewrite from addresses, and although it works in the From: header
|
||||
line, it doesn't work in the envelope (e.g., the "From " line).
|
||||
|
||||
Believe it or not, this is intentional. The interpretation
|
||||
of the standards by the V8 development group was that this
|
||||
was an inappropriate rewriting, and that if the rewriting
|
||||
were incorrect at least the envelope would contain a valid
|
||||
return address. Other people have since described scenarios
|
||||
where the envelope cannot be correct without this rewriting,
|
||||
so 8.7 will have an option to rewrite both header and
|
||||
envelope.
|
||||
----------------------------------------------------------------------
|
||||
* I want to run Sendmail version 8 on my DEC system, but you don't
|
||||
have MAIL11V3 support in sendmail. How do I handle this?
|
||||
|
||||
Get Paul Vixie's reimplementation of the mail11 protocol from
|
||||
gatekeeper.dec.com in /pub/DEC/gwtools.
|
||||
|
||||
Rumour has it that he will be fully integrating into sendmail
|
||||
V8 what little is left of IDA sendmail that is not handled
|
||||
(or handled as well) by V8. No additional information on
|
||||
this project is currently available.
|
||||
----------------------------------------------------------------------
|
||||
* Messages seem to disappear from my queue unsent. When I look in
|
||||
the queue directory I see that they have been renamed from qf* to
|
||||
Qf*, and sendmail doesn't see these.
|
||||
|
||||
If you look closely you should find that the Qf files are
|
||||
owned by users other than root. Since sendmail runs as root
|
||||
it refuses to believe information in non-root-owned qf files,
|
||||
and it renames them to Qf to get them out of the way and make
|
||||
it easy for you to find. The usual cause of this is
|
||||
twofold: first, you have the queue directory world writable
|
||||
(which is probably a mistake -- this opens up other security
|
||||
problems) and someone is calling sendmail with an "unsafe"
|
||||
flag, usually a -o flag that sets an option that could
|
||||
compromise security. When sendmail sees this it gives up
|
||||
setuid root permissions.
|
||||
|
||||
The usual solution is to not use the problematic flags. If
|
||||
you must use them, you have to write a special queue
|
||||
directory and have them processed by the same uid that
|
||||
submitted the job in the first place.
|
||||
----------------------------------------------------------------------
|
||||
@(#)FAQ 8.16 (Berkeley) 9/17/95
|
||||
Send updates to sendmail@sendmail.ORG.
|
||||
--Eric Allman 8/17/96
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
|
||||
|
||||
K N O W N B U G S I N S E N D M A I L
|
||||
(for 8.7)
|
||||
(for 8.8)
|
||||
|
||||
|
||||
The following are bugs or deficiencies in sendmail that I am aware of
|
||||
|
@ -74,18 +74,8 @@ This list is not guaranteed to be complete.
|
|||
not in the sendmail source code, so I assume it is also a bug
|
||||
in the sockets emulation. (Errno 22 is EINVAL "Invalid Argument"
|
||||
on all the systems I have available, including Solaris 2.x.)
|
||||
|
||||
* Sending user deletion not done properly in :include: lists.
|
||||
|
||||
If you don't have the "m" (me too) option set, then a person
|
||||
sending to a list that contains themselves should not get a copy
|
||||
of the message. However, if that list points to a :include: file
|
||||
that has one address per line, this will break, and the sender
|
||||
will always get a copy of their own message, just as though the
|
||||
"m" option were set.
|
||||
|
||||
You can eliminate this by adding commas at the end of each line
|
||||
of the :include: file.
|
||||
Apparently, this problem is due to linking -lc before -lsocket;
|
||||
if you are having this problem, check your Makefile.
|
||||
|
||||
* Excessive mailing list nesting can run out of file descriptors.
|
||||
|
||||
|
@ -116,4 +106,4 @@ This list is not guaranteed to be complete.
|
|||
allow for 8->7 bit MIME conversions either.
|
||||
|
||||
|
||||
(Version 8.21, last updated 8/27/95)
|
||||
(Version 8.23, last updated 10/15/96)
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*-
|
||||
* @(#)READ_ME 8.25 (Berkeley) 11/19/95
|
||||
* @(#)READ_ME 8.29 (Berkeley) 9/24/96
|
||||
*/
|
||||
|
||||
SENDMAIL RELEASE 8
|
||||
|
@ -9,6 +9,9 @@ doc/changes/changes.me for a summary of changes since 5.67.
|
|||
|
||||
Report any bugs to sendmail-bugs@sendmail.ORG
|
||||
|
||||
There is a web site at http://WWW.Sendmail.ORG -- see that site for
|
||||
the latest updates.
|
||||
|
||||
******************************************************************
|
||||
** DO NOT USE MAKE to compile sendmail. Instead, cd src and **
|
||||
** use the "makesendmail" shell script. On many environments **
|
||||
|
@ -128,13 +131,20 @@ Important RFCs for electronic mail are:
|
|||
RFC976 UUCP mail format
|
||||
RFC1123 Host requirements (modifies 821, 822, and 974)
|
||||
RFC1413 Identification server
|
||||
RFC1425 SMTP Service Extensions (ESMTP spec)
|
||||
RFC1426 SMTP Service Extension for 8bit-MIMEtransport
|
||||
RFC1427 SMTP Service Extension for Message Size Declaration
|
||||
RFC1869 SMTP Service Extensions (ESMTP spec)
|
||||
RFC1652 SMTP Service Extension for 8bit-MIMEtransport
|
||||
RFC1870 SMTP Service Extension for Message Size Declaration
|
||||
RFC1521 MIME: Multipurpose Internet Mail Extensions
|
||||
RFC1344 Implications of MIME for Internet Mail Gateways
|
||||
RFC1428 Transition of Internet Mail from Just-Send-8 to
|
||||
8-bit SMTP/MIME
|
||||
RFC1891 SMTP Service Extension for Delivery Status Notifications
|
||||
RFC1892 Multipart/Report Content Type for the Reporting of
|
||||
Mail System Administrative Messages
|
||||
RFC1893 Enhanced Mail System Status Codes
|
||||
RFC1894 An Extensible Message Format for Delivery Status
|
||||
Notifications
|
||||
RFC1985 SMTP Service Extension for Remote Message Queue Starting
|
||||
|
||||
Other standards that may be of interest (but which are less directly
|
||||
relevant to sendmail) are:
|
||||
|
|
|
@ -1,11 +1,718 @@
|
|||
SENDMAIL RELEASE NOTES
|
||||
@(#)RELEASE_NOTES 8.7.6.4 (Berkeley) 9/16/96
|
||||
@(#)RELEASE_NOTES 8.8.2.1 (Berkeley) 10/18/96
|
||||
|
||||
|
||||
This listing shows the version of the sendmail binary, the version
|
||||
of the sendmail configuration files, the date of release, and a
|
||||
summary of the changes in that release.
|
||||
|
||||
8.8.2/8.8.2 96/11/18
|
||||
SECURITY: fix a botch in the 7-bit MIME patch; the previous patch
|
||||
changed the code but didn't fix the problem.
|
||||
PORTABILITY FIXES:
|
||||
Solaris: Don't use the system getusershell(3); it can
|
||||
apparently corrupt the heap in some circumstances.
|
||||
Problem found by Ken Pizzini of Spry, Inc.
|
||||
OP.ME: document several mailer flags that were accidently omitted
|
||||
from this document. These flags were F=d, F=j, F=R, and F=9.
|
||||
CONFIG: no changes.
|
||||
|
||||
8.8.1/8.8.1 96/10/17
|
||||
SECURITY: unset all environment variables that the resolver will
|
||||
examine during queue runs and daemon mode. Problem noted
|
||||
by Dan Bernstein of the University of Illinois at Chicago.
|
||||
SECURITY: in some cases an illegal 7-bit MIME-encoded text/plain
|
||||
message could overflow a buffer if it was converted back
|
||||
to 8 bits. This caused core dumps and has the potential
|
||||
for a remote attack. Problem first noted by Gregory Shapiro
|
||||
of WPI.
|
||||
Avoid duplicate deliveries of error messages on systems that don't
|
||||
have flock(2) support. Patch from Motonori Nakamura of
|
||||
Kyoto University.
|
||||
Ignore null FallBackMX (V) options. If this option is null (as
|
||||
opposed to undefined) it can cause "null signature" syserrs
|
||||
on illegal host names.
|
||||
If a Base64 encoded text/plain message has no trailing newline in
|
||||
the encoded text, conversion back to 8 bits will drop the
|
||||
final line. Problem noted by Pierre David.
|
||||
If running with a RunAsUser, sendmail would give bogus "cannot
|
||||
setuid" (or seteuid, or setreuid) messages on some systems.
|
||||
Problem pointed out by Jordan Mendelson of Web Services, Inc.
|
||||
Always print error messages in -bv mode -- previously, -bv would
|
||||
be absolutely silent on errors if the error mode was sent
|
||||
to (say) mail-back. Problem noted by Kyle Jones of UUNET.
|
||||
If -qI/R/S is set (or the ETRN command is used), ignore all long
|
||||
term host status. This is necessary because it is common
|
||||
to do this when you know a host has just come back up.
|
||||
Disallow duplicate HELO/EHLO commands as required by RFC 1651 section
|
||||
4.2. Excessive permissiveness noted by Lee Flight of the
|
||||
University of Leicester.
|
||||
If a service (such as NIS) is specified as the last entry in the
|
||||
service switch, but that service is not compiled in, sendmail
|
||||
would return a temporary failure when an entry was not found
|
||||
in the map. This caused the message to be queued instead of
|
||||
bouncing immediately. Problem noted by Harry Edmon of the
|
||||
University of Washington.
|
||||
PORTABILITY FIXES:
|
||||
Solaris 2.3 had compilation problems in conf.c. Several
|
||||
people pointed this out.
|
||||
NetBSD from Charles Hannum of MIT.
|
||||
AIX4 improvements based on info from Steve Bauer of South
|
||||
Dakota School of Mines & Technology.
|
||||
CONFIG: ``error:code message'' syntax was broken in virtusertable.
|
||||
Patch from Gil Kloepfer Jr.
|
||||
CONFIG: if FEATURE(nocanonify) was specified, hosts in $=M (set
|
||||
using MASQUERADE_DOMAIN) were not masqueraded unless they
|
||||
were also in $=w. Problem noted by Zoltan Basti of
|
||||
Softec.
|
||||
MAIL.LOCAL: patches to compile and link cleanly on AIX. Based
|
||||
on a patch from Eric Hagberg of Morgan Stanley.
|
||||
MAIL.LOCAL: patches to compile on NEXTSTEP. From Patrick Nolan
|
||||
of Stanford via Robert La Ferla.
|
||||
|
||||
8.8.0/8.8.0 96/09/26
|
||||
Under some circumstances, Bcc: headers would not be properly
|
||||
deleted. Pointed out by Jonathan Kamens of OpenVision.
|
||||
Log a warning if the sendmail daemon is invoked without a full
|
||||
pathname, which prevents "kill -1" from working. I was
|
||||
urged to put this in by Andrey A. Chernov of DEMOS (Russia).
|
||||
Fix small buffer overflow. Since the data in this buffer was not
|
||||
read externally, there was no security problem (and in fact
|
||||
probably wouldn't really overflow on most compilers). Pointed
|
||||
out by KIZU takashi of Osaka University.
|
||||
Fix problem causing domain literals such as [1.2.3.4] to be ignored
|
||||
if a FallbackMXHost was specified in the configuration file
|
||||
-- all mail would be sent to the fallback even if the original
|
||||
host was accessible. Pointed out by Munenari Hirayama of
|
||||
NSC (Japan).
|
||||
A message that didn't terminate with a newline would (sometimes) not
|
||||
have the trailing "." added properly in the SMTP dialogue,
|
||||
causing SMTP to hang. Patch from Per Hedeland of Ericsson.
|
||||
The DaemonPortOptions suboption to bind to a particular address was
|
||||
incorrect and nonfunctional due to a misunderstanding of the
|
||||
semantics of binding on a passive socket. Patch from
|
||||
NIIBE Yutaka of Mitsubishi Research Institute.
|
||||
Increase the number of MX hosts for a single name to 100 to better
|
||||
handle the truly huge service providers such as AOL, which
|
||||
has 13 at the moment (and climbing). In order to avoid
|
||||
trashing memory, the buffer for all names has only been
|
||||
slightly increased in size, to 12.8K from 10.2K -- this means
|
||||
that if a single name had 100 MX records, the average size
|
||||
of those records could not exceed 128 bytes. Requested by
|
||||
Brad Knowles of America On Line.
|
||||
Restore use of IDENT returns where the OSTYPE field equals "OTHER".
|
||||
Urged by Dan Bernstein of U.C. Berkeley.
|
||||
Print q_statdate and q_specificity in address structure debugging
|
||||
printout.
|
||||
Expand MCI structure flag bits for debugging output.
|
||||
Support IPv6-style domain literals, which can have colons between
|
||||
square braces.
|
||||
Log open file descriptors for the "cannot dup" messages in deliver();
|
||||
this is an attempt to track down a bug that one person seems
|
||||
to be having (it may be a Solaris bug!).
|
||||
DSN NOTIFY parameters were not properly propogated across queue runs;
|
||||
this caused the NOTIFY info to sometimes be lost. Problem
|
||||
pointed out by Claus Assmann of the
|
||||
Christian-Albrechts-University of Kiel.
|
||||
The statistics gathered in the sendmail.st file were too high; in
|
||||
some cases failures (e.g., user unknown or temporary failure)
|
||||
would count as a delivery as far as the statistics were
|
||||
concerned. Problem noted by Tom Moore of AT&T GIS.
|
||||
Systems that don't have flock() would not send split envelopes in
|
||||
the initial run. Problem pointed out by Leonard Zubkoff of
|
||||
Dandelion Digital.
|
||||
Move buffer overflow checking -- these primarily involve distrusting
|
||||
results that may come from NIS and DNS.
|
||||
4.4-BSD-derived systems, including FreeBSD, NetBSD, and BSD/OS didn't
|
||||
include <paths.h> and hence had the wrong pathnames for a few
|
||||
things like /var/tmp. Reported by Matthew Green.
|
||||
Conditions were reversed for the Priority: header, resulting in all
|
||||
values being interpreted as non-urgent except for non-urgent,
|
||||
which was interpreted as normal. Patch from Bryan Costales.
|
||||
The -o (optional) flag was being ignored on hash and btree maps
|
||||
since 8.7.2. Fix from Bryan Costales.
|
||||
Content-Types listed in class "q" will always be encoded as
|
||||
Quoted-Printable (or more accurately, will never be encoded
|
||||
as base64). The class can have primary types (e.g., "text")
|
||||
or full types (e.g., "text/plain"). Based on a suggestion by
|
||||
Marius Olafsson of the University of Iceland.
|
||||
Define ${envid} to be the original envelope id (from the ESMTP DSN
|
||||
dialogue) so it can be passed to programs in mailers.
|
||||
Define ${bodytype} to be the body type (from the -B flag or the
|
||||
BODY= ESMTP parameter) so it can be passed to programs in
|
||||
mailers.
|
||||
Cause the VRFY command to return 252 instead of 250 unless the F=q
|
||||
flag is set in the mailer descriptor. Suggested by John
|
||||
Myers of CMU.
|
||||
Implement ESMTP ETRN command to flush the queue for a specific host.
|
||||
The command takes a host name; data for that host is
|
||||
immediately (and asynchronously) flushed. Because this shares
|
||||
the -qR implementation, other hosts may be attempted, but
|
||||
there should be no security implications. Implementation
|
||||
from John Beck of InReference, Inc. See RFC 1985 for details.
|
||||
Add three new command line flags to pass in DSN parameters: -V envid
|
||||
(equivalent to ENVID=envid on the MAIL command), -R ret
|
||||
(equivalent to RET=ret on the MAIL command), and -Nnotify
|
||||
(equivalent to NOTIFY=notify on the RCPT command). Note
|
||||
that the -N flag applies to all recipients; there is no way
|
||||
to specify per-address notifications on the command line,
|
||||
nor is there an equivalent for the ORCPT= per-address
|
||||
parameter.
|
||||
Restore LogLevel option to be safe (it can only be increased);
|
||||
apparently I went into paranoid mode between 8.6 and 8.7
|
||||
and made it unsafe. Pointed out by Dabe Murphy of the
|
||||
University of Maryland.
|
||||
New logging on log level 15: all SMTP traffic. Patches from
|
||||
Andrew Gross of San Diego Supercomputer Center.
|
||||
NetInfo property value searching code wasn't stopping when it found
|
||||
a match. This was causing the wrong values to be found (and
|
||||
had a memory leak). Found by Bastian Schleuter of TU-Berlin.
|
||||
Add new F=0 (zero) mailer flag to turn off MX lookups. It was pointed
|
||||
out by Bill Wisner of Electronics for Imaging that you can't
|
||||
use the bracket address form for the MAIL_HUB macro, since
|
||||
that causes the brackets to remain in the envelope recipient
|
||||
address used for delivery. The simple fix (stripping off the
|
||||
brackets in the config file) breaks the use of IP literal
|
||||
addresses. This flag will solve that problem.
|
||||
Add MustQuoteChars option. This is a list of characters that must
|
||||
be quoted if they are found in the phrase part of an address
|
||||
(that is, the full name part). The characters @,;:\()[] are
|
||||
always in this list and cannot be removed. The default is
|
||||
this list plus . and ' to match RFC 822.
|
||||
Add AllowBogusHELO option; if set, sendmail will allow HELO commands
|
||||
that do not include a host name for back compatibility with
|
||||
some stupid SMTP clients. Setting this violates RFC 1123
|
||||
section 5.2.5.
|
||||
Add MaxDaemonChildren option; if this is set, sendmail will start
|
||||
rejecting connections if it has more than this many
|
||||
outstanding children accepting mail. Note that you may
|
||||
see more processes than this because of outgoing mail; this
|
||||
is for incoming connections only.
|
||||
Add ConnectionRateThrottle option. If set to a positive value, the
|
||||
number of incoming SMTP connections that will be permitted
|
||||
in a single second is limited to this number. Connections are
|
||||
not refused during this time, just deferred. The intent is to
|
||||
flatten out demand so that load average limiting can kick in.
|
||||
It is less radical than MaxDaemonChildren, which will stop
|
||||
accepting connections even if all the connections are idle
|
||||
(e.g., due to connection caching).
|
||||
Add Timeout.hoststatus option. This interval (defaulting to 30m)
|
||||
specifies how long cached information about the state of a
|
||||
host will be kept before they are considered stale and the
|
||||
host is retried. If you are using persistent host status
|
||||
(i.e., the HostStatusDirectory option is set) this will apply
|
||||
between runs; otherwise, it applies only within a single queue
|
||||
run and hence is useful only for hosts that have large queues
|
||||
that take a very long time to run.
|
||||
Add SingleLineFromHeader option. If set, From: headers are coerced
|
||||
into being a single line even if they had newlines in them
|
||||
when read. This is to get around a botch in Lotus Notes.
|
||||
Text class maps were totally broken -- if you ever retrieved the last
|
||||
item in a table it would be truncated. Problem noted by
|
||||
Gregory Neil Shapiro of WPI.
|
||||
Extend the lines printed by the mailq command (== the -bp flag) when
|
||||
-v is given to 120 characters; this allows more information
|
||||
to be displayed. Suggested by Gregory Neil Shapiro of WPI.
|
||||
Allow macro definitions (`D' lines) with unquoted commas; previously
|
||||
this was treated as end-of-input. Problem noted by Bryan
|
||||
Costales.
|
||||
The RET= envelope parameter (used for DSNs) wasn't properly written
|
||||
to the queue file. Fix from John Hughes of Atlantic
|
||||
Technologies, Inc.
|
||||
Close /var/tmp/dead.letter after a successful write -- otherwise
|
||||
if this happens in a queue run it can cause nasty delays.
|
||||
Problem noted by Mark Horton of AT&T.
|
||||
If userdb entries pointed to userdb entries, and there were multiple
|
||||
values for a given key, the database cursor would get
|
||||
trashed by the recursive call. Problem noted by Roy Mongiovi
|
||||
of Georgia Tech. Fixed by reading all the values and creating
|
||||
a comma-separated list; thus, the -v output will be somewhat
|
||||
different for this case.
|
||||
Fix buffer allocation problem with Hesiod-based userdb maps when
|
||||
HES_GETMAILHOST is defined. Based on a patch by Betty Lee
|
||||
of Stanford University.
|
||||
When envelopes were split due to aliases with owner- aliases, and
|
||||
there was some error on one of the lists, more than one of
|
||||
the owners would get the message. Problem pointed out by
|
||||
Roy Mongiovi of Georgia Tech.
|
||||
Detect excessive recursion in macro expansions, e.g., $X defined
|
||||
in terms of $Y which is defined in terms of $X. Problem
|
||||
noted by Bryan Costales; patch from Eric Wassenaar.
|
||||
When using F=U to get "ugly UUCP" From_ lines, a buffer could in
|
||||
some cases get trashed causing bogus From_ lines. Fix from
|
||||
Kyle Jones of UUNET.
|
||||
When doing load average initialization, if the nlist call for avenrun
|
||||
failed, the second and subsequent lookups wouldn't notice
|
||||
that fact causing bogus load averages to be returned. Noted
|
||||
by Casper Dik of Sun Holland.
|
||||
Fix problem with incompatibility with some versions of inet_aton that
|
||||
have changed the return value to unsigned, so a check for an
|
||||
error return of -1 doesn't work. Use INADDR_NONE instead.
|
||||
This could cause mail to addresses such as [foo.com] to bounce
|
||||
or get dropped. Problem noted by Christophe Wolfhugel of the
|
||||
Pasteur Institute.
|
||||
DSNs were inconsistent if a failure occured during the DATA phase
|
||||
rather than the RCPT phase: the Action: would be correct, but
|
||||
the detailed status information would be wrong. Problem noted
|
||||
by Bob Snyder of General Electric Company.
|
||||
Add -U command line flag and the XUSR ESMTP extension, both indicating
|
||||
that this is the initial MUA->MTA submission. The flag current
|
||||
does nothing, but in future releases (when MUAs start using
|
||||
these flags) it will probably turn on things like DNS
|
||||
canonification.
|
||||
Default end-of-line string (E= specification on mailer [M] lines)
|
||||
to \r\n on SMTP mailers. Default remains \n on non-SMTP
|
||||
mailers.
|
||||
Change the internal definition for the *file* and *include* mailers
|
||||
to have $u in the argument vectors so that they aren't
|
||||
misinterpreted as SMTP mailers and thus use \r\n line
|
||||
termination. This will affect anyone who has redefined
|
||||
either of these in their configuration file.
|
||||
Don't assume that IDENT servers close the connection after a query;
|
||||
responses can be newline terminated. From Terry Kennedy of
|
||||
St. Peter's College.
|
||||
Avoid core dumps on erroneous configuration files that have
|
||||
$#mailer with nothing following. From Bryan Costales.
|
||||
Avoid null pointer dereference with high debug values in unlockqueue.
|
||||
Fix from Randy Martin of Clemson University.
|
||||
Fix possible buffer overrun when expanding very large macros. Fix
|
||||
from Kyle Jones of UUNET.
|
||||
After 25 EXPN or VRFY commands, start pausing for a second before
|
||||
processing each one. This avoids a certain form of denial
|
||||
of service attack. Potential attack pointed out by Bryan
|
||||
Costales.
|
||||
Allow new named (not numbered!) config file rules to do validity
|
||||
checking on SMTP arguments: check_mail for MAIL commands and
|
||||
check_rcpt for RCPT commands. These rulesets can do anything
|
||||
they want; their result is ignored unless they resolve to the
|
||||
$#error mailer, in which case the indicated message is printed
|
||||
and the command is rejected. Similarly, the check_compat
|
||||
ruleset is called before delivery with "from_addr $| to_addr"
|
||||
(the $| is a meta-symbol used to separate the two addresses);
|
||||
it can give a "this sender can't send to this recipient"
|
||||
notification. Note that this patch allows $| to stand alone
|
||||
in rulesets.
|
||||
Define new macros ${client_name}, ${client_addr}, and ${client_port}
|
||||
that have the name, IP address, and port number (respectively)
|
||||
of the SMTP client (that is, the entity at the other end of
|
||||
the connection. These can be used in (e.g.) check_rcpt to
|
||||
verify that someone isn't trying to relay mail through your
|
||||
host inappropriately. Be sure to use the deferred evaluation
|
||||
form, for example $&{client_name}, to avoid having these bound
|
||||
when sendmail reads the configuration file.
|
||||
Add new config file rule check_relay to check the incoming connection
|
||||
information. Like check_compat, it is passed the host name
|
||||
and host address separated by $| and can reject connections
|
||||
on that basis.
|
||||
Allow IDA-style recursive function calls. Code contributed by Mark
|
||||
Lovell and Paul Vixie.
|
||||
Eliminate the "No ! in UUCP From address!" message" -- instead, create
|
||||
a virtual UUCP address using either a domain address or the $k
|
||||
macro. Based on code contributed by Mark Lovell and Paul
|
||||
Vixie.
|
||||
Add Stanford LDAP map. Requires special libraries that are not
|
||||
included with sendmail. Contributed by Booker C. Bense
|
||||
<bbense@networking.stanford.edu>; contact him for support.
|
||||
See also the src/READ_ME file.
|
||||
Allow -dANSI to turn on ANSI escape sequences in debug output; this
|
||||
puts metasymbols (e.g., $+) in reverse video. Really useful
|
||||
only for debugging deep bits of code where it is important to
|
||||
distinguish between the single-character metasymbol $+ and the
|
||||
two characters $, +.
|
||||
Changed ruleset 89 (executed in dumpstate()) to a named ruleset,
|
||||
debug_dumpstate.
|
||||
Add new UnsafeGroupWrites option; if set, .forward and :include:
|
||||
files that are group writable are considered "unsafe" -- that
|
||||
is, programs and files referenced from such files are not
|
||||
valid recipients.
|
||||
Delete bogosity test for FallBackMX host; this prevented it to be a
|
||||
name that was not in DNS or was a domain-literal. Problem
|
||||
noted by Tom May.
|
||||
Change the introduction to error messages to more clearly delineate
|
||||
permanent from temporary failures; if both existed in a
|
||||
single message it could be confusing. Suggested by John
|
||||
Beck of InReference, Inc.
|
||||
The IngoreDot (i) option didn't work for lines that were terminated
|
||||
with CRLF. Problem noted by Ted Stockwell of Secure
|
||||
Computing Corporation.
|
||||
Add a heuristic to improve the handling of unbalanced `<' signs in
|
||||
message headers. Problem reported by Matt Dillon of Best
|
||||
Internet Communications.
|
||||
Check for bogus characters in the 0200-0237 range; since these are
|
||||
used internally, very strange errors can occur if those
|
||||
characters appear in headers. Problem noted by Anders Gertz
|
||||
of Lysator.
|
||||
Implement 7 -> 8 bit MIME conversions. This only takes place if the
|
||||
recipient mailer has the F=9 flag set, and only works on
|
||||
text/plain body types. Code contributed by Marius Olafsson
|
||||
of the University of Iceland.
|
||||
Special case "postmaster" name so that it is always treated as lower
|
||||
case in alias files regardless of configuration settings;
|
||||
this prevents some potential problems where "Postmaster" or
|
||||
"POSTMASTER" might not match "postmaster". In most cases
|
||||
this change is a no-op.
|
||||
The -o map flag was ignored for text maps. Problem noted by Bryan
|
||||
Costales.
|
||||
The -a map flag was ignored for dequote maps. Problem noted by
|
||||
Bryan Costales.
|
||||
Fix core dump when a lookup of a class "prog" map returns no
|
||||
response. Patch from Bryan Costales.
|
||||
Log instances where sendmail is deferring or rejecting connections
|
||||
on LogLevel 14. Suggested by Kyle Jones of UUNET.
|
||||
Include port number in process title for network daemons. Suggested
|
||||
by Kyle Jones of UUNET.
|
||||
Send ``double bounces'' (errors that occur when sending an error
|
||||
message) to the address indicated in the DoubleBounceAddress
|
||||
option (default: postmaster). Previously they were always
|
||||
sent to postmaster. Suggested by Kyle Jones of UUNET.
|
||||
Add new mode, -bD, that acts like -bd in all respects except that
|
||||
it runs in foreground. This is useful for using with a
|
||||
wrapper that "watches" system services. Suggested by Kyle
|
||||
Jones of UUNET.
|
||||
Fix botch in spacing around (parenthesized) comments in addresses
|
||||
when the comment comes before the address. Patch from
|
||||
Motonori Nakamura of Kyoto University.
|
||||
Use the prefix "Postmaster notify" on the Subject: lines of messages
|
||||
that are being bounced to postmaster, rather than "Returned
|
||||
mail". This permits the person who is postmaster more
|
||||
easily determine what messages are to their role as
|
||||
postmaster versus bounces to mail they actually sent. Based
|
||||
on a suggestion by Motonori Nakamura.
|
||||
Add new value "time" for QueueSortOrder option; this causes the queue
|
||||
to be sorted strictly by the time of submission. Note that
|
||||
this can cause very bad behaviour over slow lines (because
|
||||
large jobs will tend to delay small jobs) and on nodes with
|
||||
heavy traffic (because old things in the queue for hosts that
|
||||
are down delay processing of new jobs). Also, this does not
|
||||
guarantee that jobs will be delivered in submission order
|
||||
unless you also set DeliveryMode=queue. In general, it should
|
||||
probably only be used on the command line, and only in
|
||||
conjunction with -qRhost.domain. In fact, there are very few
|
||||
cases where it should be used at all. Based on an
|
||||
implementation by Motonori Nakamura.
|
||||
If a map lookup in ruleset 5 returns tempfail, queue the message in
|
||||
the same manner as other rulesets. Previously a temporary
|
||||
failure in ruleset 5 was ignored. Patch from Booker Bense
|
||||
of Stanford University.
|
||||
Don't proceed to the next MX host if an SMTP MAIL command returns a
|
||||
5yz (permanent failure) code. The next MX host will still be
|
||||
tried if the connection cannot be opened in the first place
|
||||
or if the MAIL command returns a 4yz (temporary failure) code.
|
||||
(It's hard to know what to do here, since neither RFC 974 nor
|
||||
RFC 1123 specify when to proceed to the next MX host.)
|
||||
Suggested by Jonathan Kamens of OpenVision, Inc.
|
||||
Add new "-t" flag for map definitions (the "K" line in the .cf file).
|
||||
This causes map lookups that get a temporary failure (e.g.,
|
||||
name server failure) to _not_ defer the delivery of the
|
||||
message. This should only be used if your configuration file
|
||||
is prepared to do something sensible in this case. Based on
|
||||
an idea by Gregory Shapiro of WPI.
|
||||
Fix problem finding network interface addresses. Patch from
|
||||
Motonori Nakamura.
|
||||
Don't reject qf entries that are not owned by your effective uid if
|
||||
you are not running setuid; this makes management of certain
|
||||
kinds of firewall setups difficult. Patch suggested by
|
||||
Eamonn Coleman of Qualcomm.
|
||||
Add persistent host status. This keeps the information normally
|
||||
maintained within a single queue run in disk files that are
|
||||
shared between sendmail instances. The HostStatusDirectory
|
||||
is the directory in which the information is maintained. If
|
||||
not set, persistent host status is turned off. If not a full
|
||||
pathname, it is relative to the queue directory. A common
|
||||
value is ".hoststat".
|
||||
There are also two new operation modes:
|
||||
* -bh prints the status of hosts that have had recent
|
||||
connections.
|
||||
* -bH purges the host statuses. No attempt is made to save
|
||||
recent status information.
|
||||
This feature was originally written by Paul Vixie of Vixie
|
||||
Enterprises for KJS and adapted for V8 by Mark Lovell of
|
||||
Bigrock Consulting. Paul's funding of Mark and Mark's patience
|
||||
with my insistence that things fit cleanly into the V8
|
||||
framework is gratefully appreciated.
|
||||
New SingleThreadDelivery option (requires HostStatusDirectory to
|
||||
operate). Avoids letting two sendmails on the local machine
|
||||
open connections to the same remote host at the same time.
|
||||
This reduces load on the other machine, but can cause mail to
|
||||
be delayed (for example, if one sendmail is delivering a huge
|
||||
message, other sendmails won't be able to send even small
|
||||
messages). Also, it requires another file descriptor (for the
|
||||
lock file) per connection, so you may have to reduce
|
||||
ConnectionCacheSize to avoid running out of per-process
|
||||
file descriptors. Based on the persistent host status code
|
||||
contributed by Paul Vixie and Mark Lovell.
|
||||
Allow sending to non-simple files (e.g., /dev/null) even if the
|
||||
SafeFileEnvironment option is set. Problem noted by Bryan
|
||||
Costales.
|
||||
The -qR flag mistakenly matched flags in the "R" line of the queue
|
||||
file. Problem noted by Bryan Costales.
|
||||
If a job was aborted using the interrupt signal (e.g., control-C from
|
||||
the keyboard), on some occasions an empty df file would be
|
||||
left around; these would collect in the queue directory.
|
||||
Problem noted by Bryan Costales.
|
||||
Change the makesendmail script to enhance the search for Makefiles
|
||||
based on release number. For example, on SunOS 5.5.1, it will
|
||||
search for Makefile.SunOS.5.5.1, Makefile.SunOS.5.5, and then
|
||||
Makefile.SunOS.5.x (in addition to the other rules, e.g.,
|
||||
adding $arch). Problem noted by Jason Mastaler of Atlanta
|
||||
Webmasters.
|
||||
When creating maps using "newaliases", always map the keys to lower
|
||||
case when creating the map unless the -f flag is specified on
|
||||
the map itself. Previously this was done based on the F=u
|
||||
flag in the local mailer, which meant you could create aliases
|
||||
that you could never access. Problem noted by Bob Wu of DEC.
|
||||
When a job was read from the queue, the bits causing notification on
|
||||
failure or delay were always set. This caused those
|
||||
notifications to be sent even if NOTIFY=NEVER had been
|
||||
specified. Problem noted by Steve Hubert of the University
|
||||
of Washington, Seattle.
|
||||
Add new configurable routine validate_connection (in conf.c). This
|
||||
lets you decide if you are willing to accept traffic from
|
||||
this host. If it returns FALSE, all SMTP commands will return
|
||||
"550 Access denied". -DTCPWRAPPERS will include support for
|
||||
TCP wrappers; you will need to add -lwrap to the link line.
|
||||
(See src/READ_ME for details.)
|
||||
Don't include the "THIS IS A WARNING MESSAGE ONLY" banner on postmaster
|
||||
bounces. Some people seemed to think that this could be
|
||||
confusing (even though it is true). Suggested by Motonori
|
||||
Nakamura.
|
||||
Add new RunAsUser option; this causes sendmail to do a setuid to that
|
||||
user early in processing to avoid potential security problems.
|
||||
However, this means that all .forward and :include: files must
|
||||
be readable by that user, and on systems that don't support the
|
||||
saved uid bit properly, all files to be written must be
|
||||
writable by that user and all programs will be executed by that
|
||||
user. It is also incompatible with the SafeFileEnvironment
|
||||
option. In other words, it may not actually add much to
|
||||
security. However, it should be useful on firewalls and other
|
||||
places where users don't have accounts and the aliases file is
|
||||
well constrained.
|
||||
Add Timeout.iconnect. This is like Timeout.connect except it is used
|
||||
only on the first attempt to delivery to an address. It could
|
||||
be set to be lower than Timeout.connect on the principle that
|
||||
the mail should go through quickly to responsive hosts; less
|
||||
responsive hosts get to wait for the next queue run.
|
||||
Fix a problem on Solaris that occassionally causes programs
|
||||
(such as vacation) to hang with their standard input connected
|
||||
to a UDP port. It also created some signal handling problems.
|
||||
The problems turned out to be an interaction between vfork(2)
|
||||
and some of the libraries, particularly NIS/NIS+. I am
|
||||
indebted to Tor Egge <tegge@idt.ntnu.no> for this fix.
|
||||
Change user class map to do the same matching that actual delivery
|
||||
will do instead of just a /etc/passwd lookup. This adds
|
||||
fuzzy matching to the user map. Patch from Dan Oscarsson.
|
||||
The Timeout.* options are not safe -- they can be used to create a
|
||||
denial-of-service attack. Problem noted by Christophe
|
||||
Wolfhugel.
|
||||
Don't send PostMasterCopy messages in the event of a "delayed"
|
||||
notification. Suggested by Barry Bouwsma.
|
||||
Don't advertise "VERB" ESMTP extension if the "noexpn" privacy
|
||||
option is set, since this disables VERB mode. Suggested
|
||||
by John Hawkinson of MIT.
|
||||
Complain if the QueueDirectory (Q) option is not set. Problem noted
|
||||
by Motonori Nakamura of Kyoto University.
|
||||
Only queue messages on transient .forward open failures if there
|
||||
were no successful opens. The previous behaviour caused it
|
||||
to queue even if a "fall back" .forward was found. Problem
|
||||
noted by Ann-Kian Yeo of the Dept. of Information Systems
|
||||
and Computer Science (DISCS), NUS, Singapore.
|
||||
Don't do 8->7 bit conversions when bouncing a MIME message that
|
||||
is bouncing because of a MIME error during 8->7 bit conversion;
|
||||
the encapsulated message will bounce again, causing a loop.
|
||||
Problem noted by Steve Hubert of the University of Washington.
|
||||
Create xf (transcript) files using the TempFileMode option value
|
||||
instead of 0644. Suggested by Ann-Kian Yeo of the
|
||||
National University of Singapore.
|
||||
Print errors if setgid/setuid/etc. fail during delivery. This helps
|
||||
detect cases where DefaultUid is set to something that the
|
||||
system can't cope with.
|
||||
PORTABILITY FIXES:
|
||||
Support for AIX/RS 2.2.1 from Mark Whetzel of Western
|
||||
Atlas International.
|
||||
Patches for Intel Paragon OSF/1 1.3 from Leo Bicknell
|
||||
<bicknell@ufp.org>.
|
||||
On DEC OSF/1 3.2 and earlier, the MatchGECOS code would only
|
||||
work on the first recipient of a message due to a
|
||||
bug in the getpwent family. If this is something you
|
||||
use, you can define DEC_OSF_BROKEN_GETPWENT=1 for a
|
||||
workaround. From Maximum Entropy of Sanford C.
|
||||
Bernstein and Associates.
|
||||
FreeBSD 1.1.5.1 uname -r returns a string containing
|
||||
parentheses, which breaks makesendmail. Reported
|
||||
by Piero Serini <piero@strider.ibenet.it>.
|
||||
Sequent DYNIX/ptx 4.0.2 patches from Jack Woolley of
|
||||
Systems and Computer Technology Corporation.
|
||||
Solaris 2.x: omit the UUCP grade parameter (-g flag) because
|
||||
it is system-dependent. Problem noted by J.J. Bailey
|
||||
of Bailey Computer Consulting.
|
||||
Pyramid NILE running DC/OSx support from Earle F. Ake of
|
||||
Hassler Communication Systems Technology, Inc.
|
||||
HP-UX 10.x compile glitches, reported by Anne Brink of the
|
||||
U.S. Army and James Byrne of Harte & Lyne Limited.
|
||||
NetBSD from Matthew Green of the NetBSD crew.
|
||||
SCO 5.x from Keith Reynolds of SCO.
|
||||
IRIX 6.2 from Robert Tarrall of the University of
|
||||
Colorado and Kari Hurtta of the Finnish Meteorological
|
||||
Institute.
|
||||
UXP/DS (Fujitsu/ICL DS/90 series) support from Diego R.
|
||||
Lopez, CICA (Seville).
|
||||
NCR SVR4 MP-RAS 3.x support from Tom Moore of NCR.
|
||||
PTX 3.2.0 from Kenneth Stailey of the US Department of Labor
|
||||
Employment Standards Administration.
|
||||
Altos System V (5.3.1) from Tim Rice of Multitalents.
|
||||
Concurrent Systems Corporation Maxion from Donald R. Laster
|
||||
Jr.
|
||||
NetInfo maps (improved debugging and multi-valued aliases)
|
||||
from Adrian Steinmann of Steinmann Consulting.
|
||||
ConvexOS 11.5 (including SecureWare C2 and the Share Scheduler)
|
||||
from Eric Schnoebelen of Convex.
|
||||
Linux 2.0 mail.local patches from Horst von Brand.
|
||||
NEXTSTEP 3.x compilation from Robert La Ferla.
|
||||
NEXTSTEP 3.x code changes from Allan J. Nathanson of NeXT.
|
||||
Solaris 2.5 configuration fixes for mail.local by Jim Davis
|
||||
of the University of Arizona.
|
||||
Solaris 2.5 has a working setreuid. Noted by David Linn of
|
||||
Vanderbilt University.
|
||||
Solaris changes for praliases, makemap, mailstats, and smrsh.
|
||||
Previously you had to add -DSOLARIS in Makefile.dist;
|
||||
this auto-detects. Based on a patch from Randall
|
||||
Winchester of the University of Maryland.
|
||||
CONFIG: add generic-nextstep3.3.mc file. Contributed by
|
||||
Robert La Ferla of Hot Software.
|
||||
CONFIG: allow mailertables to resolve to ``error:code message''
|
||||
(where "code" is an exit status) on domains (previously
|
||||
worked only on hosts). Patch from Cor Bosman of Xs4all
|
||||
Foundation.
|
||||
CONFIG: hooks for IPv6-style domain literals.
|
||||
CONFIG: predefine ALIAS_FILE and change the prototype file so that
|
||||
if it is undefined the AliasFile option is never set; this
|
||||
should be transparent for most everyone. Suggested by John
|
||||
Myers of CMU.
|
||||
CONFIG: add FEATURE(limited_masquerade). Without this feature, any
|
||||
domain listed in $=w is masqueraded. With it, only those
|
||||
domains listed in a MASQUERADE_DOMAIN macro are masqueraded.
|
||||
CONFIG: add FEATURE(masquerade_entire_domain). This causes
|
||||
masquerading specified by MASQUERADE_DOMAIN to apply to all
|
||||
hosts under those domains as well as the domain headers
|
||||
themselves. For example, if a configuration had
|
||||
MASQUERADE_DOMAIN(foo.com), then without this feature only
|
||||
foo.com would be masqueraded; with it, *.foo.com would be
|
||||
masqueraded as well. Based on an implementation by Richard
|
||||
(Pug) Bainter of U. Texas.
|
||||
CONFIG: add FEATURE(genericstable) to do a more general rewriting of
|
||||
outgoing addresses. Defaults to ``hash -o /etc/genericstable''.
|
||||
Keys are user names; values are outgoing mail addresses. Yes,
|
||||
this does overlap with the user database, and figuring out
|
||||
just when to use which one may be tricky. Based on code
|
||||
contributed by Richard (Pug) Bainter of U. Texas with updates
|
||||
from Per Hedeland of Ericsson.
|
||||
CONFIG: add FEATURE(virtusertable) to do generalized rewriting of
|
||||
incoming addresses. Defaults to ``hash -o /etc/virtusertable''.
|
||||
Keys are either fully qualified addresses or just the host
|
||||
part (with the @ sign). For example, a table containing:
|
||||
info@foo.com foo-info
|
||||
info@bar.com bar-info
|
||||
@baz.org jane@elsewhere.net
|
||||
would send all mail destined for info@foo.com to foo-info
|
||||
(which is presumably an alias), mail addressed to info@bar.com
|
||||
to bar-info, and anything addressed to anyone at baz.org will
|
||||
be sent to jane@elsewhere.net. The names foo.com, bar.com,
|
||||
and baz.org must all be in $=w. Based on discussions with
|
||||
a great many people.
|
||||
CONFIG: add nullclient configurations to define SMTP_MAILER_FLAGS.
|
||||
Suggested by Richard Bainter.
|
||||
CONFIG: add FAX_MAILER_ARGS to tweak the arguments passed to the
|
||||
"fax" mailer.
|
||||
CONFIG: allow mailertable entries to resolve to local:user; this
|
||||
passes the original user@host in to procmail-style local
|
||||
mailers as the "detail" information to allow them to do
|
||||
additional clever processing. From Joe Pruett of
|
||||
Teleport Corporation. Delivery to the original user can
|
||||
be done by specifying "local:" (with nothing after the colon).
|
||||
CONFIG: allow any context that takes "mailer:domain" to also take
|
||||
"mailer:user@domain" to force mailing to the given user;
|
||||
"local:user" can also be used to do local delivery. This
|
||||
applies on *_RELAY and in the mailertable entries. Based
|
||||
on a suggestion by Ribert Kiessling of Easynet.
|
||||
CONFIG: Allow FEATURE(bestmx_is_local) to take an argument that
|
||||
limits the possible domains; this reduces the number of DNS
|
||||
lookups required to support this feature. For example,
|
||||
FEATURE(bestmx_is_local, my.site.com) limits the lookups
|
||||
to domains under my.site.com. Code contributed by Anthony
|
||||
Thyssen <anthony@cit.gu.edu.au>.
|
||||
CONFIG: LOCAL_RULESETS introduces any locally defined rulesets,
|
||||
such as the check_rcpt ruleset. Suggested by Gregory Shapiro
|
||||
of WPI.
|
||||
CONFIG: MAILER_DEFINITIONS introduces any mailer definitions, in the
|
||||
event you have to define local mailers. Suggested by
|
||||
Gregory Shapiro of WPI.
|
||||
CONFIG: fix cases where a three- (or more-) stage route-addr could
|
||||
be misinterpreted as a list:...; syntax. Based on a patch by
|
||||
Vlado Potisk <Vlado_Potisk@tempest.sk>.
|
||||
CONFIG: Fix masquerading of UUCP addresses when the UUCP relay is
|
||||
remotely connected. The address host!user was being
|
||||
converted to host!user@thishost instead of host!user@uurelay.
|
||||
Problem noted by William Gianopoulos of Raytheon Company.
|
||||
CONFIG: add confTO_ICONNECT to set Timeout.iconnect.
|
||||
CONFIG: change FEATURE(redirect) message from "User not local" to
|
||||
"User has moved"; the former wording was confusing if the
|
||||
new address is still on the local host. Based on a suggestion
|
||||
by Andreas Luik.
|
||||
CONFIG: add support in FEATURE(nullclient) for $=E (exposed users).
|
||||
However, the class is not pre-initialized to contain root.
|
||||
Suggested by Gregory Neil Shapiro.
|
||||
CONTRIB: Remove XLA code at the request of the author, Christophe
|
||||
Wolfhugel.
|
||||
CONTRIB: Add re-mqueue.pl, contributed by Paul Pomes of Qualcomm.
|
||||
MAIL.LOCAL: make it possible to compile mail.local on Solaris. Note
|
||||
well: this produces a slightly different mailbox format (no
|
||||
Content-Length: headers), file ownerships and modes are
|
||||
different (not owned by group mail; mode 600 instead of 660),
|
||||
and the local mailer flags will have to be tweaked (make them
|
||||
match bsd4.4) in order to use this mailer. Patches from Paul
|
||||
Hammann of the Missouri Research and Education Network.
|
||||
MAIL.LOCAL: in some cases it could return EX_OK even though there
|
||||
was a delivery error, such as if the ownership on the file
|
||||
was wrong or the mode changed between the initial stat and
|
||||
the open. Problem reported by William Colburn of the New
|
||||
Mexico Institute of Mining and Technology.
|
||||
MAILSTATS: handle zero length files more reliably. Patch from Bryan
|
||||
Costales.
|
||||
MAILSTATS: add man page contributed by Keith Bostic of BSDI.
|
||||
MAKEMAP: The -d flag (to allow duplicate keys) to a btree map wasn't
|
||||
honored. Fix from Michael Scott Shappe.
|
||||
PRALIASES: add man page contributed by Keith Bostic of BSDI.
|
||||
NEW FILES:
|
||||
src/Makefiles/Makefile.AIX.2
|
||||
src/Makefiles/Makefile.IRIX.6.2
|
||||
src/Makefiles/Makefile.maxion
|
||||
src/Makefiles/Makefile.NCR.MP-RAS.3.x
|
||||
src/Makefiles/Makefile.SCO.5.x
|
||||
src/Makefiles/Makefile.UXPDSV20
|
||||
mailstats/mailstats.8
|
||||
praliases/praliases.8
|
||||
cf/cf/generic-nextstep3.3.mc
|
||||
cf/feature/genericstable.m4
|
||||
cf/feature/limited_masquerade.m4
|
||||
cf/feature/masquerade_entire_domain.m4
|
||||
cf/feature/virtusertable.m4
|
||||
cf/ostype/aix2.m4
|
||||
cf/ostype/altos.m4
|
||||
cf/ostype/maxion.m4
|
||||
cf/ostype/solaris2.ml.m4
|
||||
cf/ostype/uxpds.m4
|
||||
contrib/re-mqueue.pl
|
||||
DELETED FILES:
|
||||
src/Makefiles/Makefile.Solaris
|
||||
contrib/xla/README
|
||||
contrib/xla/xla.c
|
||||
RENAMED FILES:
|
||||
src/Makefiles/Makefile.NCR3000 => Makefile.NCR.MP-RAS.2.x
|
||||
src/Makefiles/Makefile.SCO.3.2v4.2 => Makefile.SCO.4.2
|
||||
src/Makefiles/Makefile.UXPDS => Makefile.UXPDSV10
|
||||
src/Makefiles/Makefile.NeXT => Makefile.NeXT.2.x
|
||||
src/Makefiles/Makefile.NEXTSTEP => Makefile.NeXT.3.x
|
||||
|
||||
8.7.6/8.7.3 96/09/17
|
||||
SECURITY: It is possible to force getpwuid to fail when writing the
|
||||
queue file, causing sendmail to fall back to running programs
|
||||
|
@ -18,8 +725,11 @@ summary of the changes in that release.
|
|||
|
||||
8.7.5/8.7.3 96/03/04
|
||||
Fix glitch in 8.7.4 when putting certain internal lines; this can
|
||||
in some case cause connections to hang. Patch from Eric
|
||||
Wassenaar.
|
||||
in some case cause connections to hang or messages to have
|
||||
extra spaces in odd places. Patch from Eric Wassenaar;
|
||||
reports from Eric Hall of Chiron Corporation, Stephen
|
||||
Hansen of Stanford University, Dean Gaudet of HotWired,
|
||||
and others.
|
||||
|
||||
8.7.4/8.7.3 96/02/18
|
||||
SECURITY: In some cases it was still possible for an attacker to
|
||||
|
@ -80,7 +790,7 @@ summary of the changes in that release.
|
|||
to simplify queue management for clustered systems. Suggested
|
||||
by Gregory Neil Shapiro of WPI. The same problem could break
|
||||
MH, which assumes that the SMTP session will succeed (tsk, tsk
|
||||
-- mail gets lost!); this was pointe dout by Stuart Pook of
|
||||
-- mail gets lost!); this was pointed out by Stuart Pook of
|
||||
Infobiogen.
|
||||
Fix possible buffer overflow in munchstring(). This was not a security
|
||||
problem because you couldn't specify any argument to this
|
||||
|
@ -720,7 +1430,8 @@ summary of the changes in that release.
|
|||
"dns" is in the service list for "hosts".
|
||||
Add preliminary support for the ESMTP "DSN" extension (Delivery
|
||||
Status Notifications). DSN notifications override
|
||||
Return-Receipt-To: headers, which are bogus anyhow.
|
||||
Return-Receipt-To: headers, which are bogus anyhow --
|
||||
support for them has been removed.
|
||||
Add T=mts-name-type/address-type/diagnostic-type keyletter to mailer
|
||||
definitions to define the types used in DSN returns for
|
||||
MTA names, addresses, and diagnostics respectively.
|
||||
|
@ -1484,7 +2195,7 @@ summary of the changes in that release.
|
|||
contrib/rcpt-streaming
|
||||
src/Makefiles/Makefile.SunOS.5.x
|
||||
|
||||
8.6.13/8.6.12 95/01/25
|
||||
8.6.13/8.6.12 96/01/25
|
||||
SECURITY: In some cases it was still possible for an attacker to
|
||||
insert newlines into a queue file, thus allowing access to
|
||||
any user (except root).
|
||||
|
@ -2516,7 +3227,8 @@ summary of the changes in that release.
|
|||
is set. Problem noted by P{r (Pell) Emanuelsson.
|
||||
Fix a problem causing the "c" option (don't connect to expensive
|
||||
mailers) to be ignored in SMTP. Problem noted and the
|
||||
solution suggested by Robert Elz of Munnari University.
|
||||
solution suggested by Robert Elz of The University of
|
||||
Melbourne.
|
||||
Improve connection caching algorithm by passing "[host]" to
|
||||
hostsignature, which strips the square brackets and
|
||||
returns the real name. This allows mailertable entries
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
Eric Allman <eric@CS.Berkeley.EDU>
|
||||
|
||||
@(#)README 8.81 (Berkeley) 12/3/95
|
||||
@(#)README 8.106 (Berkeley) 10/12/96
|
||||
|
||||
|
||||
This document describes the sendmail configuration files being used
|
||||
|
@ -13,7 +13,7 @@ not work on other versions.
|
|||
|
||||
These configuration files are probably not as general as previous
|
||||
versions, and don't handle as many of the weird cases automagically.
|
||||
I was able to simplify by them for two reasons. First, the network
|
||||
I was able to simplify them for two reasons. First, the network
|
||||
has become more consistent -- for example, at this point, everyone
|
||||
on the internet is supposed to be running a name server, so hacks to
|
||||
handle NIC-registered hosts can go away. Second, I assumed that a
|
||||
|
@ -158,9 +158,38 @@ definition appropriate for your environment.
|
|||
MAILER(smtp)
|
||||
|
||||
These describe the mailers used at the default CS site site. The
|
||||
local mailer is always included automatically. Beware MAILER
|
||||
declarations should always be last in the configuration file, and
|
||||
MAILER(smtp) should always precede MAILER(uucp).
|
||||
local mailer is always included automatically. Beware: MAILER
|
||||
declarations should always be at the end of the configuration file,
|
||||
and MAILER(smtp) should always precede MAILER(uucp). The general
|
||||
rules are that the order should be:
|
||||
|
||||
VERSIONID
|
||||
OSTYPE
|
||||
DOMAIN
|
||||
FEATURE
|
||||
local macro definitions
|
||||
MAILER
|
||||
LOCAL_RULESET_*
|
||||
|
||||
|
||||
+----------------------------+
|
||||
| A BRIEF INTRODUCTION TO M4 |
|
||||
+----------------------------+
|
||||
|
||||
Sendmail uses the M4 macro processor to ``compile'' the configuration
|
||||
files. The most important thing to know is that M4 is stream-based,
|
||||
that is, it doesn't understand about lines. For this reason, in some
|
||||
places you may see the word ``dnl'', which standards for ``delete
|
||||
through newline''; essentially, it deletes all characters starting
|
||||
at the ``dnl'' up to and including the next newline character. In
|
||||
most cases sendmail uses this only to avoid lots of unnecessary
|
||||
blank lines in the output.
|
||||
|
||||
Other important directives are define(A, B) which defines the macro
|
||||
``A'' to have value ``B''. Macros are expanded as they are read, so
|
||||
one normally quotes both values to prevent expansion. For example,
|
||||
|
||||
define(`SMART_HOST', `smart.foo.com')
|
||||
|
||||
One word of warning: M4 macros are expanded even in lines that appear
|
||||
to be comments. For example, if you have
|
||||
|
@ -251,6 +280,7 @@ SMTP_MAILER_CHARSET [undefined] If defined, messages containing 8-bit data
|
|||
that ARRIVE from an address that resolves to one of
|
||||
the SMTP mailers and which are converted to MIME will
|
||||
be labelled with this character set.
|
||||
UUCP_MAILER_PATH [/usr/bin/uux] The program used to send UUCP mail.
|
||||
UUCP_MAILER_FLAGS [undefined] Flags added to UUCP mailer. Default
|
||||
flags are `DFMhuU' (and `m' for uucp-new mailer,
|
||||
minus `U' for uucp-dom mailer).
|
||||
|
@ -264,12 +294,16 @@ UUCP_MAILER_CHARSET [undefined] If defined, messages containing 8-bit data
|
|||
be labelled with this character set.
|
||||
FAX_MAILER_PATH [/usr/local/lib/fax/mailfax] The program used to
|
||||
submit FAX messages.
|
||||
FAX_MAILER_ARGS [mailfax $u $h $f] The arguments passed to the FAX
|
||||
mailer.
|
||||
FAX_MAILER_MAX [100000] The maximum size message accepted for
|
||||
transmission by FAX.
|
||||
POP_MAILER_PATH [/usr/lib/mh/spop] The pathname of the POP mailer.
|
||||
POP_MAILER_FLAGS [Penu] Flags added to POP mailer. Flags "lsDFM"
|
||||
are always added.
|
||||
POP_MAILER_ARGS [pop $u] The arguments passed to the POP mailer.
|
||||
PROCMAIL_MAILER_PATH [/usr/local/bin/procmail] The path to the procmail
|
||||
program. This is also used by FEATURE(local_procmail).
|
||||
PROCMAIL_MAILER_FLAGS [Shu] Flags added to Procmail mailer. Flags
|
||||
``DFMmn'' are always set.
|
||||
PROCMAIL_MAILER_ARGS [procmail -m $h $f $u] The arguments passed to
|
||||
|
@ -290,6 +324,10 @@ CYRUS_MAILER_PATH [/usr/cyrus/bin/deliver] The progam used to deliver
|
|||
cyrus mail.
|
||||
CYRUS_MAILER_ARGS [deliver -e -m $h -- $u] The arguments passed
|
||||
to deliver cyrus mail.
|
||||
CYRUS_MAILER_MAX [undefined] If set, the maximum size message that
|
||||
will be accepted by the cyrus mailer.
|
||||
CYRUS_MAILER_USER [cyrus:mail] The user and group to become when
|
||||
running the cyrus mailer.
|
||||
CYRUS_BB_MAILER_FLAGS [undefined] The flags used by the cyrusbb
|
||||
mailer. The flags lsDFMnP are always included.
|
||||
CYRUS_BB_MAILER_ARGS [deliver -e -m $u] The arguments passed
|
||||
|
@ -565,6 +603,73 @@ allmasquerade If masquerading is enabled (using MASQUERADE_AS), this
|
|||
namespace on your masquerade host supersets all the
|
||||
local entries.
|
||||
|
||||
limited_masquerade
|
||||
Normally, any hosts listed in $=w are masqueraded. If this
|
||||
feature is given, only the hosts listed in $=M are masqueraded.
|
||||
This is useful if you have several domains with disjoint
|
||||
namespaces hosted on the same machine.
|
||||
|
||||
masquerade_entire_domain
|
||||
If masquerading is enabled (using MASQUERADE_AS) and
|
||||
MASQUERADE_DOMAIN (see below) is set, this feature will
|
||||
cause addresses to be rewritten such that the masquerading
|
||||
domains are actually entire domains to be hidden. All
|
||||
hosts within the masquerading domains will be rewritten
|
||||
to the masquerade name (used in MASQUERADE_AS). For example,
|
||||
if you have:
|
||||
|
||||
MASQUERADE_AS(masq.com)
|
||||
MASQUERADE_DOMAIN(foo.org)
|
||||
MASQUERADE_DOMAIN(bar.com)
|
||||
|
||||
then *foo.org and *bar.com are converted to masq.com. Without
|
||||
this feature, only foo.org and bar.com are masqueraded.
|
||||
|
||||
NOTE: only domains within your jurisdiction and
|
||||
current hierarchy should be masqueraded using this.
|
||||
|
||||
genericstable This feature will cause certain addresses originating in the
|
||||
local domain or a domain listed in $=G to be looked up in a
|
||||
map and turned into another ("generic") form, which can change
|
||||
both the domain name and the user name. This is similar to
|
||||
the userdb functionality. The same types of addresses as for
|
||||
masquerading are looked up, i.e. only header sender addresses
|
||||
unless the allmasquerade and/or masquerade_envelope features
|
||||
are given. The addresses must be in the list of names given
|
||||
by the macros GENERICS_DOMAIN or GENERICS_DOMAIN_FILE
|
||||
(analogously to MASQUERADE_DOMAIN and MASQUERADE_DOMAIN_FILE,
|
||||
see below).
|
||||
|
||||
The argument of FEATURE(genericstable) may be the map
|
||||
defintion; the default map definition is:
|
||||
|
||||
hash -o /etc/genericstable
|
||||
|
||||
The key for this table is either the full address or the
|
||||
unqualified username (the former is tried first); the
|
||||
value is the new user address. If the new user address does
|
||||
not include a domain, $j is used.
|
||||
|
||||
virtusertable A domain-specific form of aliasing, allowing multiple
|
||||
virtual domains to be hosted on one machine. For example,
|
||||
if the virtuser table contained:
|
||||
|
||||
info@foo.com foo-info
|
||||
info@bar.com bar-info
|
||||
@baz.org jane@elsewhere.net
|
||||
|
||||
then mail addressed to info@foo.com will be sent to the
|
||||
address foo-info, mail addressed to info@bar.com will be
|
||||
delivered to bar-info, and mail addressed to anyone at
|
||||
baz.org will be sent to jane@elsewhere.net. All the host
|
||||
names on the left hand side (foo.com, bar.com, and baz.org)
|
||||
must be in $=w. The default map definition is:
|
||||
|
||||
hash -o /etc/virtusertable
|
||||
|
||||
A new definition can be specified as the second argument of
|
||||
the FEATURE macro.
|
||||
|
||||
nodns We aren't running DNS at our site (for example,
|
||||
we are UUCP-only connected). It's hard to consider
|
||||
this a "feature", but hey, it had to go somewhere.
|
||||
|
@ -587,7 +692,7 @@ local_procmail Use procmail as the local mailer. This mailer can
|
|||
normally the +indicator is just tossed, but by default
|
||||
it is passed as the -a argument to procmail. The
|
||||
argument to this feature is the pathname of procmail,
|
||||
which defaults to /usr/local/bin/procmail.
|
||||
which defaults to PROCMAIL_MAILER_PATH.
|
||||
|
||||
bestmx_is_local Accept mail as though locally addressed for any host that
|
||||
lists us as the best possible MX record. This generates
|
||||
|
@ -834,14 +939,17 @@ You can have your host masquerade as another using
|
|||
|
||||
MASQUERADE_AS(host.domain)
|
||||
|
||||
This causes outgoing SMTP mail to be labeled as coming from the
|
||||
This causes mail being sent to be labeled as coming from the
|
||||
indicated domain, rather than $j. One normally masquerades as one
|
||||
of one's own subdomains (for example, it's unlikely that I would
|
||||
choose to masquerade as an MIT site).
|
||||
choose to masquerade as an MIT site). This behaviour is modified by
|
||||
a plethora of FEATUREs; in particular, see masquerade_envelope,
|
||||
allmasquerade, limited_masquerade, and masquerade_entire_domain.
|
||||
|
||||
The masquerade name is not normally canonified, so it is important
|
||||
that it be your One True Name, that is, fully qualified and not a
|
||||
CNAME.
|
||||
CNAME. However, if you use a CNAME, the receiving side may canonify
|
||||
it for you, so don't think you can cheat CNAME mapping this way.
|
||||
|
||||
Normally the only addresses that are masqueraded are those that come
|
||||
from this host (that is, are either unqualified or in $=w, the list
|
||||
|
@ -883,7 +991,7 @@ to have .forward files or aliases. You can do this using
|
|||
define(`LOCAL_RELAY', mailer:hostname)
|
||||
|
||||
The ``mailer:'' can be omitted, in which case the mailer defaults to
|
||||
"smtp". There are some user names that you don't want relayed, perhaps
|
||||
"relay". There are some user names that you don't want relayed, perhaps
|
||||
because of local aliases. A common example is root, which may be
|
||||
locally aliased. You can add entries to this list using
|
||||
|
||||
|
@ -898,13 +1006,13 @@ shared /var/spool/mail scheme, use
|
|||
|
||||
define(`MAIL_HUB', mailer:hostname)
|
||||
|
||||
Again, ``mailer:'' defaults to "smtp". If you define both LOCAL_RELAY
|
||||
Again, ``mailer:'' defaults to "relay". If you define both LOCAL_RELAY
|
||||
and MAIL_HUB _AND_ you have FEATURE(stickyhost), unqualified names will
|
||||
be sent to the LOCAL_RELAY and other local names will be sent to MAIL_HUB.
|
||||
Names in $=L will be delivered locally, so you MUST have aliases or
|
||||
.forward files for them.
|
||||
|
||||
For example, if are on machine mastodon.CS.Berkeley.EDU and you have
|
||||
For example, if you are on machine mastodon.CS.Berkeley.EDU and you have
|
||||
FEATURE(stickyhost), the following combinations of settings will have the
|
||||
indicated effects:
|
||||
|
||||
|
@ -936,6 +1044,12 @@ really want absolutely everything to go to a single central site you will
|
|||
need to unset all the other relays -- or better yet, find or build a
|
||||
minimal config file that does this.
|
||||
|
||||
For duplicate suppression to work properly, the host name is best
|
||||
specified with a terminal dot:
|
||||
|
||||
define(`MAIL_HUB', `host.domain.')
|
||||
note the trailing dot ---^
|
||||
|
||||
|
||||
+-------------------------------+
|
||||
| NON-SMTP BASED CONFIGURATIONS |
|
||||
|
@ -1118,7 +1232,7 @@ for. In particular:
|
|||
version.
|
||||
|
||||
* Make sure that other files that sendmail reads, such as the
|
||||
mailertable, is only writable by trusted system personnel.
|
||||
mailertable, are only writable by trusted system personnel.
|
||||
|
||||
* The queue directory should not be world writable PARTICULARLY
|
||||
if your system allows "file giveaways" (that is, if a non-root
|
||||
|
@ -1319,7 +1433,7 @@ confTRUSTED_USERS Ct class [no default] Names of users to add to
|
|||
the list of trusted users. This list
|
||||
always includes root, uucp, and daemon.
|
||||
See also FEATURE(use_ct_file).
|
||||
confSMTP_MAILER - [smtp] The mailer name used when
|
||||
confSMTP_MAILER - [esmtp] The mailer name used when
|
||||
SMTP connectivity is required.
|
||||
One of "smtp", "smtp8", or "esmtp".
|
||||
confUUCP_MAILER - [uucp-old] The mailer to be used by
|
||||
|
@ -1351,7 +1465,7 @@ confMIN_FREE_BLOCKS MinFreeBlocks [100] Minimum number of free blocks on
|
|||
for the second value now.)
|
||||
confMAX_MESSAGE_SIZE MaxMessageSize [infinite] The maximum size of messages
|
||||
that will be accepted (in bytes).
|
||||
confBLANK_SUB BlankSub [ ] Blank (space) substitution
|
||||
confBLANK_SUB BlankSub [.] Blank (space) substitution
|
||||
character.
|
||||
confCON_EXPENSIVE HoldExpensive [False] Avoid connecting immediately
|
||||
to mailers marked expensive?
|
||||
|
@ -1383,6 +1497,17 @@ confMCI_CACHE_SIZE ConnectionCacheSize
|
|||
[2] Size of open connection cache.
|
||||
confMCI_CACHE_TIMEOUT ConnectionCacheTimeout
|
||||
[5m] Open connection cache timeout.
|
||||
confHOST_STATUS_DIRECTORY HostStatusDirectory
|
||||
[undefined] If set, host status is kept
|
||||
on disk between sendmail runs in the
|
||||
named directory tree. This need not be
|
||||
a full pathname, in which case it is
|
||||
interpreted relative to the queue
|
||||
directory. This option also
|
||||
single-threads connections to each
|
||||
host, i.e., prevents multiple
|
||||
connections to a single server from
|
||||
this client.
|
||||
confUSE_ERRORS_TO* UserErrorsTo [False] Use the Errors-To: header to
|
||||
deliver error messages. This should
|
||||
not be necessary because of general
|
||||
|
@ -1411,6 +1536,18 @@ confSAFE_QUEUE* SuperSafe [True] Commit all messages to disk
|
|||
before forking.
|
||||
confTO_INITIAL Timeout.initial [5m] The timeout waiting for a response
|
||||
on the initial connect.
|
||||
confTO_CONNECT Timeout.connect [0] The timeout waiting for an initial
|
||||
connect() to complete. This can only
|
||||
shorten connection timeouts; the kernel
|
||||
silently enforces an absolute maximum
|
||||
(which varies depending on the system).
|
||||
confTO_ICONNECT Timeout.iconnect
|
||||
[undefined] Like Timeout.connect, but
|
||||
applies only to the very first attempt
|
||||
to connect to a host in a message.
|
||||
This allows a single very fast pass
|
||||
followed by more careful delivery
|
||||
attempts in the future.
|
||||
confTO_HELO Timeout.helo [5m] The timeout waiting for a response
|
||||
to a HELO or EHLO command.
|
||||
confTO_MAIL Timeout.mail [10m] The timeout waiting for a
|
||||
|
@ -1469,6 +1606,13 @@ confTO_QUEUEWARN_NONURGENT
|
|||
Timeout.queuewarn.non-urgent
|
||||
[undefined] As above, for non-urgent
|
||||
(low) priority messages.
|
||||
confTO_HOSTSTATUS Timeout.hoststatus
|
||||
[30m] How long information about host
|
||||
statuses will be maintained before it
|
||||
is considered stale and the host should
|
||||
be retried. This applies both within
|
||||
a single queue run and to persistent
|
||||
information (see below).
|
||||
confTIME_ZONE TimeZoneSpec [USE_SYSTEM] Time zone info -- can be
|
||||
USE_SYSTEM to use the system's idea,
|
||||
USE_TZ to use the user's TZ envariable,
|
||||
|
@ -1486,6 +1630,19 @@ confQUEUE_LA QueueLA [8] Load average at which queue-only
|
|||
function kicks in.
|
||||
confREFUSE_LA RefuseLA [12] Load average at which incoming
|
||||
SMTP connections are refused.
|
||||
confMAX_DAEMON_CHILDREN MaxDaemonChildren
|
||||
[undefined] The maximum number of
|
||||
children the daemon will permit. After
|
||||
this number, connections will be
|
||||
rejected. If not set or <= 0, there is
|
||||
no limit.
|
||||
confCONNECTION_RATE_THROTTLE ConnectionRateThrottle
|
||||
[undefined] The maximum number of
|
||||
connections permitted per second.
|
||||
After this many connections are
|
||||
accepted, further connections will be
|
||||
delayed. If not set or <= 0, there is
|
||||
no limit.
|
||||
confWORK_RECIPIENT_FACTOR
|
||||
RecipientFactor [30000] Cost of each recipient.
|
||||
confSEPARATE_PROC ForkEachJob [False] Run all deliveries in a separate
|
||||
|
@ -1585,6 +1742,39 @@ confDONT_INIT_GROUPS DontInitGroups [False] If set, the initgroups(3)
|
|||
this, agents run on behalf of users
|
||||
will only have their primary
|
||||
(/etc/passwd) group permissions.
|
||||
confUNSAFE_GROUP_WRITES UnsafeGroupWrites
|
||||
[False] If set, group-writable
|
||||
:include: and .forward files are
|
||||
considered "unsafe", that is, programs
|
||||
and files cannot be directly referenced
|
||||
from such files. World-writable files
|
||||
are always considered unsafe.
|
||||
confDOUBLE_BOUNCE_ADDRESS DoubleBounceAddress
|
||||
[postmaster] If an error occurs when
|
||||
sending an error message, send that
|
||||
"double bounce" error message to this
|
||||
address.
|
||||
confRUN_AS_USER RunAsUser [undefined] If set, become this user
|
||||
when reading and delivering mail.
|
||||
Causes all file reads (e.g., .forward
|
||||
and :include: files) to be done as
|
||||
this user. Also, all programs will
|
||||
be run as this user, and all output
|
||||
files will be written as this user.
|
||||
Intended for use only on firewalls
|
||||
where users do not have accounts.
|
||||
confSINGLE_THREAD_DELIVERY SingleThreadDelivery
|
||||
[False] If this option and the
|
||||
HostStatusDirectory option are both
|
||||
set, single thread deliveries to other
|
||||
hosts. That is, don't allow any two
|
||||
sendmails on this host to connect
|
||||
simultaneously to any other single
|
||||
host. This can slow down delivery in
|
||||
some cases, in particular since a
|
||||
cached but otherwise idle connection
|
||||
to a host will prevent other sendmails
|
||||
from connecting to the other host.
|
||||
|
||||
See also the description of OSTYPE for some parameters that can be
|
||||
tweaked (generally pathnames to mailers).
|
||||
|
@ -1710,12 +1900,12 @@ MACROS
|
|||
CLASSES
|
||||
|
||||
A
|
||||
B
|
||||
B domains that are candidates for bestmx lookup
|
||||
C
|
||||
D
|
||||
E addresses that should not seem to come from $M
|
||||
F hosts we forward for
|
||||
G
|
||||
G domains that should be looked up in genericstable
|
||||
H
|
||||
I
|
||||
J
|
||||
|
@ -1736,6 +1926,7 @@ CLASSES
|
|||
Y locally connected smart UUCP hosts
|
||||
Z locally connected domain-ized UUCP hosts
|
||||
. the class containing only a dot
|
||||
[ the class containing only a left bracket
|
||||
|
||||
|
||||
M4 DIVERSIONS
|
||||
|
|
|
@ -44,7 +44,8 @@ divert(-1)
|
|||
# will be forwarded to that machine.
|
||||
#
|
||||
|
||||
VERSIONID(`@(#)chez.cs.mc 8.5 (Berkeley) 8/6/95')
|
||||
divert(0)dnl
|
||||
VERSIONID(`@(#)chez.cs.mc 8.6 (Berkeley) 3/23/96')
|
||||
OSTYPE(bsd4.4)dnl
|
||||
DOMAIN(CS.Berkeley.EDU)dnl
|
||||
define(`LOCAL_RELAY', vangogh.CS.Berkeley.EDU)dnl
|
||||
|
|
|
@ -48,7 +48,8 @@ divert(-1)
|
|||
# Other than these, it should never contain any other lines.
|
||||
#
|
||||
|
||||
VERSIONID(`@(#)clientproto.mc 8.6 (Berkeley) 8/16/95')
|
||||
divert(0)dnl
|
||||
VERSIONID(`@(#)clientproto.mc 8.7 (Berkeley) 3/23/96')
|
||||
|
||||
OSTYPE(unknown)
|
||||
FEATURE(nullclient, mailhost.$m)
|
||||
|
|
|
@ -43,7 +43,8 @@ divert(-1)
|
|||
# to a name of your own choosing.
|
||||
#
|
||||
|
||||
VERSIONID(`@(#)cs-hpux10.mc 8.3 (Berkeley) 8/6/95')
|
||||
divert(0)dnl
|
||||
VERSIONID(`@(#)cs-hpux10.mc 8.4 (Berkeley) 3/23/96')
|
||||
OSTYPE(hpux10)dnl
|
||||
DOMAIN(CS.Berkeley.EDU)dnl
|
||||
define(`MAIL_HUB', mailspool.CS.Berkeley.EDU)dnl
|
||||
|
|
|
@ -43,7 +43,8 @@ divert(-1)
|
|||
# to a name of your own choosing.
|
||||
#
|
||||
|
||||
VERSIONID(`@(#)cs-hpux9.mc 8.4 (Berkeley) 8/6/95')
|
||||
divert(0)dnl
|
||||
VERSIONID(`@(#)cs-hpux9.mc 8.5 (Berkeley) 3/23/96')
|
||||
OSTYPE(hpux9)dnl
|
||||
DOMAIN(CS.Berkeley.EDU)dnl
|
||||
define(`MAIL_HUB', mailspool.CS.Berkeley.EDU)dnl
|
||||
|
|
|
@ -43,7 +43,8 @@ divert(-1)
|
|||
# to a name of your own choosing.
|
||||
#
|
||||
|
||||
VERSIONID(`@(#)cs-osf1.mc 8.3 (Berkeley) 8/6/95')
|
||||
divert(0)dnl
|
||||
VERSIONID(`@(#)cs-osf1.mc 8.4 (Berkeley) 3/23/96')
|
||||
OSTYPE(osf1)dnl
|
||||
DOMAIN(CS.Berkeley.EDU)dnl
|
||||
MAILER(local)dnl
|
||||
|
|
|
@ -43,7 +43,8 @@ divert(-1)
|
|||
# to a name of your own choosing.
|
||||
#
|
||||
|
||||
VERSIONID(`@(#)cs-solaris2.mc 8.2 (Berkeley) 8/6/95')
|
||||
divert(0)dnl
|
||||
VERSIONID(`@(#)cs-solaris2.mc 8.3 (Berkeley) 3/23/96')
|
||||
OSTYPE(solaris2)dnl
|
||||
DOMAIN(CS.Berkeley.EDU)dnl
|
||||
MAILER(local)dnl
|
||||
|
|
|
@ -43,7 +43,8 @@ divert(-1)
|
|||
# to a name of your own choosing.
|
||||
#
|
||||
|
||||
VERSIONID(`@(#)cs-sunos4.1.mc 8.3 (Berkeley) 8/6/95')
|
||||
divert(0)dnl
|
||||
VERSIONID(`@(#)cs-sunos4.1.mc 8.4 (Berkeley) 3/23/96')
|
||||
OSTYPE(sunos4.1)dnl
|
||||
DOMAIN(CS.Berkeley.EDU)dnl
|
||||
MAILER(local)dnl
|
||||
|
|
|
@ -43,7 +43,8 @@ divert(-1)
|
|||
# to a name of your own choosing.
|
||||
#
|
||||
|
||||
VERSIONID(`@(#)cs-ultrix4.mc 8.3 (Berkeley) 8/6/95')
|
||||
divert(0)dnl
|
||||
VERSIONID(`@(#)cs-ultrix4.mc 8.4 (Berkeley) 3/23/96')
|
||||
OSTYPE(ultrix4)dnl
|
||||
DOMAIN(CS.Berkeley.EDU)dnl
|
||||
MAILER(local)dnl
|
||||
|
|
|
@ -26,7 +26,8 @@ divert(-1)
|
|||
# exclusively for local mail.
|
||||
#
|
||||
|
||||
VERSIONID(`@(#)cyrusproto.mc 8.2 (Carnegie Mellon) @(#)cyrusproto.mc 8.2')
|
||||
divert(0)dnl
|
||||
VERSIONID(`@(#)cyrusproto.mc 8.3 (Carnegie Mellon) @(#)cyrusproto.mc 8.3')
|
||||
define(`confBIND_OPTS',`-DNSRCH -DEFNAMES')
|
||||
FEATURE(nouucp)
|
||||
FEATURE(nocanonify)
|
||||
|
|
|
@ -41,7 +41,8 @@ divert(-1)
|
|||
# and do the modifications there.
|
||||
#
|
||||
|
||||
VERSIONID(`@(#)generic-bsd4.4.mc 8.1 (Berkeley) 9/12/95')
|
||||
divert(0)dnl
|
||||
VERSIONID(`@(#)generic-bsd4.4.mc 8.2 (Berkeley) 3/23/96')
|
||||
OSTYPE(bsd4.4)dnl
|
||||
DOMAIN(generic)dnl
|
||||
MAILER(local)dnl
|
||||
|
|
|
@ -40,7 +40,8 @@ divert(-1)
|
|||
# and do the modifications there.
|
||||
#
|
||||
|
||||
VERSIONID(`@(#)generic-hpux10.mc 8.2 (Berkeley) 8/6/95')
|
||||
divert(0)dnl
|
||||
VERSIONID(`@(#)generic-hpux10.mc 8.3 (Berkeley) 3/23/96')
|
||||
OSTYPE(hpux10)dnl
|
||||
DOMAIN(generic)dnl
|
||||
MAILER(local)dnl
|
||||
|
|
|
@ -40,7 +40,8 @@ divert(-1)
|
|||
# and do the modifications there.
|
||||
#
|
||||
|
||||
VERSIONID(`@(#)generic-hpux9.mc 8.2 (Berkeley) 8/6/95')
|
||||
divert(0)dnl
|
||||
VERSIONID(`@(#)generic-hpux9.mc 8.3 (Berkeley) 3/23/96')
|
||||
OSTYPE(hpux9)dnl
|
||||
DOMAIN(generic)dnl
|
||||
MAILER(local)dnl
|
||||
|
|
|
@ -0,0 +1,48 @@
|
|||
divert(-1)
|
||||
#
|
||||
# Copyright (c) 1983 Eric P. Allman
|
||||
# Copyright (c) 1988, 1993
|
||||
# The Regents of the University of California. All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions
|
||||
# are met:
|
||||
# 1. Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
# 2. Redistributions in binary form must reproduce the above copyright
|
||||
# notice, this list of conditions and the following disclaimer in the
|
||||
# documentation and/or other materials provided with the distribution.
|
||||
# 3. All advertising materials mentioning features or use of this software
|
||||
# must display the following acknowledgement:
|
||||
# This product includes software developed by the University of
|
||||
# California, Berkeley and its contributors.
|
||||
# 4. Neither the name of the University nor the names of its contributors
|
||||
# may be used to endorse or promote products derived from this software
|
||||
# without specific prior written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
|
||||
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
# ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
|
||||
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
# SUCH DAMAGE.
|
||||
#
|
||||
|
||||
#
|
||||
# This is a generic configuration file for NEXTSTEP 3.3 systems.
|
||||
# It has support for local and SMTP mail only. If you want to
|
||||
# customize it, copy it to a name appropriate for your environment
|
||||
# and do the modifications there.
|
||||
#
|
||||
|
||||
divert(0)dnl
|
||||
VERSIONID(`@(#)generic-nextstep3.3.mc 8.2 (Berkeley) 3/23/96')
|
||||
OSTYPE(nextstep)dnl
|
||||
DOMAIN(generic)dnl
|
||||
MAILER(local)dnl
|
||||
MAILER(smtp)dnl
|
|
@ -40,7 +40,8 @@ divert(-1)
|
|||
# and do the modifications there.
|
||||
#
|
||||
|
||||
VERSIONID(`@(#)generic-osf1.mc 8.2 (Berkeley) 8/6/95')
|
||||
divert(0)dnl
|
||||
VERSIONID(`@(#)generic-osf1.mc 8.3 (Berkeley) 3/23/96')
|
||||
OSTYPE(osf1)dnl
|
||||
DOMAIN(generic)dnl
|
||||
MAILER(local)dnl
|
||||
|
|
|
@ -40,7 +40,8 @@ divert(-1)
|
|||
# and do the modifications there.
|
||||
#
|
||||
|
||||
VERSIONID(`@(#)generic-solaris2.mc 8.2 (Berkeley) 8/6/95')
|
||||
divert(0)dnl
|
||||
VERSIONID(`@(#)generic-solaris2.mc 8.3 (Berkeley) 3/23/96')
|
||||
OSTYPE(solaris2)dnl
|
||||
DOMAIN(generic)dnl
|
||||
MAILER(local)dnl
|
||||
|
|
|
@ -40,7 +40,8 @@ divert(-1)
|
|||
# and do the modifications there.
|
||||
#
|
||||
|
||||
VERSIONID(`@(#)generic-sunos4.1.mc 8.2 (Berkeley) 8/6/95')
|
||||
divert(0)dnl
|
||||
VERSIONID(`@(#)generic-sunos4.1.mc 8.3 (Berkeley) 3/23/96')
|
||||
OSTYPE(sunos4.1)dnl
|
||||
DOMAIN(generic)dnl
|
||||
MAILER(local)dnl
|
||||
|
|
|
@ -40,7 +40,8 @@ divert(-1)
|
|||
# and do the modifications there.
|
||||
#
|
||||
|
||||
VERSIONID(`@(#)generic-ultrix4.mc 8.2 (Berkeley) 8/6/95')
|
||||
divert(0)dnl
|
||||
VERSIONID(`@(#)generic-ultrix4.mc 8.3 (Berkeley) 3/23/96')
|
||||
OSTYPE(ultrix4)dnl
|
||||
DOMAIN(generic)dnl
|
||||
MAILER(local)dnl
|
||||
|
|
|
@ -42,7 +42,8 @@ divert(-1)
|
|||
# This file is for the backup CS Division mail server.
|
||||
#
|
||||
|
||||
VERSIONID(`@(#)huginn.cs.mc 8.6 (Berkeley) 8/25/95')
|
||||
divert(0)dnl
|
||||
VERSIONID(`@(#)huginn.cs.mc 8.7 (Berkeley) 3/23/96')
|
||||
OSTYPE(hpux9)dnl
|
||||
DOMAIN(CS.Berkeley.EDU)dnl
|
||||
MASQUERADE_AS(CS.Berkeley.EDU)dnl
|
||||
|
|
|
@ -42,7 +42,8 @@ divert(-1)
|
|||
# This file is for the primary CS Division mail server.
|
||||
#
|
||||
|
||||
VERSIONID(`@(#)mail.cs.mc 8.9 (Berkeley) 8/25/95')
|
||||
divert(0)dnl
|
||||
VERSIONID(`@(#)mail.cs.mc 8.10 (Berkeley) 3/23/96')
|
||||
OSTYPE(ultrix4)dnl
|
||||
DOMAIN(Berkeley.EDU)dnl
|
||||
MASQUERADE_AS(CS.Berkeley.EDU)dnl
|
||||
|
|
|
@ -42,7 +42,8 @@ divert(-1)
|
|||
# This file is for the primary EECS mail server.
|
||||
#
|
||||
|
||||
VERSIONID(`@(#)mail.eecs.mc 8.9 (Berkeley) 8/25/95')
|
||||
divert(0)dnl
|
||||
VERSIONID(`@(#)mail.eecs.mc 8.10 (Berkeley) 3/23/96')
|
||||
OSTYPE(ultrix4)dnl
|
||||
DOMAIN(EECS.Berkeley.EDU)dnl
|
||||
MASQUERADE_AS(EECS.Berkeley.EDU)dnl
|
||||
|
|
|
@ -44,7 +44,8 @@ divert(-1)
|
|||
# for back compatibility.
|
||||
#
|
||||
|
||||
VERSIONID(`@(#)mailspool.cs.mc 8.3 (Berkeley) 8/6/95')
|
||||
divert(0)dnl
|
||||
VERSIONID(`@(#)mailspool.cs.mc 8.4 (Berkeley) 3/23/96')
|
||||
OSTYPE(sunos4.1)dnl
|
||||
DOMAIN(CS.Berkeley.EDU)dnl
|
||||
MAILER(local)dnl
|
||||
|
|
|
@ -44,7 +44,8 @@ divert(-1)
|
|||
# will be forwarded to that machine.
|
||||
#
|
||||
|
||||
VERSIONID(`@(#)python.cs.mc 8.3 (Berkeley) 8/6/95')
|
||||
divert(0)dnl
|
||||
VERSIONID(`@(#)python.cs.mc 8.4 (Berkeley) 3/23/96')
|
||||
OSTYPE(bsd4.4)dnl
|
||||
DOMAIN(CS.Berkeley.EDU)dnl
|
||||
define(`LOCAL_RELAY', vangogh.CS.Berkeley.EDU)dnl
|
||||
|
|
|
@ -43,7 +43,8 @@ divert(-1)
|
|||
# to a name of your own choosing.
|
||||
#
|
||||
|
||||
VERSIONID(`@(#)s2k-osf1.mc 8.3 (Berkeley) 8/6/95')
|
||||
divert(0)dnl
|
||||
VERSIONID(`@(#)s2k-osf1.mc 8.4 (Berkeley) 3/23/96')
|
||||
OSTYPE(osf1)dnl
|
||||
DOMAIN(S2K.Berkeley.EDU)dnl
|
||||
MAILER(local)dnl
|
||||
|
|
|
@ -43,7 +43,8 @@ divert(-1)
|
|||
# to a name of your own choosing.
|
||||
#
|
||||
|
||||
VERSIONID(`@(#)s2k-ultrix4.mc 8.3 (Berkeley) 8/6/95')
|
||||
divert(0)dnl
|
||||
VERSIONID(`@(#)s2k-ultrix4.mc 8.4 (Berkeley) 3/23/96')
|
||||
OSTYPE(ultrix4)dnl
|
||||
DOMAIN(S2K.Berkeley.EDU)dnl
|
||||
MAILER(local)dnl
|
||||
|
|
|
@ -46,7 +46,8 @@ divert(-1)
|
|||
# will not trash your changes.
|
||||
#
|
||||
|
||||
VERSIONID(`@(#)tcpproto.mc 8.4 (Berkeley) 8/6/95')
|
||||
divert(0)dnl
|
||||
VERSIONID(`@(#)tcpproto.mc 8.5 (Berkeley) 3/23/96')
|
||||
OSTYPE(unknown)
|
||||
FEATURE(nouucp)
|
||||
MAILER(local)
|
||||
|
|
|
@ -41,7 +41,8 @@ divert(-1)
|
|||
# `SITECONFIG'. See also ucbvax.mc.
|
||||
#
|
||||
|
||||
VERSIONID(`@(#)ucbarpa.mc 8.3 (Berkeley) 8/6/95')
|
||||
divert(0)dnl
|
||||
VERSIONID(`@(#)ucbarpa.mc 8.4 (Berkeley) 3/23/96')
|
||||
DOMAIN(CS.Berkeley.EDU)dnl
|
||||
OSTYPE(bsd4.4)dnl
|
||||
MAILER(local)dnl
|
||||
|
|
|
@ -42,7 +42,8 @@ divert(-1)
|
|||
# `SITECONFIG' for routing of UUCP within your domain.
|
||||
#
|
||||
|
||||
VERSIONID(`@(#)ucbvax.mc 8.5 (Berkeley) 8/25/95')
|
||||
divert(0)dnl
|
||||
VERSIONID(`@(#)ucbvax.mc 8.6 (Berkeley) 3/23/96')
|
||||
OSTYPE(bsd4.3)
|
||||
DOMAIN(CS.Berkeley.EDU)
|
||||
MASQUERADE_AS(CS.Berkeley.EDU)
|
||||
|
|
|
@ -46,7 +46,8 @@ divert(-1)
|
|||
# will not trash your changes.
|
||||
#
|
||||
|
||||
VERSIONID(`@(#)uucpproto.mc 8.5 (Berkeley) 8/6/95')
|
||||
divert(0)dnl
|
||||
VERSIONID(`@(#)uucpproto.mc 8.6 (Berkeley) 3/23/96')
|
||||
OSTYPE(unknown)
|
||||
FEATURE(nodns)dnl
|
||||
MAILER(local)dnl
|
||||
|
|
|
@ -43,7 +43,8 @@ divert(-1)
|
|||
# set up (to stress sendmail) and accepts mail for some other machines.
|
||||
#
|
||||
|
||||
VERSIONID(`@(#)vangogh.cs.mc 8.4 (Berkeley) 8/6/95')
|
||||
divert(0)dnl
|
||||
VERSIONID(`@(#)vangogh.cs.mc 8.5 (Berkeley) 3/23/96')
|
||||
DOMAIN(CS.Berkeley.EDU)dnl
|
||||
OSTYPE(bsd4.4)dnl
|
||||
MAILER(local)dnl
|
||||
|
|
|
@ -41,8 +41,7 @@ divert(-1)
|
|||
# files.
|
||||
#
|
||||
divert(0)
|
||||
VERSIONID(`@(#)generic.m4 8.2 (Berkeley) 4/21/95')
|
||||
VERSIONID(`@(#)generic.m4 8.3 (Berkeley) 3/24/96')
|
||||
define(`confFORWARD_PATH', `$z/.forward.$w:$z/.forward')dnl
|
||||
define(`confCW_FILE', `-o /etc/sendmail.cw')dnl
|
||||
FEATURE(redirect)dnl
|
||||
FEATURE(use_cw_file)dnl
|
||||
|
|
|
@ -34,12 +34,16 @@ divert(-1)
|
|||
#
|
||||
|
||||
divert(0)
|
||||
VERSIONID(`@(#)bestmx_is_local.m4 8.2 (Berkeley) 10/29/95')
|
||||
VERSIONID(`@(#)bestmx_is_local.m4 8.3 (Berkeley) 5/11/96')
|
||||
divert(-1)
|
||||
|
||||
LOCAL_CONFIG
|
||||
# turn on bestMX lookup table
|
||||
Kbestmx bestmx
|
||||
|
||||
# limit bestmx to these domains
|
||||
CB`'_ARG_
|
||||
|
||||
LOCAL_NET_CONFIG
|
||||
|
||||
# If we are the best MX for a site, then we want to accept
|
||||
|
@ -50,9 +54,13 @@ LOCAL_NET_CONFIG
|
|||
# Warning: this may generate a lot of extra DNS traffic -- a
|
||||
# lower cost method is to list all the expected best MX hosts
|
||||
# in $=w. This should be fine (and easier to administer) for
|
||||
# low to medium traffic hosts.
|
||||
# low to medium traffic hosts. If you use the limited bestmx
|
||||
# by passing in a set of possible domains it will improve things.
|
||||
|
||||
ifelse(_ARG_, `', `', `#')dnl unlimited bestmx
|
||||
R$* < @ $* > $* $: $1 < @ $2 @@ $(bestmx $2 $) > $3
|
||||
ifelse(_ARG_, `', `#', `')dnl limit bestmx to $=B
|
||||
R$* < @ $* $=B > $* $: $1 < @ $2 @@ $(bestmx $2 $3 $) > $4
|
||||
R$* $=O $* < @ $* @@ $=w . > $* $@ $>97 $1 $2 $3
|
||||
R$* < @ $* @@ $=w . > $* $#local $: $1
|
||||
R$* < @ $* @@ $* > $* $: $1 < @ $2 > $4
|
||||
|
|
|
@ -0,0 +1,40 @@
|
|||
divert(-1)
|
||||
#
|
||||
# Copyright (c) 1983 Eric P. Allman
|
||||
# Copyright (c) 1988, 1993
|
||||
# The Regents of the University of California. All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions
|
||||
# are met:
|
||||
# 1. Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
# 2. Redistributions in binary form must reproduce the above copyright
|
||||
# notice, this list of conditions and the following disclaimer in the
|
||||
# documentation and/or other materials provided with the distribution.
|
||||
# 3. All advertising materials mentioning features or use of this software
|
||||
# must display the following acknowledgement:
|
||||
# This product includes software developed by the University of
|
||||
# California, Berkeley and its contributors.
|
||||
# 4. Neither the name of the University nor the names of its contributors
|
||||
# may be used to endorse or promote products derived from this software
|
||||
# without specific prior written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
|
||||
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
# ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
|
||||
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
# SUCH DAMAGE.
|
||||
#
|
||||
|
||||
divert(0)
|
||||
VERSIONID(`@(#)genericstable.m4 8.1 (Berkeley) 2/11/96')
|
||||
divert(-1)
|
||||
|
||||
define(`GENERICS_TABLE', ifelse(_ARG_, `', `hash -o /etc/genericstable', `_ARG_'))dnl
|
|
@ -0,0 +1,40 @@
|
|||
divert(-1)
|
||||
#
|
||||
# Copyright (c) 1983 Eric P. Allman
|
||||
# Copyright (c) 1988, 1993
|
||||
# The Regents of the University of California. All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions
|
||||
# are met:
|
||||
# 1. Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
# 2. Redistributions in binary form must reproduce the above copyright
|
||||
# notice, this list of conditions and the following disclaimer in the
|
||||
# documentation and/or other materials provided with the distribution.
|
||||
# 3. All advertising materials mentioning features or use of this software
|
||||
# must display the following acknowledgement:
|
||||
# This product includes software developed by the University of
|
||||
# California, Berkeley and its contributors.
|
||||
# 4. Neither the name of the University nor the names of its contributors
|
||||
# may be used to endorse or promote products derived from this software
|
||||
# without specific prior written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
|
||||
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
# ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
|
||||
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
# SUCH DAMAGE.
|
||||
#
|
||||
|
||||
divert(0)
|
||||
VERSIONID(`@(#)limited_masquerade.m4 8.1 (Berkeley) 2/11/96')
|
||||
divert(-1)
|
||||
|
||||
define(`_LIMITED_MASQUERADE_', 1)
|
|
@ -34,11 +34,14 @@ divert(-1)
|
|||
#
|
||||
|
||||
divert(0)
|
||||
VERSIONID(`@(#)local_procmail.m4 8.3 (Berkeley) 10/29/95')
|
||||
VERSIONID(`@(#)local_procmail.m4 8.5 (Berkeley) 2/12/96')
|
||||
divert(-1)
|
||||
|
||||
define(`PROCMAIL_PATH',
|
||||
ifelse(_ARG_, `', `/usr/local/bin/procmail', `_ARG_'))
|
||||
define(`LOCAL_MAILER_PATH',
|
||||
ifelse(_ARG_, `',
|
||||
ifdef(`PROCMAIL_MAILER_PATH',
|
||||
PROCMAIL_MAILER_PATH,
|
||||
`/usr/local/bin/procmail'),
|
||||
_ARG_))
|
||||
define(`LOCAL_MAILER_FLAGS', `SPfhn')
|
||||
define(`LOCAL_MAILER_PATH', PROCMAIL_PATH)
|
||||
define(`LOCAL_MAILER_ARGS', `procmail -Y -a $h -d $u')
|
||||
|
|
|
@ -0,0 +1,40 @@
|
|||
divert(-1)
|
||||
#
|
||||
# Copyright (c) 1983 Eric P. Allman
|
||||
# Copyright (c) 1988, 1993
|
||||
# The Regents of the University of California. All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions
|
||||
# are met:
|
||||
# 1. Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
# 2. Redistributions in binary form must reproduce the above copyright
|
||||
# notice, this list of conditions and the following disclaimer in the
|
||||
# documentation and/or other materials provided with the distribution.
|
||||
# 3. All advertising materials mentioning features or use of this software
|
||||
# must display the following acknowledgement:
|
||||
# This product includes software developed by the University of
|
||||
# California, Berkeley and its contributors.
|
||||
# 4. Neither the name of the University nor the names of its contributors
|
||||
# may be used to endorse or promote products derived from this software
|
||||
# without specific prior written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
|
||||
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
# ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
|
||||
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
# SUCH DAMAGE.
|
||||
#
|
||||
|
||||
divert(0)
|
||||
VERSIONID(`@(#)masquerade_entire_domain.m4 8.1 (Berkeley) 2/11/96')
|
||||
divert(-1)
|
||||
|
||||
define(`_MASQUERADE_ENTIRE_DOMAIN_', 1)
|
|
@ -45,7 +45,7 @@ POPDIVERT
|
|||
# sendmail.
|
||||
#
|
||||
|
||||
VERSIONID(`@(#)nullclient.m4 8.6 (Berkeley) 6/29/95')
|
||||
VERSIONID(`@(#)nullclient.m4 8.7 (Berkeley) 2/11/96')
|
||||
|
||||
PUSHDIVERT(6)
|
||||
# hub host (to which all mail is sent)
|
||||
|
@ -65,7 +65,8 @@ ifdef(`confRELAY_MAILER',,
|
|||
`define(`confRELAY_MAILER', `nullclient')')dnl
|
||||
ifdef(`confFROM_HEADER',,
|
||||
`define(`confFROM_HEADER', <$g>)')dnl
|
||||
ifdef(`SMTP_MAILER_ARGS',, `define(`SMTP_MAILER_ARGS', `IPC $h')')dnl
|
||||
|
||||
Mnullclient, P=[IPC], F=CONCAT(mDFMuXa, SMTP_MAILER_FLAGS),ifdef(`SMTP_MAILER_MAX', ` M=SMTP_MAILER_MAX,')
|
||||
A=IPC $h
|
||||
A=SMTP_MAILER_ARGS
|
||||
POPDIVERT
|
||||
|
|
|
@ -34,7 +34,7 @@ divert(-1)
|
|||
#
|
||||
|
||||
divert(0)
|
||||
VERSIONID(`@(#)redirect.m4 8.4 (Berkeley) 6/25/95')
|
||||
VERSIONID(`@(#)redirect.m4 8.5 (Berkeley) 8/17/96')
|
||||
divert(-1)
|
||||
|
||||
|
||||
|
@ -42,7 +42,7 @@ PUSHDIVERT(3)
|
|||
# addresses sent to foo@host.REDIRECT will give a 551 error code
|
||||
R$* < @ $+ .REDIRECT. > $: $1 < @ $2 . REDIRECT . > < ${opMode} >
|
||||
R$* < @ $+ .REDIRECT. > <i> $: $1 < @ $2 . REDIRECT. >
|
||||
R$* < @ $+ .REDIRECT. > < $- > $# error $@ 5.1.1 $: "551 User not local; please try " <$1@$2>
|
||||
R$* < @ $+ .REDIRECT. > < $- > $# error $@ 5.1.1 $: "551 User has moved; please try " <$1@$2>
|
||||
POPDIVERT
|
||||
|
||||
PUSHDIVERT(6)
|
||||
|
|
|
@ -0,0 +1,40 @@
|
|||
divert(-1)
|
||||
#
|
||||
# Copyright (c) 1983 Eric P. Allman
|
||||
# Copyright (c) 1988, 1993
|
||||
# The Regents of the University of California. All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions
|
||||
# are met:
|
||||
# 1. Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
# 2. Redistributions in binary form must reproduce the above copyright
|
||||
# notice, this list of conditions and the following disclaimer in the
|
||||
# documentation and/or other materials provided with the distribution.
|
||||
# 3. All advertising materials mentioning features or use of this software
|
||||
# must display the following acknowledgement:
|
||||
# This product includes software developed by the University of
|
||||
# California, Berkeley and its contributors.
|
||||
# 4. Neither the name of the University nor the names of its contributors
|
||||
# may be used to endorse or promote products derived from this software
|
||||
# without specific prior written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
|
||||
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
# ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
|
||||
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
# SUCH DAMAGE.
|
||||
#
|
||||
|
||||
divert(0)
|
||||
VERSIONID(`@(#)virtusertable.m4 8.1 (Berkeley) 2/11/96')
|
||||
divert(-1)
|
||||
|
||||
define(`VIRTUSER_TABLE', ifelse(_ARG_, `', `hash -o /etc/virtusertable', `_ARG_'))dnl
|
|
@ -85,9 +85,14 @@ define(`LOCAL_RULE_2',
|
|||
##########################################
|
||||
|
||||
S2
|
||||
')
|
||||
define(`LOCAL_RULESETS',
|
||||
`divert(9)
|
||||
|
||||
')
|
||||
define(`LOCAL_RULE_3', `divert(2)')
|
||||
define(`LOCAL_CONFIG', `divert(6)')
|
||||
define(`MAILER_DEFINITIONS', `divert(7)')
|
||||
define(`LOCAL_NET_CONFIG', `define(`_LOCAL_RULES_', 1)divert(1)')
|
||||
define(`UUCPSMTP', `R DOL(*) < @ $1 .UUCP > DOL(*) DOL(1) < @ $2 > DOL(2)')
|
||||
define(`CONCAT', `$1$2$3$4$5$6$7')
|
||||
|
@ -109,11 +114,16 @@ define(`MASQUERADE_DOMAIN', `PUSHDIVERT(5)CM$1
|
|||
POPDIVERT`'dnl')
|
||||
define(`MASQUERADE_DOMAIN_FILE', `PUSHDIVERT(5)FM$1
|
||||
POPDIVERT`'dnl')
|
||||
define(`GENERICS_DOMAIN', `PUSHDIVERT(5)CG$1
|
||||
POPDIVERT`'dnl')
|
||||
define(`GENERICS_DOMAIN_FILE', `PUSHDIVERT(5)FG$1
|
||||
POPDIVERT`'dnl')
|
||||
define(`_OPTINS', `ifdef(`$1', `$2$1$3')')
|
||||
|
||||
m4wrap(`include(_CF_DIR_`m4/proto.m4')')
|
||||
|
||||
# set up default values for options
|
||||
define(`ALIAS_FILE', `/etc/aliases')
|
||||
define(`confMAILER_NAME', ``MAILER-DAEMON'')
|
||||
define(`confFROM_LINE', `From $g $d')
|
||||
define(`confOPERATORS', `.:%@!^/[]+')
|
||||
|
@ -144,4 +154,4 @@ define(`confMIME_FORMAT_ERRORS', `True')
|
|||
define(`confFORWARD_PATH', `$z/.forward.$w:$z/.forward')
|
||||
|
||||
divert(0)dnl
|
||||
VERSIONID(`@(#)cfhead.m4 8.3 (Berkeley) 9/15/95')
|
||||
VERSIONID(`@(#)cfhead.m4 8.6 (Berkeley) 6/19/96')
|
||||
|
|
|
@ -34,7 +34,7 @@ divert(-1)
|
|||
#
|
||||
divert(0)
|
||||
|
||||
VERSIONID(`@(#)nullrelay.m4 8.10 (Berkeley) 9/29/95')
|
||||
VERSIONID(`@(#)nullrelay.m4 8.12 (Berkeley) 10/12/96')
|
||||
|
||||
#
|
||||
# This configuration applies only to relay-only hosts. They send
|
||||
|
@ -74,25 +74,30 @@ R$* ; $: $1 strip trailing semi
|
|||
R$@ $@ :; <@>
|
||||
|
||||
# basic textual canonicalization -- note RFC733 heuristic here
|
||||
R$*<$*>$*<$*>$* $2$3<$4>$5 strip multiple <> <>
|
||||
R$*<$*<$+>$*>$* <$3>$5 2-level <> nesting
|
||||
R$*<>$* $@ <@> MAIL FROM:<> case
|
||||
R$*<$+>$* $2 basic RFC821/822 parsing
|
||||
R$* $: < $1 > housekeeping <>
|
||||
R$+ < $* > < $2 > strip excess on left
|
||||
R< $* > $+ < $1 > strip excess on right
|
||||
R<> $@ < @ > MAIL FROM:<> case
|
||||
R< $+ > $: $1 remove housekeeping <>
|
||||
|
||||
ifdef(`_NO_CANONIFY_', `dnl',
|
||||
`# eliminate local host if present
|
||||
R@ $=w $=: $+ $@ @ $M $2 $3 @thishost ...
|
||||
R@ $+ $@ @ $1 @somewhere ...
|
||||
|
||||
R$=E @ $=w $@ $1 @ $2 leave exposed
|
||||
R$+ @ $=w $@ $1 @ $M ...@thishost
|
||||
R$+ @ $+ $@ $1 @ $2 ...@somewhere
|
||||
|
||||
R$=w ! $=E $@ $2 @ $1 leave exposed
|
||||
R$=w ! $+ $@ $2 @ $M thishost!...
|
||||
R$+ ! $+ $@ $1 ! $2 @ $M somewhere ! ...
|
||||
|
||||
R$=E % $=w $@ $1 @ $2 leave exposed
|
||||
R$+ % $=w $@ $1 @ $M ...%thishost
|
||||
R$+ % $+ $@ $1 @ $2 ...%somewhere
|
||||
|
||||
R$=E $@ $1 @ $j leave exposed
|
||||
R$+ $@ $1 @ $M unadorned user')
|
||||
|
||||
|
||||
|
|
|
@ -34,12 +34,12 @@ divert(-1)
|
|||
#
|
||||
divert(0)
|
||||
|
||||
VERSIONID(`@(#)proto.m4 8.100 (Berkeley) 12/3/95')
|
||||
VERSIONID(`@(#)proto.m4 8.134 (Berkeley) 10/13/96')
|
||||
|
||||
MAILER(local)dnl
|
||||
|
||||
# level 6 config file format
|
||||
V6/Berkeley
|
||||
# level 7 config file format
|
||||
V7/Berkeley
|
||||
divert(-1)
|
||||
|
||||
# do some sanity checking
|
||||
|
@ -47,7 +47,7 @@ ifdef(`__OSTYPE__',,
|
|||
`errprint(`*** ERROR: No system type defined (use OSTYPE macro)')')
|
||||
|
||||
# pick our default mailers
|
||||
ifdef(`confSMTP_MAILER',, `define(`confSMTP_MAILER', `smtp')')
|
||||
ifdef(`confSMTP_MAILER',, `define(`confSMTP_MAILER', `esmtp')')
|
||||
ifdef(`confLOCAL_MAILER',, `define(`confLOCAL_MAILER', `local')')
|
||||
ifdef(`confRELAY_MAILER',,
|
||||
`define(`confRELAY_MAILER',
|
||||
|
@ -94,7 +94,7 @@ Fw`'confCW_FILE',
|
|||
`dnl')
|
||||
|
||||
# my official domain name
|
||||
# ... define this only if sendmail cannot automatically determine your domain
|
||||
# ... `define' this only if sendmail cannot automatically determine your domain
|
||||
ifdef(`confDOMAIN_NAME', `Dj`'confDOMAIN_NAME', `#Dj$w.Foo.COM')
|
||||
|
||||
ifdef(`_NULL_CLIENT_ONLY_', `divert(-1)')dnl
|
||||
|
@ -142,6 +142,9 @@ CO @ % ifdef(`_NO_UUCP_', `', `!')
|
|||
# a class with just dot (for identifying canonical names)
|
||||
C..
|
||||
|
||||
# a class with just a left bracket (for identifying domain literals)
|
||||
C[[
|
||||
|
||||
# Mailer table (overriding domains)
|
||||
ifdef(`MAILER_TABLE',
|
||||
`Kmailertable MAILER_TABLE',
|
||||
|
@ -152,6 +155,16 @@ ifdef(`DOMAIN_TABLE',
|
|||
`Kdomaintable DOMAIN_TABLE',
|
||||
`#Kdomaintable dbm /etc/domaintable')
|
||||
|
||||
# Generics table (mapping outgoing addresses)
|
||||
ifdef(`GENERICS_TABLE',
|
||||
`Kgenerics GENERICS_TABLE',
|
||||
`#Kgenerics dbm /etc/genericstable')
|
||||
|
||||
# Virtual user table (maps incoming users)
|
||||
ifdef(`VIRTUSER_TABLE',
|
||||
`Kvirtuser VIRTUSER_TABLE',
|
||||
`#Kvirtuser dbm /etc/virtusertable')
|
||||
|
||||
# who I send unqualified names to (null means deliver locally)
|
||||
DR`'ifdef(`LOCAL_RELAY', LOCAL_RELAY)
|
||||
|
||||
|
@ -193,7 +206,7 @@ ifdef(`_NULL_CLIENT_ONLY_', `dnl', `
|
|||
_OPTION(AliasWait, `confALIAS_WAIT', 5m)
|
||||
|
||||
# location of alias file
|
||||
O AliasFile=ifdef(`ALIAS_FILE', `ALIAS_FILE', /etc/aliases)
|
||||
_OPTION(AliasFile, `ALIAS_FILE', /etc/aliases)
|
||||
')
|
||||
# minimum number of free blocks on filesystem
|
||||
_OPTION(MinFreeBlocks, `confMIN_FREE_BLOCKS', 100)
|
||||
|
@ -255,6 +268,12 @@ _OPTION(ConnectionCacheSize, `confMCI_CACHE_SIZE', 2)
|
|||
# open connection cache timeout
|
||||
_OPTION(ConnectionCacheTimeout, `confMCI_CACHE_TIMEOUT', 5m)
|
||||
|
||||
# persistent host status directory
|
||||
_OPTION(HostStatusDirectory, `confHOST_STATUS_DIRECTORY', .hoststat)
|
||||
|
||||
# single thread deliveries (requires HostStatusDirectory)?
|
||||
_OPTION(SingleThreadDelivery, `confSINGLE_THREAD_DELIVERY')
|
||||
|
||||
# use Errors-To: header?
|
||||
_OPTION(UseErrorsTo, `confUSE_ERRORS_TO')
|
||||
|
||||
|
@ -287,6 +306,8 @@ O QueueDirectory=ifdef(`QUEUE_DIR', QUEUE_DIR, /var/spool/mqueue)
|
|||
|
||||
# timeouts (many of these)
|
||||
_OPTION(Timeout.initial, `confTO_INITIAL', 5m)
|
||||
_OPTION(Timeout.connect, `confTO_CONNECT', 5m)
|
||||
_OPTION(Timeout.iconnect, `confTO_ICONNECT', 5m)
|
||||
_OPTION(Timeout.helo, `confTO_HELO', 5m)
|
||||
_OPTION(Timeout.mail, `confTO_MAIL', 10m)
|
||||
_OPTION(Timeout.rcpt, `confTO_RCPT', 1h)
|
||||
|
@ -307,6 +328,7 @@ _OPTION(Timeout.queuewarn, `confTO_QUEUEWARN', 4h)
|
|||
_OPTION(Timeout.queuewarn.normal, `confTO_QUEUEWARN_NORMAL', 4h)
|
||||
_OPTION(Timeout.queuewarn.urgent, `confTO_QUEUEWARN_URGENT', 1h)
|
||||
_OPTION(Timeout.queuewarn.non-urgent, `confTO_QUEUEWARN_NONURGENT', 12h)
|
||||
_OPTION(Timeout.hoststatus, `confTO_HOSTSTATUS', 30m)
|
||||
|
||||
# should we not prune routes in route-addr syntax addresses?
|
||||
_OPTION(DontPruneRoutes, `confDONT_PRUNE_ROUTES')
|
||||
|
@ -343,6 +365,12 @@ _OPTION(QueueLA, `confQUEUE_LA', 8)
|
|||
# load average at which we refuse connections
|
||||
_OPTION(RefuseLA, `confREFUSE_LA', 12)
|
||||
|
||||
# maximum number of children we allow at one time
|
||||
_OPTION(MaxDaemonChildren, `confMAX_DAEMON_CHILDREN', 12)
|
||||
|
||||
# maximum number of new connections per second
|
||||
_OPTION(ConnectionRateThrottle, `confCONNECTION_RATE_THROTTLE', 3)
|
||||
|
||||
# work recipient factor
|
||||
_OPTION(RecipientFactor, `confWORK_RECIPIENT_FACTOR', 30000)
|
||||
|
||||
|
@ -400,6 +428,15 @@ _OPTION(OperatorChars, `confOPERATORS')
|
|||
# shall I avoid calling initgroups(3) because of high NIS costs?
|
||||
_OPTION(DontInitGroups, `confDONT_INIT_GROUPS')
|
||||
|
||||
# are group-writable :include: and .forward files (un)trustworthy?
|
||||
_OPTION(UnsafeGroupWrites, `confUNSAFE_GROUP_WRITES')
|
||||
|
||||
# where do errors that occur when sending errors get sent?
|
||||
_OPTION(DoubleBounceAddress, `confDOUBLE_BOUNCE_ADDRESS')
|
||||
|
||||
# what user id do we assume for the majority of the processing?
|
||||
_OPTION(RunAsUser, `confRUN_AS_USER', sendmail)
|
||||
|
||||
###########################
|
||||
# Message precedences #
|
||||
###########################
|
||||
|
@ -418,7 +455,7 @@ Pjunk=-100
|
|||
ifdef(`_USE_CT_FILE_', `', `#')Ft`'ifdef(`confCT_FILE', confCT_FILE, `/etc/sendmail.ct')
|
||||
Troot
|
||||
Tdaemon
|
||||
Tuucp
|
||||
ifdef(`_NO_UUCP_', `dnl', `Tuucp')
|
||||
ifdef(`confTRUSTED_USERS', `T`'confTRUSTED_USERS', `dnl')
|
||||
|
||||
#########################
|
||||
|
@ -426,14 +463,13 @@ ifdef(`confTRUSTED_USERS', `T`'confTRUSTED_USERS', `dnl')
|
|||
#########################
|
||||
|
||||
ifdef(`confFROM_HEADER',, `define(`confFROM_HEADER', `$?x$x <$g>$|$g$.')')dnl
|
||||
H?P?Return-Path: $g
|
||||
H?P?Return-Path: <$g>
|
||||
HReceived: confRECEIVED_HEADER
|
||||
H?D?Resent-Date: $a
|
||||
H?D?Date: $a
|
||||
H?F?Resent-From: confFROM_HEADER
|
||||
H?F?From: confFROM_HEADER
|
||||
H?x?Full-Name: $x
|
||||
HSubject:
|
||||
# HPosted-Date: $a
|
||||
# H?l?Received-Date: $b
|
||||
H?M?Resent-Message-Id: <$t.$i@$j>
|
||||
|
@ -450,11 +486,9 @@ ifdef(`_NULL_CLIENT_ONLY_',
|
|||
######################################################################
|
||||
######################################################################
|
||||
|
||||
undivert(9)dnl
|
||||
|
||||
###########################################
|
||||
### Rulset 3 -- Name Canonicalization ###
|
||||
###########################################
|
||||
############################################
|
||||
### Ruleset 3 -- Name Canonicalization ###
|
||||
############################################
|
||||
S3
|
||||
|
||||
# handle null input (translate to <@> special case)
|
||||
|
@ -463,8 +497,11 @@ R$@ $@ <@>
|
|||
# strip group: syntax (not inside angle brackets!) and trailing semicolon
|
||||
R$* $: $1 <@> mark addresses
|
||||
R$* < $* > $* <@> $: $1 < $2 > $3 unmark <addr>
|
||||
R@ $* <@> $: @ $1 unmark @host:...
|
||||
R$* :: $* <@> $: $1 :: $2 unmark node::addr
|
||||
R:`include': $* <@> $: :`include': $1 unmark :`include':...
|
||||
R$* [ $* : $* ] <@> $: $1 [ $2 : $3 ] unmark IPv6 addrs
|
||||
R$* : $* [ $* ] $: $1 : $2 [ $3 ] <@> remark if leading colon
|
||||
R$* : $* <@> $: $2 strip colon if marked
|
||||
R$* <@> $: $1 unmark
|
||||
R$* ; $: $1 strip trailing semi
|
||||
|
@ -559,18 +596,17 @@ ifdef(`_CLASS_Y_',
|
|||
R$* < @ $+ . UUCP > $* $: $1 < @ $[ $2 $] . UUCP . > $3
|
||||
R$* < @ $+ . . UUCP . > $* $@ $1 < @ $2 . > $3')
|
||||
')
|
||||
ifdef(`_NO_CANONIFY_', `dnl',
|
||||
`# pass to name server to make hostname canonical
|
||||
R$* < @ $* $~P > $* $: $1 < @ $[ $2 $3 $] > $4')
|
||||
# pass to name server to make hostname canonical
|
||||
ifdef(`_NO_CANONIFY_', `#')dnl
|
||||
R$* < @ $* $~P > $* $: $1 < @ $[ $2 $3 $] > $4
|
||||
|
||||
# local host aliases and pseudo-domains are always canonical
|
||||
R$* < @ $=w > $* $: $1 < @ $2 . > $3
|
||||
R$* < @ $j > $* $: $1 < @ $j . > $2
|
||||
R$* < @ $* $=M > $* $: $1 < @ $2 $3 . > $4
|
||||
R$* < @ $* $=P > $* $: $1 < @ $2 $3 . > $4
|
||||
R$* < @ $* . . > $* $1 < @ $2 . > $3
|
||||
|
||||
# if this is the local hostname, make sure we treat is as canonical
|
||||
R$* < @ $j > $* $: $1 < @ $j . > $2
|
||||
|
||||
|
||||
##################################################
|
||||
### Ruleset 4 -- Final Output Post-rewriting ###
|
||||
|
@ -622,7 +658,10 @@ S0
|
|||
R<@> $#_LOCAL_ $: <@> special case error msgs
|
||||
R$* : $* ; <@> $#error $@ 5.1.3 $: "list:; syntax illegal for recipient addresses"
|
||||
R<@ $+> $#error $@ 5.1.1 $: "user address required"
|
||||
R$* <$* : $* > $* $#error $@ 5.1.1 $: "colon illegal in host name part"
|
||||
R$* $: <> $1
|
||||
R<> $* < @ [ $+ ] > $* $1 < @ [ $2 ] > $3
|
||||
R<> $* <$* : $* > $* $#error $@ 5.1.1 $: "colon illegal in host name part"
|
||||
R<> $* $1
|
||||
R$* < @ . > $* $#error $@ 5.1.2 $: "invalid host name"
|
||||
|
||||
ifdef(`_MAILER_smtp_',
|
||||
|
@ -635,15 +674,24 @@ R$* < @ [ $+ ] > $* $#_SMTP_ $@ [$2] $: $1 < @ [$2] > $3 still numeric: send',
|
|||
R$* < @ > $* $@ $>97 $1 user@ => user
|
||||
R< @ $=w . > : $* $@ $>97 $2 @here:... -> ...
|
||||
R$- < @ $=w . > $: $(dequote $1 $) < @ $2 . > dequote "foo"@here
|
||||
R< @ $+ > $#error $@ 5.1.1 $: "user address required"
|
||||
R$* $=O $* < @ $=w . > $@ $>97 $1 $2 $3 ...@here -> ...
|
||||
|
||||
# handle local hacks
|
||||
R$* $: $>98 $1
|
||||
|
||||
# handle virtual users
|
||||
define(`X', ifdef(`VIRTUSER_TABLE', `', `#'))dnl
|
||||
X`'R$+ < @ $=w . > $: < $(virtuser $1 @ $2 $@ $1 $: @ $) > $1 < @ $2 . >
|
||||
X`'R< @ > $+ < @ $+ . > $: < $(virtuser @ $2 $@ $1 $: @ $) > $1 < @ $2 . >
|
||||
X`'R< @ > $+ $: $1
|
||||
X`'R< error : $- $+ > $* $#error $@ $1 $: $2
|
||||
X`'R< $+ > $+ < @ $+ > $: $>97 $1
|
||||
undefine(`X')dnl
|
||||
|
||||
# short circuit local delivery so forwarded email works
|
||||
ifdef(`_MAILER_usenet_',
|
||||
`R$+ . USENET < @ $=w . > $#usenet $: $1 handle usenet specially',
|
||||
`dnl')
|
||||
ifdef(`_MAILER_usenet_', `', `#')dnl
|
||||
R$+ . USENET < @ $=w . > $#usenet $: $1 handle usenet specially
|
||||
ifdef(`_STICKY_LOCAL_DOMAIN_',
|
||||
`R$+ < @ $=w . > $: < $H > $1 < @ $2 . > first try hub
|
||||
R< $+ > $+ < $+ > $>95 < $1 > $2 < $3 > yep ....
|
||||
|
@ -657,8 +705,7 @@ define(`X', ifdef(`MAILER_TABLE', `', `#'))dnl
|
|||
X`'R$* <@ $+ > $* $: < $2 > $1 < @ $2 > $3 extract host name
|
||||
X`'R< $+ . > $* $: < $1 > $2 strip trailing dot
|
||||
X`'R< $+ > $* $: < $(mailertable $1 $) > $2 lookup
|
||||
X`'R< error : $- $+ > $* $#error $@ $1 $: $2 check -- error?
|
||||
X`'R< $- : $+ > $* $# $1 $@ $2 $: $3 check -- resolved?
|
||||
X`'R< $~[ : $+ > $* $>95 < $1 : $2 > $3 check -- resolved?
|
||||
X`'R< $+ > $* $: $>90 <$1> $2 try domain
|
||||
undefine(`X')dnl
|
||||
undivert(4)dnl
|
||||
|
@ -759,40 +806,63 @@ R< $+ > $+ $@ $>95 < $1 > $2 < @ $1 >
|
|||
###################################################################
|
||||
|
||||
define(`X', ifdef(`MAILER_TABLE', `', `#'))dnl
|
||||
X`'S90
|
||||
S90
|
||||
X`'R$* <$- . $+ > $* $: $1$2 < $(mailertable .$3 $@ $1$2 $@ $2 $) > $4
|
||||
X`'R$* <$- : $+ > $* $# $2 $@ $3 $: $4 check -- resolved?
|
||||
X`'R$* < . $+ > $* $@ $>90 $1 . <$2> $3 no -- strip & try again
|
||||
X`'R$* <$~[ : $+ > $* $>95 < $2 : $3 > $4 check -- resolved?
|
||||
X`'R$* < . $+ > $* $@ $>90 $1 . <$2> $3 no -- strip & try again
|
||||
X`'R$* < $* > $* $: < $(mailertable . $@ $1$2 $) > $3 try "."
|
||||
X`'R<$- : $+ > $* $# $1 $@ $2 $: $3 "." found?
|
||||
X`'R< $* > $* $@ $2 no mailertable match
|
||||
X`'R< $~[ : $+ > $* $>95 < $1 : $2 > $3 "." found?
|
||||
X`'R< $* > $* $@ $2 no mailertable match
|
||||
undefine(`X')dnl
|
||||
|
||||
###################################################################
|
||||
### Ruleset 95 -- canonify mailer:host syntax to triple ###
|
||||
### Ruleset 95 -- canonify mailer:[user@]host syntax to triple ###
|
||||
###################################################################
|
||||
|
||||
S95
|
||||
R< > $* $@ $1 strip off null relay
|
||||
R< $- : $+ > $* $# $1 $@ $2 $: $3 try qualified mailer
|
||||
R< $=w > $* $@ $2 delete local host
|
||||
R< $+ > $* $#_RELAY_ $@ $1 $: $2 use unqualified mailer
|
||||
R< > $* $@ $1 strip off null relay
|
||||
R< error : $- $+ > $* $#error $@ $1 $: $2 special case errors
|
||||
R< local : > $* < @ $* > $#local $@ $1@$2 $: $1 no host: use old user
|
||||
R< local : $+ > $* <@ $* . > $* $#local $@ $2@$3 $: $1 special case local
|
||||
R< $- : $+ @ $+ > $*<$*>$* $# $1 $@ $3 $: $2<@$3> use literal user
|
||||
R< $- : $+ > $* $# $1 $@ $2 $: $3 try qualified mailer
|
||||
R< $=w > $* $@ $2 delete local host
|
||||
R< $+ > $* $#_RELAY_ $@ $1 $: $2 use unqualified mailer
|
||||
|
||||
###################################################################
|
||||
### Ruleset 93 -- convert header names to masqueraded form ###
|
||||
###################################################################
|
||||
|
||||
S93
|
||||
|
||||
# handle generics database
|
||||
define(`X', ifdef(`GENERICS_TABLE', `', `#'))dnl
|
||||
X`'R$+ < @ $=G . > $: < $1@$2 > $1 < @ $2 . > @ mark
|
||||
X`'R$+ < @ *LOCAL* > $: < $1@$j > $1 < @ *LOCAL* > @ mark
|
||||
X`'R< $+ > $+ < $* > @ $: < $(generics $1 $: $) > $2 < $3 >
|
||||
X`'R< > $+ < @ $+ > $: < $(generics $1 $: $) > $1 < @ $2 >
|
||||
X`'R< $* @ $* > $* < $* > $@ $>3 $1 @ $2 found qualified
|
||||
X`'R< $+ > $* < $* > $: $>3 $1 @ *LOCAL* found unqualified
|
||||
X`'R< > $* $: $1 not found
|
||||
undefine(`X')dnl
|
||||
|
||||
# special case the users that should be exposed
|
||||
R$=E < @ *LOCAL* > $@ $1 < @ $j . > leave exposed
|
||||
R$=E < @ $=M . > $@ $1 < @ $2 . >
|
||||
ifdef(`_MASQUERADE_ENTIRE_DOMAIN_',
|
||||
`R$=E < @ $* $=M . > $@ $1 < @ $2 $3 . >',
|
||||
`R$=E < @ $=M . > $@ $1 < @ $2 . >')
|
||||
ifdef(`_LIMITED_MASQUERADE_', `#')dnl
|
||||
R$=E < @ $=w . > $@ $1 < @ $2 . >
|
||||
R$* < @ $=M . > $* $: $1 < @ $2 . @ $M > $3 convert masqueraded doms
|
||||
|
||||
# handle domain-specific masquerading
|
||||
ifdef(`_MASQUERADE_ENTIRE_DOMAIN_',
|
||||
`R$* < @ $* $=M . > $* $: $1 < @ $2 $3 . @ $M > $4 convert masqueraded doms',
|
||||
`R$* < @ $=M . > $* $: $1 < @ $2 . @ $M > $3 convert masqueraded doms')
|
||||
ifdef(`_LIMITED_MASQUERADE_', `#')dnl
|
||||
R$* < @ $=w . > $* $: $1 < @ $2 . @ $M > $3
|
||||
R$* < @ *LOCAL* > $* $: $1 < @ $j . @ $M > $2
|
||||
R$* < @ $+ @ > $* $@ $1 < @ $2 > $3 $M is null
|
||||
R$* < @ $+ @ $+ > $* $@ $1 < @ $3 . > $4 $M is not null
|
||||
R$* < @ $+ @ > $* $: $1 < @ $2 > $3 $M is null
|
||||
R$* < @ $+ @ $+ > $* $: $1 < @ $3 . > $4 $M is not null
|
||||
|
||||
###################################################################
|
||||
### Ruleset 94 -- convert envelope names to masqueraded form ###
|
||||
|
@ -810,6 +880,7 @@ R$* < @ *LOCAL* > $* $: $1 < @ $j . > $2
|
|||
|
||||
S98
|
||||
undivert(3)dnl
|
||||
undivert(9)dnl
|
||||
#
|
||||
######################################################################
|
||||
######################################################################
|
||||
|
|
|
@ -32,8 +32,8 @@ divert(-1)
|
|||
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
# SUCH DAMAGE.
|
||||
#
|
||||
VERSIONID(`@(#)version.m4 8.7.3.1 (Berkeley) 12/3/95')
|
||||
VERSIONID(`@(#)version.m4 8.8.2.1 (Berkeley) 10/18/96')
|
||||
#
|
||||
divert(0)
|
||||
# Configuration version number
|
||||
DZ8.7.3`'ifdef(`confCF_VERSION', `/confCF_VERSION')
|
||||
DZ8.8.2`'ifdef(`confCF_VERSION', `/confCF_VERSION')
|
||||
|
|
|
@ -26,6 +26,7 @@ PUSHDIVERT(-1)
|
|||
ifdef(`CYRUS_MAILER_FLAGS',, `define(`CYRUS_MAILER_FLAGS', `A5@')')
|
||||
ifdef(`CYRUS_MAILER_PATH',, `define(`CYRUS_MAILER_PATH', /usr/cyrus/bin/deliver)')
|
||||
ifdef(`CYRUS_MAILER_ARGS',, `define(`CYRUS_MAILER_ARGS', `deliver -e -m $h -- $u')')
|
||||
ifdef(`CYRUS_MAILER_USER',, `define(`CYRUS_MAILER_USER', `cyrus:mail')')
|
||||
ifdef(`CYRUS_BB_MAILER_FLAGS',, `define(`CYRUS_BB_MAILER_FLAGS', `')')
|
||||
ifdef(`CYRUS_BB_MAILER_ARGS',, `define(`CYRUS_BB_MAILER_ARGS', `deliver -e -m $u')')
|
||||
|
||||
|
@ -35,10 +36,12 @@ POPDIVERT
|
|||
### Cyrus Mailer specification ###
|
||||
##################################################
|
||||
|
||||
VERSIONID(`@(#)cyrus.m4 8.2 (Carnegie Mellon) 9/12/95')
|
||||
VERSIONID(`@(#)cyrus.m4 8.4 (Carnegie Mellon) 9/2/96')
|
||||
|
||||
Mcyrus, P=CYRUS_MAILER_PATH, F=CONCAT(`lsDFMnP', CYRUS_MAILER_FLAGS), S=10, R=20/40, T=X-Unix,
|
||||
ifdef(`CYRUS_MAILER_MAX', `M=CYRUS_MAILER_MAX, ')A=CYRUS_MAILER_ARGS
|
||||
Mcyrus, P=CYRUS_MAILER_PATH, F=CONCAT(`lsDFMnPq', CYRUS_MAILER_FLAGS), S=10, R=20/40, T=X-Unix,
|
||||
ifdef(`CYRUS_MAILER_MAX', `M=CYRUS_MAILER_MAX, ')U=CYRUS_MAILER_USER,
|
||||
A=CYRUS_MAILER_ARGS
|
||||
|
||||
Mcyrusbb, P=CYRUS_MAILER_PATH, F=CONCAT(`lsDFMnP', CYRUS_MAILER_FLAGS), S=10, R=20/40, T=X-Unix,
|
||||
ifdef(`CYRUS_MAILER_MAX', `M=CYRUS_MAILER_MAX, ')A=CYRUS_BB_MAILER_ARGS
|
||||
Mcyrusbb, P=CYRUS_MAILER_PATH, F=CONCAT(`lsDFMnP', CYRUS_BB_MAILER_FLAGS), S=10, R=20/40, T=X-Unix,
|
||||
ifdef(`CYRUS_MAILER_MAX', `M=CYRUS_MAILER_MAX, ')U=CYRUS_MAILER_USER,
|
||||
A=CYRUS_BB_MAILER_ARGS
|
||||
|
|
|
@ -35,6 +35,8 @@ PUSHDIVERT(-1)
|
|||
# SUCH DAMAGE.
|
||||
#
|
||||
|
||||
ifdef(`FAX_MAILER_ARGS',,
|
||||
`define(`FAX_MAILER_ARGS', mailfax $u $h $f)')
|
||||
ifdef(`FAX_MAILER_PATH',,
|
||||
`define(`FAX_MAILER_PATH', /usr/local/lib/fax/mailfax)')
|
||||
ifdef(`FAX_MAILER_MAX',,
|
||||
|
@ -44,10 +46,10 @@ POPDIVERT
|
|||
### FAX Mailer specification ###
|
||||
####################################
|
||||
|
||||
VERSIONID(`@(#)fax.m4 8.4 (Berkeley) 10/10/95')
|
||||
VERSIONID(`@(#)fax.m4 8.5 (Berkeley) 5/10/96')
|
||||
|
||||
Mfax, P=FAX_MAILER_PATH, F=DFMhu, S=14, R=24, M=FAX_MAILER_MAX, T=X-Phone/X-FAX/X-Unix,
|
||||
A=mailfax $u $h $f
|
||||
A=FAX_MAILER_ARGS
|
||||
|
||||
LOCAL_CONFIG
|
||||
CPFAX
|
||||
|
|
|
@ -32,10 +32,10 @@ PUSHDIVERT(-1)
|
|||
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
# SUCH DAMAGE.
|
||||
#
|
||||
ifdef(`LOCAL_MAILER_FLAGS',, `define(`LOCAL_MAILER_FLAGS', `rmn')')
|
||||
ifdef(`LOCAL_MAILER_FLAGS',, `define(`LOCAL_MAILER_FLAGS', `rmn9')')
|
||||
ifdef(`LOCAL_MAILER_PATH',, `define(`LOCAL_MAILER_PATH', /bin/mail)')
|
||||
ifdef(`LOCAL_MAILER_ARGS',, `define(`LOCAL_MAILER_ARGS', `mail -d $u')')
|
||||
ifdef(`LOCAL_SHELL_FLAGS',, `define(`LOCAL_SHELL_FLAGS', `eu')')
|
||||
ifdef(`LOCAL_SHELL_FLAGS',, `define(`LOCAL_SHELL_FLAGS', `eu9')')
|
||||
ifdef(`LOCAL_SHELL_PATH',, `define(`LOCAL_SHELL_PATH', /bin/sh)')
|
||||
ifdef(`LOCAL_SHELL_ARGS',, `define(`LOCAL_SHELL_ARGS', `sh -c $u')')
|
||||
ifdef(`LOCAL_SHELL_DIR',, `define(`LOCAL_SHELL_DIR', `$z:/')')
|
||||
|
@ -45,12 +45,12 @@ POPDIVERT
|
|||
### Local and Program Mailer specification ###
|
||||
##################################################
|
||||
|
||||
VERSIONID(`@(#)local.m4 8.21 (Berkeley) 11/6/95')
|
||||
VERSIONID(`@(#)local.m4 8.23 (Berkeley) 5/31/96')
|
||||
|
||||
Mlocal, P=LOCAL_MAILER_PATH, F=CONCAT(`lsDFMAw5:/|@', LOCAL_MAILER_FLAGS), S=10/30, R=20/40,
|
||||
Mlocal, P=LOCAL_MAILER_PATH, F=CONCAT(`lsDFMAw5:/|@q', LOCAL_MAILER_FLAGS), S=10/30, R=20/40,
|
||||
_OPTINS(`LOCAL_MAILER_MAX', `M=', `, ')_OPTINS(`LOCAL_MAILER_CHARSET', `C=', `, ')T=DNS/RFC822/X-Unix,
|
||||
A=LOCAL_MAILER_ARGS
|
||||
Mprog, P=LOCAL_SHELL_PATH, F=CONCAT(`lsDFMo', LOCAL_SHELL_FLAGS), S=10/30, R=20/40, D=LOCAL_SHELL_DIR,
|
||||
Mprog, P=LOCAL_SHELL_PATH, F=CONCAT(`lsDFMoq', LOCAL_SHELL_FLAGS), S=10/30, R=20/40, D=LOCAL_SHELL_DIR,
|
||||
_OPTINS(`LOCAL_MAILER_MAX', `M=', `, ')T=X-Unix,
|
||||
A=LOCAL_SHELL_ARGS
|
||||
|
||||
|
|
|
@ -43,9 +43,9 @@ POPDIVERT
|
|||
### POP Mailer specification ###
|
||||
####################################
|
||||
|
||||
VERSIONID(`@(#)pop.m4 8.5 (Berkeley) 4/23/95')
|
||||
VERSIONID(`@(#)pop.m4 8.6 (Berkeley) 2/12/96')
|
||||
|
||||
Mpop, P=POP_MAILER_PATH, F=CONCAT(`lsDFM', POP_MAILER_FLAGS), S=10, R=20/40, T=DNS/RFC822/X-Unix,
|
||||
Mpop, P=POP_MAILER_PATH, F=CONCAT(`lsDFMq', POP_MAILER_FLAGS), S=10, R=20/40, T=DNS/RFC822/X-Unix,
|
||||
A=POP_MAILER_ARGS
|
||||
|
||||
LOCAL_CONFIG
|
||||
|
|
|
@ -33,8 +33,10 @@ PUSHDIVERT(-1)
|
|||
# SUCH DAMAGE.
|
||||
#
|
||||
|
||||
ifdef(`PROCMAIL_PATH',,
|
||||
`define(`PROCMAIL_PATH', /usr/local/bin/procmail)')
|
||||
ifdef(`PROCMAIL_MAILER_PATH',,
|
||||
`ifdef(`PROCMAIL_PATH',
|
||||
`define(`PROCMAIL_MAILER_PATH', PROCMAIL_PATH)',
|
||||
`define(`PROCMAIL_MAILER_PATH', /usr/local/bin/procmail)')')
|
||||
ifdef(`PROCMAIL_MAILER_FLAGS',,
|
||||
`define(`PROCMAIL_MAILER_FLAGS', `Shu')')
|
||||
ifdef(`PROCMAIL_MAILER_ARGS',,
|
||||
|
@ -46,7 +48,7 @@ POPDIVERT
|
|||
### PROCMAIL Mailer specification ###
|
||||
##################*****##################
|
||||
|
||||
VERSIONID(`@(#)procmail.m4 8.4 (Berkeley) 4/23/95')
|
||||
VERSIONID(`@(#)procmail.m4 8.5 (Berkeley) 12/28/95')
|
||||
|
||||
Mprocmail, P=PROCMAIL_PATH, F=CONCAT(`DFMm', PROCMAIL_MAILER_FLAGS), S=11/31, R=21/31, T=DNS/RFC822/X-Unix,
|
||||
Mprocmail, P=PROCMAIL_MAILER_PATH, F=CONCAT(`DFMm', PROCMAIL_MAILER_FLAGS), S=11/31, R=21/31, T=DNS/RFC822/X-Unix,
|
||||
ifdef(`PROCMAIL_MAILER_MAX', `M=PROCMAIL_MAILER_MAX, ')A=PROCMAIL_MAILER_ARGS
|
||||
|
|
|
@ -0,0 +1,41 @@
|
|||
divert(-1)
|
||||
#
|
||||
# Copyright (c) 1995 Eric P. Allman
|
||||
# Copyright (c) 1988, 1993
|
||||
# The Regents of the University of California. All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions
|
||||
# are met:
|
||||
# 1. Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
# 2. Redistributions in binary form must reproduce the above copyright
|
||||
# notice, this list of conditions and the following disclaimer in the
|
||||
# documentation and/or other materials provided with the distribution.
|
||||
# 3. All advertising materials mentioning features or use of this software
|
||||
# must display the following acknowledgement:
|
||||
# This product includes software developed by the University of
|
||||
# California, Berkeley and its contributors.
|
||||
# 4. Neither the name of the University nor the names of its contributors
|
||||
# may be used to endorse or promote products derived from this software
|
||||
# without specific prior written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
|
||||
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
# ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
|
||||
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
# SUCH DAMAGE.
|
||||
#
|
||||
|
||||
divert(0)
|
||||
VERSIONID(`@(#)aix2.m4 8.2 (Berkeley) 9/19/96')
|
||||
define(`LOCAL_MAILER_PATH', /bin/bellmail)dnl
|
||||
define(`LOCAL_MAILER_ARGS', mail $u)dnl
|
||||
define(`LOCAL_MAILER_FLAGS', `mn9')dnl
|
||||
define(`confTIME_ZONE', `USE_TZ')dnl
|
|
@ -34,8 +34,8 @@ divert(-1)
|
|||
#
|
||||
|
||||
divert(0)
|
||||
VERSIONID(`@(#)aix3.m4 8.5 (Berkeley) 11/13/95')
|
||||
VERSIONID(`@(#)aix3.m4 8.6 (Berkeley) 9/19/96')
|
||||
ifdef(`LOCAL_MAILER_PATH',, `define(`LOCAL_MAILER_PATH', /bin/bellmail)')dnl
|
||||
ifdef(`LOCAL_MAILER_ARGS',, `define(`LOCAL_MAILER_ARGS', mail $u)')dnl
|
||||
ifdef(`LOCAL_MAILER_FLAGS',, `define(`LOCAL_MAILER_FLAGS', `mn')')dnl
|
||||
ifdef(`LOCAL_MAILER_FLAGS',, `define(`LOCAL_MAILER_FLAGS', `mn9')')dnl
|
||||
define(`confTIME_ZONE', `USE_TZ')dnl
|
||||
|
|
|
@ -0,0 +1,49 @@
|
|||
divert(-1)
|
||||
#
|
||||
# Copyright (c) 1996 Eric P. Allman
|
||||
# Copyright (c) 1988, 1993
|
||||
# The Regents of the University of California. All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions
|
||||
# are met:
|
||||
# 1. Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
# 2. Redistributions in binary form must reproduce the above copyright
|
||||
# notice, this list of conditions and the following disclaimer in the
|
||||
# documentation and/or other materials provided with the distribution.
|
||||
# 3. All advertising materials mentioning features or use of this software
|
||||
# must display the following acknowledgement:
|
||||
# This product includes software developed by the University of
|
||||
# California, Berkeley and its contributors.
|
||||
# 4. Neither the name of the University nor the names of its contributors
|
||||
# may be used to endorse or promote products derived from this software
|
||||
# without specific prior written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
|
||||
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
# ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
|
||||
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
# SUCH DAMAGE.
|
||||
#
|
||||
# Contributed by Tim Rice <tim@trr.metro.NET>.
|
||||
#
|
||||
|
||||
divert(0)
|
||||
VERSIONID(`@(#)altos.m4 8.3 (Berkeley) 9/25/96')
|
||||
|
||||
define(`ALIAS_FILE', /usr/lib/mail/aliases)dnl
|
||||
ifdef(`QUEUE_DIR',, `define(`QUEUE_DIR', /usr/spool/mqueue)')dnl
|
||||
ifdef(`STATUS_FILE',, `define(`STATUS_FILE', /usr/lib/sendmail.st)')dnl
|
||||
ifdef(`UUCP_MAILER_PATH',, `define(`UUCP_MAILER_PATH', /usr/bin/uux)')dnl
|
||||
ifdef(`LOCAL_MAILER_PATH',, `define(`LOCAL_MAILER_PATH', /usr/bin/lmail)')dnl
|
||||
ifdef(`LOCAL_MAILER_FLAGS',, `define(`LOCAL_MAILER_FLAGS', mPuhCE9)')dnl
|
||||
ifdef(`LOCAL_MAILER_ARGS',, `define(`LOCAL_MAILER_ARGS', `lmail $u')')dnl
|
||||
ifdef(`LOCAL_SHELL_FLAGS',, `define(`LOCAL_SHELL_FLAGS', Peu)')dnl
|
||||
ifdef(`UUCP_MAILER_ARGS',, `define(`UUCP_MAILER_ARGS', `uux - -r -a$g $h!rmail ($u)')')dnl
|
|
@ -34,11 +34,11 @@ divert(-1)
|
|||
#
|
||||
|
||||
divert(0)
|
||||
VERSIONID(`@(#)amdahl-uts.m4 8.2 (Berkeley) 11/13/95')
|
||||
VERSIONID(`@(#)amdahl-uts.m4 8.4 (Berkeley) 9/25/96')
|
||||
divert(-1)
|
||||
|
||||
ifdef(`ALIAS_FILE',, `define(`ALIAS_FILE', /etc/mail/aliases)')
|
||||
define(`ALIAS_FILE', /etc/mail/aliases)
|
||||
ifdef(`HELP_FILE',, `define(`HELP_FILE', /etc/mail/sendmail.hf)')
|
||||
ifdef(`STATUS_FILE',, `define(`STATUS_FILE', /usr/lib/sendmail.st)')
|
||||
ifdef(`LOCAL_MAILER_FLAGS',, `define(`LOCAL_MAILER_FLAGS', `fSn')')
|
||||
ifdef(`LOCAL_MAILER_FLAGS',, `define(`LOCAL_MAILER_FLAGS', `fSn9')')
|
||||
define(`confCW_FILE', /etc/mail/sendmail.cw)
|
||||
|
|
|
@ -34,10 +34,10 @@ divert(-1)
|
|||
#
|
||||
|
||||
divert(0)
|
||||
VERSIONID(`@(#)aux.m4 8.2 (Berkeley) 11/13/95')
|
||||
ifdef(`ALIAS_FILE',, `define(`ALIAS_FILE', /usr/lib/aliases)')dnl
|
||||
VERSIONID(`@(#)aux.m4 8.4 (Berkeley) 9/25/96')
|
||||
define(`ALIAS_FILE', /usr/lib/aliases)dnl
|
||||
ifdef(`QUEUE_DIR',, `define(`QUEUE_DIR', /usr/spool/mqueue)')dnl
|
||||
ifdef(`STATUS_FILE',, `define(`STATUS_FILE', /usr/lib/sendmail.st)')dnl
|
||||
ifdef(`UUCP_MAILER_PATH',, `define(`UUCP_MAILER_PATH', /usr/bin/uux)')dnl
|
||||
ifdef(`LOCAL_MAILER_FLAGS',, `define(`LOCAL_MAILER_FLAGS', mn)')dnl
|
||||
ifdef(`LOCAL_MAILER_FLAGS',, `define(`LOCAL_MAILER_FLAGS', mn9)')dnl
|
||||
ifdef(`LOCAL_MAILER_ARGS',, `define(`LOCAL_MAILER_ARGS', `mail -d -r $f $u')')dnl
|
||||
|
|
|
@ -34,6 +34,8 @@ divert(-1)
|
|||
#
|
||||
|
||||
divert(0)
|
||||
VERSIONID(`@(#)dgux.m4 8.2 (Berkeley) 11/13/95')
|
||||
ifdef(`LOCAL_MAILER_FLAGS',, `define(`LOCAL_MAILER_FLAGS', m)')dnl
|
||||
VERSIONID(`@(#)dgux.m4 8.4 (Berkeley) 9/19/96')
|
||||
ifdef(`LOCAL_MAILER_FLAGS',, `define(`LOCAL_MAILER_FLAGS', m9)')dnl
|
||||
define(`confTIME_ZONE', `USE_TZ')dnl
|
||||
LOCAL_CONFIG
|
||||
E_FORCE_MAIL_LOCAL_=yes
|
||||
|
|
|
@ -34,9 +34,9 @@ divert(-1)
|
|||
#
|
||||
|
||||
divert(0)
|
||||
VERSIONID(`@(#)domainos.m4 8.2 (Berkeley) 11/13/95')
|
||||
VERSIONID(`@(#)domainos.m4 8.3 (Berkeley) 9/25/96')
|
||||
divert(-1)
|
||||
|
||||
ifdef(`ALIAS_FILE',, `define(`ALIAS_FILE', /usr/lib/aliases)')
|
||||
define(`ALIAS_FILE', /usr/lib/aliases)
|
||||
ifdef(`STATUS_FILE',, `define(`STATUS_FILE', /usr/lib/sendmail.st)')
|
||||
ifdef(`QUEUE_DIR',, `define(`QUEUE_DIR', /usr/spool/mqueue)')
|
||||
|
|
|
@ -34,6 +34,6 @@ divert(-1)
|
|||
#
|
||||
|
||||
divert(0)
|
||||
VERSIONID(`@(#)dynix3.2.m4 8.2 (Berkeley) 11/13/95')
|
||||
ifdef(`ALIAS_FILE',, `define(`ALIAS_FILE', /usr/lib/aliases)')dnl
|
||||
VERSIONID(`@(#)dynix3.2.m4 8.3 (Berkeley) 9/25/96')
|
||||
define(`ALIAS_FILE', /usr/lib/aliases)dnl
|
||||
ifdef(`QUEUE_DIR',, `define(`QUEUE_DIR', /usr/spool/mqueue)')dnl
|
||||
|
|
|
@ -34,14 +34,14 @@ divert(-1)
|
|||
#
|
||||
|
||||
divert(0)
|
||||
VERSIONID(`@(#)hpux10.m4 8.6 (Berkeley) 11/13/95')
|
||||
VERSIONID(`@(#)hpux10.m4 8.8 (Berkeley) 9/25/96')
|
||||
|
||||
ifdef(`QUEUE_DIR',, `define(`QUEUE_DIR', /var/spool/mqueue)')dnl
|
||||
ifdef(`ALIAS_FILE',, `define(`ALIAS_FILE', /etc/mail/aliases)')dnl
|
||||
define(`ALIAS_FILE', /etc/mail/aliases)dnl
|
||||
ifdef(`STATUS_FILE',, `define(`STATUS_FILE', /etc/mail/sendmail.st)')dnl
|
||||
ifdef(`HELP_FILE',, `define(`HELP_FILE', /usr/share/lib/sendmail.hf)')dnl
|
||||
ifdef(`LOCAL_MAILER_PATH',, `define(`LOCAL_MAILER_PATH', /usr/bin/rmail)')dnl
|
||||
ifdef(`LOCAL_MAILER_FLAGS',, `define(`LOCAL_MAILER_FLAGS', `m')')dnl
|
||||
ifdef(`LOCAL_MAILER_FLAGS',, `define(`LOCAL_MAILER_FLAGS', `m9')')dnl
|
||||
ifdef(`LOCAL_MAILER_ARGS',, `define(`LOCAL_MAILER_ARGS', `rmail -d $u')')dnl
|
||||
ifdef(`LOCAL_SHELL_PATH',, `define(`LOCAL_SHELL_PATH', /usr/bin/sh)')dnl
|
||||
ifdef(`UUCP_MAILER_ARGS',, `define(`UUCP_MAILER_ARGS', `uux - -r -a$g -gC $h!rmail ($u)')')dnl
|
||||
|
|
|
@ -34,13 +34,13 @@ divert(-1)
|
|||
#
|
||||
|
||||
divert(0)
|
||||
VERSIONID(`@(#)hpux9.m4 8.10 (Berkeley) 11/13/95')
|
||||
VERSIONID(`@(#)hpux9.m4 8.12 (Berkeley) 9/25/96')
|
||||
|
||||
ifdef(`QUEUE_DIR',, `define(`QUEUE_DIR', /usr/spool/mqueue)')dnl
|
||||
ifdef(`ALIAS_FILE',, `define(`ALIAS_FILE', /usr/lib/aliases)')dnl
|
||||
define(`ALIAS_FILE', /usr/lib/aliases)dnl
|
||||
ifdef(`STATUS_FILE',, `define(`STATUS_FILE', /usr/lib/sendmail.st)')dnl
|
||||
ifdef(`LOCAL_MAILER_PATH',, `define(`LOCAL_MAILER_PATH', `/bin/rmail')')dnl
|
||||
ifdef(`LOCAL_MAILER_FLAGS',, `define(`LOCAL_MAILER_FLAGS', `m')')dnl
|
||||
ifdef(`LOCAL_MAILER_FLAGS',, `define(`LOCAL_MAILER_FLAGS', `m9')')dnl
|
||||
ifdef(`LOCAL_MAILER_ARGS',, `define(`LOCAL_MAILER_ARGS', `rmail -d $u')')dnl
|
||||
ifdef(`UUCP_MAILER_ARGS',, `define(`UUCP_MAILER_ARGS', `uux - -r -a$g -gC $h!rmail ($u)')')dnl
|
||||
define(`confTIME_ZONE', `USE_TZ')dnl
|
||||
|
|
|
@ -34,8 +34,8 @@ divert(-1)
|
|||
#
|
||||
|
||||
divert(0)
|
||||
VERSIONID(`@(#)irix4.m4 8.5 (Berkeley) 11/13/95')
|
||||
ifdef(`LOCAL_MAILER_FLAGS',, `define(`LOCAL_MAILER_FLAGS', Ehm)')dnl
|
||||
VERSIONID(`@(#)irix4.m4 8.7 (Berkeley) 9/25/96')
|
||||
ifdef(`LOCAL_MAILER_FLAGS',, `define(`LOCAL_MAILER_FLAGS', Ehm9)')dnl
|
||||
ifdef(`QUEUE_DIR',, `define(`QUEUE_DIR', /usr/spool/mqueue)')dnl
|
||||
ifdef(`ALIAS_FILE',, `define(`ALIAS_FILE', /usr/lib/aliases)')dnl
|
||||
define(`ALIAS_FILE', /usr/lib/aliases)dnl
|
||||
ifdef(`STATUS_FILE',, `define(`STATUS_FILE', /usr/lib/sendmail.st)')dnl
|
||||
|
|
|
@ -50,11 +50,11 @@ divert(-1)
|
|||
#
|
||||
|
||||
divert(0)
|
||||
VERSIONID(`@(#)irix5.m4 8.2 (Berkeley) 11/13/95')
|
||||
ifdef(`LOCAL_MAILER_FLAGS',, `define(`LOCAL_MAILER_FLAGS', Ehmu)')dnl
|
||||
VERSIONID(`@(#)irix5.m4 8.4 (Berkeley) 9/25/96')
|
||||
ifdef(`LOCAL_MAILER_FLAGS',, `define(`LOCAL_MAILER_FLAGS', Ehmu9)')dnl
|
||||
ifdef(`LOCAL_MAILER_ARGS',, `define(`LOCAL_MAILER_ARGS', `mail -s -d $u')')dnl
|
||||
ifdef(`QUEUE_DIR',, `define(`QUEUE_DIR', /var/spool/mqueue)')dnl
|
||||
ifdef(`ALIAS_FILE',, `define(`ALIAS_FILE', /etc/aliases)')dnl
|
||||
define(`ALIAS_FILE', /etc/aliases)dnl
|
||||
ifdef(`STATUS_FILE',, `define(`STATUS_FILE', /var/sendmail.st)')dnl
|
||||
ifdef(`HELP_FILE',, `define(`HELP_FILE', /etc/sendmail.hf)')dnl
|
||||
define(`confDEF_USER_ID', `998:998')dnl
|
||||
|
|
|
@ -35,11 +35,11 @@ divert(-1)
|
|||
#
|
||||
|
||||
divert(0)
|
||||
VERSIONID(`@(#)isc4.1.m4 8.2 (Berkeley) 11/13/95')
|
||||
ifdef(`ALIAS_FILE',, `define(`ALIAS_FILE', /usr/lib/aliases)')dnl
|
||||
VERSIONID(`@(#)isc4.1.m4 8.4 (Berkeley) 9/25/96')
|
||||
define(`ALIAS_FILE', /usr/lib/aliases)dnl
|
||||
ifdef(`HELP_FILE',, `define(`HELP_FILE', /usr/lib/sendmail.hf)')dnl
|
||||
ifdef(`LOCAL_MAILER_ARGS',, `define(`LOCAL_MAILER_ARGS', `lmail -s $u')')dnl
|
||||
ifdef(`LOCAL_MAILER_FLAGS',, `define(`LOCAL_MAILER_FLAGS', `humS')')dnl
|
||||
ifdef(`LOCAL_MAILER_FLAGS',, `define(`LOCAL_MAILER_FLAGS', `humS9')')dnl
|
||||
ifdef(`LOCAL_MAILER_PATH',, `define(`LOCAL_MAILER_PATH', /bin/lmail)')dnl
|
||||
ifdef(`QUEUE_DIR',, `define(`QUEUE_DIR', /usr/spool/mqueue)')dnl
|
||||
ifdef(`STATUS_FILE',, `define(`STATUS_FILE', /usr/lib/sendmail.st)')dnl
|
||||
|
|
|
@ -0,0 +1,50 @@
|
|||
#
|
||||
# Copyright (c) 1996 Eric P. Allman
|
||||
# Copyright (c) 1988, 1993
|
||||
# The Regents of the University of California. All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions
|
||||
# are met:
|
||||
# 1. Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
# 2. Redistributions in binary form must reproduce the above copyright
|
||||
# notice, this list of conditions and the following disclaimer in the
|
||||
# documentation and/or other materials provided with the distribution.
|
||||
# 3. All advertising materials mentioning features or use of this software
|
||||
# must display the following acknowledgement:
|
||||
# This product includes software developed by the University of
|
||||
# California, Berkeley and its contributors.
|
||||
# 4. Neither the name of the University nor the names of its contributors
|
||||
# may be used to endorse or promote products derived from this software
|
||||
# without specific prior written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
|
||||
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
# ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
|
||||
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
# SUCH DAMAGE.
|
||||
#
|
||||
# Concurrent Computer Corporation Maxion system support contributed
|
||||
# by Donald R. Laster Jr. <Laster@access.digex.com>.
|
||||
#
|
||||
|
||||
divert(0)
|
||||
VERSIONID(`@(#)maxion.m4 8.3 (Berkeley) 9/25/96')
|
||||
|
||||
define(`ALIAS_FILE', `/etc/ucbmail/aliases')dnl
|
||||
define(`HELP_FILE', `/etc/ucbmail/sendmail.hf')dnl
|
||||
define(`QUEUE_DIR', `/var/spool/mqueue')dnl
|
||||
define(`STATUS_FILE', `/var/adm/log/sendmail.st')dnl
|
||||
define(`LOCAL_MAILER_PATH', `/usr/bin/mail')dnl
|
||||
define(`LOCAL_MAILER_FLAGS',`rmn9')dnl
|
||||
define(`LOCAL_SHELL_FLAGS', `ehuP')dnl
|
||||
define(`LOCAL_MAILER_ARGS', `mail $u')dnl
|
||||
define(`UUCP_MAILER_ARGS', `uux - -r -a$g -gmedium $h!rmail ($u)')dnl
|
||||
divert(-1)
|
|
@ -34,11 +34,11 @@ divert(-1)
|
|||
#
|
||||
|
||||
divert(0)
|
||||
VERSIONID(`@(#)nextstep.m4 8.5 (Berkeley) 11/13/95')
|
||||
ifdef(`ALIAS_FILE',, `define(`ALIAS_FILE', /etc/sendmail/aliases)')dnl
|
||||
VERSIONID(`@(#)nextstep.m4 8.7 (Berkeley) 9/25/96')
|
||||
define(`ALIAS_FILE', /etc/sendmail/aliases)dnl
|
||||
ifdef(`HELP_FILE',, `define(`HELP_FILE', /usr/lib/sendmail.hf)')dnl
|
||||
ifdef(`STATUS_FILE',, `define(`STATUS_FILE', /etc/sendmail/sendmail.st)')dnl
|
||||
ifdef(`UUCP_MAILER_PATH',, `define(`UUCP_MAILER_PATH', /usr/bin/uux)')dnl
|
||||
ifdef(`QUEUE_DIR',, `define(`QUEUE_DIR', /usr/spool/mqueue)')dnl
|
||||
ifdef(`LOCAL_MAILER_FLAGS',, `define(`LOCAL_MAILER_FLAGS', `rmnP')')dnl
|
||||
ifdef(`LOCAL_MAILER_FLAGS',, `define(`LOCAL_MAILER_FLAGS', `rmnP9')')dnl
|
||||
ifdef(`LOCAL_SHELL_FLAGS',, `define(`LOCAL_SHELL_FLAGS', `euP')')dnl
|
||||
|
|
|
@ -34,7 +34,7 @@ divert(-1)
|
|||
#
|
||||
|
||||
divert(0)
|
||||
VERSIONID(`@(#)osf1.m4 8.3 (Berkeley) 11/13/95')
|
||||
ifdef(`ALIAS_FILE',, `define(`ALIAS_FILE', /usr/adm/sendmail/aliases)')dnl
|
||||
VERSIONID(`@(#)osf1.m4 8.4 (Berkeley) 9/25/96')
|
||||
define(`ALIAS_FILE', /usr/adm/sendmail/aliases)dnl
|
||||
ifdef(`STATUS_FILE',, `define(`STATUS_FILE', /usr/adm/sendmail/sendmail.st)')dnl
|
||||
ifdef(`HELP_FILE',, `define(`HELP_FILE', /usr/share/lib/sendmail.hf)')dnl
|
||||
|
|
|
@ -36,10 +36,11 @@ divert(-1)
|
|||
# Support for DYNIX/ptx 2.x.
|
||||
|
||||
divert(0)
|
||||
VERSIONID(`@(#)ptx2.m4 8.1 (Berkeley) 12/4/94')
|
||||
ifdef(`ALIAS_FILE',,`define(`ALIAS_FILE', /usr/lib/aliases)')dnl
|
||||
VERSIONID(`@(#)ptx2.m4 8.5 (Berkeley) 9/25/96')
|
||||
ifdef(`QUEUE_DIR',, `define(`QUEUE_DIR', /usr/spool/mqueue)')dnl
|
||||
define(`ALIAS_FILE', /usr/lib/aliases)dnl
|
||||
ifdef(`HELP_FILE',,`define(`HELP_FILE', /usr/lib/sendmail.hf)')dnl
|
||||
ifdef(`STATUS_FILE',,`define(`STATUS_FILE', /usr/lib/sendmail.st)')dnl
|
||||
define(`LOCAL_MAILER_PATH', `/bin/mail')dnl
|
||||
define(`LOCAL_MAILER_FLAGS', `rmn')dnl
|
||||
define(`LOCAL_SHELL_FLAGS', `e')dnl
|
||||
define(`LOCAL_MAILER_FLAGS', `fmn9')dnl
|
||||
define(`LOCAL_SHELL_FLAGS', `eu')dnl
|
||||
|
|
|
@ -34,9 +34,9 @@ divert(-1)
|
|||
#
|
||||
|
||||
divert(0)
|
||||
VERSIONID(`@(#)riscos4.5.m4 8.3 (Berkeley) 11/13/95')
|
||||
VERSIONID(`@(#)riscos4.5.m4 8.4 (Berkeley) 9/25/96')
|
||||
|
||||
ifdef(`LOCAL_MAILER_ARGS',, `define(`LOCAL_MAILER_ARGS', `rmail -d $u')')dnl
|
||||
ifdef(`ALIAS_FILE',, `define(`ALIAS_FILE', `/usr/lib/aliases')')dnl
|
||||
define(`ALIAS_FILE', `/usr/lib/aliases')dnl
|
||||
ifdef(`QUEUE_DIR',, `define(`QUEUE_DIR', `/usr/spool/mqueue')')dnl
|
||||
ifdef(`HELP_FILE',, `define(`HELP_FILE', `/usr/lib/sendmail.hf')')dnl
|
||||
|
|
|
@ -34,12 +34,12 @@ divert(-1)
|
|||
#
|
||||
|
||||
divert(0)
|
||||
VERSIONID(`@(#)sco3.2.m4 8.2 (Berkeley) 11/13/95')
|
||||
ifdef(`ALIAS_FILE',, `define(`ALIAS_FILE', /usr/lib/mail/aliases)')dnl
|
||||
VERSIONID(`@(#)sco3.2.m4 8.4 (Berkeley) 9/25/96')
|
||||
define(`ALIAS_FILE', /usr/lib/mail/aliases)dnl
|
||||
ifdef(`QUEUE_DIR',, `define(`QUEUE_DIR', /usr/spool/mqueue)')dnl
|
||||
ifdef(`STATUS_FILE',, `define(`STATUS_FILE', /usr/lib/sendmail.st)')dnl
|
||||
ifdef(`UUCP_MAILER_PATH',, `define(`UUCP_MAILER_PATH', /usr/bin/uux)')dnl
|
||||
ifdef(`LOCAL_MAILER_PATH',, `define(`LOCAL_MAILER_PATH', /usr/bin/lmail)')dnl
|
||||
ifdef(`LOCAL_MAILER_FLAGS',, `define(`LOCAL_MAILER_FLAGS', PuhCE)')dnl
|
||||
ifdef(`LOCAL_MAILER_FLAGS',, `define(`LOCAL_MAILER_FLAGS', PuhCE9)')dnl
|
||||
ifdef(`LOCAL_MAILER_ARGS',, `define(`LOCAL_MAILER_ARGS', `lmail $u')')dnl
|
||||
ifdef(`LOCAL_SHELL_FLAGS',, `define(`LOCAL_SHELL_FLAGS', Peu)')dnl
|
||||
|
|
|
@ -34,12 +34,13 @@ divert(-1)
|
|||
#
|
||||
|
||||
divert(0)
|
||||
VERSIONID(`@(#)solaris2.m4 8.6 (Berkeley) 11/13/95')
|
||||
VERSIONID(`@(#)solaris2.m4 8.9 (Berkeley) 9/25/96')
|
||||
divert(-1)
|
||||
|
||||
ifdef(`ALIAS_FILE',, `define(`ALIAS_FILE', /etc/mail/aliases)')
|
||||
define(`ALIAS_FILE', /etc/mail/aliases)
|
||||
ifdef(`HELP_FILE',, `define(`HELP_FILE', /etc/mail/sendmail.hf)')
|
||||
ifdef(`STATUS_FILE',, `define(`STATUS_FILE', /etc/mail/sendmail.st)')
|
||||
ifdef(`LOCAL_MAILER_FLAGS',, `define(`LOCAL_MAILER_FLAGS', `SnE')')
|
||||
ifdef(`LOCAL_MAILER_FLAGS',, `define(`LOCAL_MAILER_FLAGS', `SnE9')')
|
||||
ifdef(`LOCAL_MAILER_ARGS',, `define(`LOCAL_MAILER_ARGS', `mail -f $g -d $u')')
|
||||
ifdef(`UUCP_MAILER_ARGS',, `define(`UUCP_MAILER_ARGS', `uux - -r -a$g $h!rmail ($u)')')
|
||||
define(`confCW_FILE', /etc/mail/sendmail.cw)
|
||||
|
|
|
@ -0,0 +1,51 @@
|
|||
divert(-1)
|
||||
#
|
||||
# Copyright (c) 1983 Eric P. Allman
|
||||
# Copyright (c) 1988, 1993
|
||||
# The Regents of the University of California. All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions
|
||||
# are met:
|
||||
# 1. Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
# 2. Redistributions in binary form must reproduce the above copyright
|
||||
# notice, this list of conditions and the following disclaimer in the
|
||||
# documentation and/or other materials provided with the distribution.
|
||||
# 3. All advertising materials mentioning features or use of this software
|
||||
# must display the following acknowledgement:
|
||||
# This product includes software developed by the University of
|
||||
# California, Berkeley and its contributors.
|
||||
# 4. Neither the name of the University nor the names of its contributors
|
||||
# may be used to endorse or promote products derived from this software
|
||||
# without specific prior written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
|
||||
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
# ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
|
||||
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
# SUCH DAMAGE.
|
||||
#
|
||||
# This ostype file is suitable for use on Solaris 2.x systems that
|
||||
# have mail.local installed. It is my understanding that this is
|
||||
# standard as of Solaris 2.5.
|
||||
#
|
||||
|
||||
divert(0)
|
||||
VERSIONID(`@(#)solaris2.ml.m4 8.2 (Berkeley) 9/25/96')
|
||||
divert(-1)
|
||||
|
||||
define(`ALIAS_FILE', /etc/mail/aliases)
|
||||
ifdef(`HELP_FILE',, `define(`HELP_FILE', /etc/mail/sendmail.hf)')
|
||||
ifdef(`STATUS_FILE',, `define(`STATUS_FILE', /etc/mail/sendmail.st)')
|
||||
ifdef(`LOCAL_MAILER_PATH',, `define(`LOCAL_MAILER_PATH', `/usr/lib/mail.local')')
|
||||
ifdef(`LOCAL_MAILER_FLAGS',, `define(`LOCAL_MAILER_FLAGS', `fSmn9')')
|
||||
ifdef(`LOCAL_MAILER_ARGS',, `define(`LOCAL_MAILER_ARGS', `mail.local -d $u')')
|
||||
ifdef(`UUCP_MAILER_ARGS',, `define(`UUCP_MAILER_ARGS', `uux - -r -a$g $h!rmail ($u)')')
|
||||
define(`confCW_FILE', /etc/mail/sendmail.cw)
|
|
@ -34,12 +34,12 @@ divert(-1)
|
|||
#
|
||||
|
||||
divert(0)
|
||||
VERSIONID(`@(#)svr4.m4 8.2 (Berkeley) 5/26/95')
|
||||
VERSIONID(`@(#)svr4.m4 8.4 (Berkeley) 9/25/96')
|
||||
|
||||
ifdef(`ALIAS_FILE',,`define(`ALIAS_FILE', /usr/ucblib/aliases)')dnl
|
||||
define(`ALIAS_FILE', /usr/ucblib/aliases)dnl
|
||||
ifdef(`HELP_FILE',,`define(`HELP_FILE', /usr/ucblib/sendmail.hf)')dnl
|
||||
ifdef(`STATUS_FILE',,`define(`STATUS_FILE', /usr/ucblib/sendmail.st)')dnl
|
||||
define(`LOCAL_MAILER_PATH', `/usr/ucblib/binmail')dnl
|
||||
define(`LOCAL_MAILER_FLAGS', `rmn')dnl
|
||||
define(`LOCAL_MAILER_FLAGS', `rmn9')dnl
|
||||
define(`LOCAL_SHELL_FLAGS', `ehuP')dnl
|
||||
define(`UUCP_MAILER_ARGS', `uux - -r -a$g -gmedium $h!rmail ($u)')dnl
|
||||
|
|
|
@ -0,0 +1,49 @@
|
|||
divert(-1)
|
||||
#
|
||||
# Copyright (c) 1983 Eric P. Allman
|
||||
# Copyright (c) 1988, 1993
|
||||
# The Regents of the University of California. All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions
|
||||
# are met:
|
||||
# 1. Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
# 2. Redistributions in binary form must reproduce the above copyright
|
||||
# notice, this list of conditions and the following disclaimer in the
|
||||
# documentation and/or other materials provided with the distribution.
|
||||
# 3. All advertising materials mentioning features or use of this software
|
||||
# must display the following acknowledgement:
|
||||
# This product includes software developed by the University of
|
||||
# California, Berkeley and its contributors.
|
||||
# 4. Neither the name of the University nor the names of its contributors
|
||||
# may be used to endorse or promote products derived from this software
|
||||
# without specific prior written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
|
||||
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
# ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
|
||||
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
# SUCH DAMAGE.
|
||||
#
|
||||
# Definitions for UXP/DS (Fujitsu/ICL DS/90 series)
|
||||
# Diego R. Lopez, CICA (Seville). 1995
|
||||
#
|
||||
|
||||
divert(0)
|
||||
VERSIONID(`@(#)uxpds.m4 8.3 (Berkeley) 9/25/96')
|
||||
|
||||
define(`confDEF_GROUP_ID', `6')
|
||||
define(`ALIAS_FILE', /usr/ucblib/aliases)dnl
|
||||
ifdef(`HELP_FILE',,`define(`HELP_FILE', /usr/ucblib/sendmail.hf)')dnl
|
||||
ifdef(`STATUS_FILE',,`define(`STATUS_FILE', /usr/ucblib/sendmail.st)')dnl
|
||||
define(`LOCAL_MAILER_PATH', `/usr/ucblib/binmail')dnl
|
||||
define(`LOCAL_MAILER_FLAGS', `rmn9')dnl
|
||||
define(`LOCAL_SHELL_FLAGS', `ehuP')dnl
|
||||
define(`UUCP_MAILER_ARGS', `uux - -r -a$f -gmedium $h!rmail ($u)')dnl
|
|
@ -0,0 +1,203 @@
|
|||
#!/usr/bin/perl
|
||||
#
|
||||
# re-mqueue -- requeue messages from queueA to queueB based on age.
|
||||
#
|
||||
# Contributed by Paul Pomes <ppomes@Qualcomm.COM>.
|
||||
# http://www.qualcomm.com/~ppomes/
|
||||
#
|
||||
# Usage: re-mqueue [-d] queueA queueB seconds
|
||||
#
|
||||
# -d enable debugging
|
||||
# queueA source directory
|
||||
# queueB destination directory
|
||||
# seconds select files older than this number of seconds
|
||||
#
|
||||
# Example: re-mqueue /var/spool/mqueue /var/spool/mqueue2 2700
|
||||
#
|
||||
# Moves the qf* and df* files for a message from /var/spool/mqueue to
|
||||
# /var/spool/mqueue2 if the df* file is over 2700 seconds old.
|
||||
#
|
||||
# The qf* file can't be used for age checking as it's partially re-written
|
||||
# with the results of the last queue run.
|
||||
#
|
||||
# Rationale: With a limited number of sendmail processes allowed to run,
|
||||
# messages that can't be delivered immediately slow down the ones that can.
|
||||
# This becomes especially important when messages are being queued instead
|
||||
# of delivered right away, or when the queue becomes excessively deep.
|
||||
# By putting messages that have already failed one or more delivery attempts
|
||||
# into another queue, the primary queue can be kept small and fast.
|
||||
#
|
||||
# On postoffice.cso.uiuc.edu, the primary sendmail daemon runs the queue
|
||||
# every thirty minutes. Messages over 45 minutues old are moved to
|
||||
# /var/spool/mqueue2 where sendmail runs every hour. Messages more than
|
||||
# 3.25 hours old are moved to /var/spool/mqueue3 where sendmail runs every
|
||||
# four hours. Messages more than a day old are moved to /var/spool/mqueue4
|
||||
# where sendmail runs three times a day. The idea is that a message is
|
||||
# tried at least twice in the first three queues before being moved to the
|
||||
# old-age ghetto.
|
||||
#
|
||||
# (Each must be re-formed into a single line before using in crontab)
|
||||
#
|
||||
# 08 * * * * /usr/local/libexec/re-mqueue /var/spool/mqueue ## /var/spool/mqueue2 2700
|
||||
# 11 * * * * /usr/lib/sendmail -oQ/var/spool/mqueue2 -q > ## > /var/log/mqueue2 2>&1
|
||||
# 38 * * * * /usr/local/libexec/re-mqueue /var/spool/mqueue2
|
||||
# /var/spool/mqueue3 11700
|
||||
# 41 1,5,9,13,17,21 * * * /usr/lib/sendmail -oQ/var/spool/mqueue3 -q ## > /var/log/mqueue3 2>&1
|
||||
# 48 * * * * /usr/local/libexec/re-mqueue /var/spool/mqueue3
|
||||
# /var/spool/mqueue4 100000
|
||||
#53 3,11,19 * * * /usr/lib/sendmail -oQ/var/spool/mqueue4 -q > ## > /var/log/mqueue4 2>&1
|
||||
#
|
||||
#
|
||||
# N.B., the moves are done with link(). This has two effects: 1) the mqueue*
|
||||
# directories must all be on the same filesystem, and 2) the file modification
|
||||
# times are not changed. All times must be cumulative from when the df*
|
||||
# file was created.
|
||||
#
|
||||
# Copyright (c) 1995 University of Illinois Board of Trustees and Paul Pomes
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions
|
||||
# are met:
|
||||
# 1. Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
# 2. Redistributions in binary form must reproduce the above copyright
|
||||
# notice, this list of conditions and the following disclaimer in the
|
||||
# documentation and/or other materials provided with the distribution.
|
||||
# 3. All advertising materials mentioning features or use of this software
|
||||
# must display the following acknowledgement:
|
||||
# This product includes software developed by the University of
|
||||
# Illinois at Urbana and their contributors.
|
||||
# 4. Neither the name of the University nor the names of their contributors
|
||||
# may be used to endorse or promote products derived from this software
|
||||
# without specific prior written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE TRUSTEES AND CONTRIBUTORS ``AS IS'' AND
|
||||
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
# ARE DISCLAIMED. IN NO EVENT SHALL THE TRUSTEES OR CONTRIBUTORS BE LIABLE
|
||||
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
# SUCH DAMAGE.
|
||||
#
|
||||
# @(#)$Id: re-mqueue,v 1.3 1995/05/25 18:14:53 p-pomes Exp $
|
||||
|
||||
require "syslog.pl";
|
||||
|
||||
$LOCK_EX = 2;
|
||||
$LOCK_NB = 4;
|
||||
$LOCK_UN = 8;
|
||||
|
||||
# Count arguments, exit if wrong in any way.
|
||||
die "Usage: $0 [-d] queueA queueB seconds\n" if ($#ARGV < 2);
|
||||
|
||||
while ($_ = $ARGV[0], /^-/) {
|
||||
shift;
|
||||
last if /^--$/;
|
||||
/^-d/ && $debug++;
|
||||
}
|
||||
|
||||
$queueA = shift;
|
||||
$queueB = shift;
|
||||
$age = shift;
|
||||
|
||||
die "$0: $queueA not a directory\n" if (! -d $queueA);
|
||||
die "$0: $queueB not a directory\n" if (! -d $queueB);
|
||||
die "$0: $age isn't a valid number of seconds for age\n" if ($age =~ /\D/);
|
||||
|
||||
# chdir to $queueA and read the directory. When a df* file is found, stat it.
|
||||
# If it's older than $age, lock the corresponding qf* file. If the lock
|
||||
# fails, give up and move on. Once the lock is obtained, verify that files
|
||||
# of the same name *don't* already exist in $queueB and move on if they do.
|
||||
# Otherwise re-link the qf* and df* files into $queueB then release the lock.
|
||||
|
||||
chdir "$queueA" || die "$0: can't cd to $queueA: $!\n";
|
||||
opendir (QA, ".") || die "$0: can't open directory $queueA for reading: $!\n";
|
||||
@dfiles = grep(/^df/, readdir(QA));
|
||||
$now = time();
|
||||
($program = $0) =~ s,.*/,,;
|
||||
&openlog($program, 'pid', 'mail');
|
||||
|
||||
# Loop through the dfiles
|
||||
while ($dfile = pop(@dfiles)) {
|
||||
print "Checking $dfile\n" if ($debug);
|
||||
($qfile = $dfile) =~ s/^d/q/;
|
||||
($mfile = $dfile) =~ s/^df//;
|
||||
if (! -e $dfile || -z $dfile) {
|
||||
print "$dfile is gone or zero bytes - skipping\n" if ($debug);
|
||||
next;
|
||||
}
|
||||
if (! -e $qfile || -z $qfile) {
|
||||
print "$qfile is gone or zero bytes - skipping\n" if ($debug);
|
||||
next;
|
||||
}
|
||||
|
||||
$mtime = $now;
|
||||
($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,
|
||||
$atime,$mtime,$ctime,$blksize,$blocks) = stat($dfile);
|
||||
|
||||
# Compare timestamps
|
||||
if (($mtime + $age) > $now) {
|
||||
printf ("%s is %d seconds old - skipping\n", $dfile, $now-$mtime) if ($debug);
|
||||
next;
|
||||
}
|
||||
|
||||
# See if files of the same name already exist in $queueB
|
||||
if (-e "$queueB/$dfile") {
|
||||
print "$queueb/$dfile already exists - skipping\n" if ($debug);
|
||||
next;
|
||||
}
|
||||
if (-e "$queueB/$qfile") {
|
||||
print "$queueb/$qfile already exists - skipping\n" if ($debug);
|
||||
next;
|
||||
}
|
||||
|
||||
# Try and lock qf* file
|
||||
unless (open(QF, ">>$qfile")) {
|
||||
print "$qfile: $!\n" if ($debug);
|
||||
next;
|
||||
}
|
||||
$retval = flock(QF, $LOCK_EX|$LOCK_NB) || ($retval = -1);
|
||||
if ($retval == -1) {
|
||||
print "$qfile already flock()ed - skipping\n" if ($debug);
|
||||
close(QF);
|
||||
next;
|
||||
}
|
||||
print "$qfile now flock()ed\n" if ($debug);
|
||||
|
||||
# Show time! Do the link()s
|
||||
if (link("$dfile", "$queueB/$dfile") == 0) {
|
||||
&syslog('err', 'link(%s, %s/%s): %m', $dfile, $queueB, $dfile);
|
||||
print STDERR "$0: link($dfile, $queueB/$dfile): $!\n";
|
||||
exit (1);
|
||||
}
|
||||
if (link("$qfile", "$queueB/$qfile") == 0) {
|
||||
&syslog('err', 'link(%s, %s/%s): %m', $qfile, $queueB, $qfile);
|
||||
print STDERR "$0: link($qfile, $queueB/$qfile): $!\n";
|
||||
unlink("$queueB/$dfile");
|
||||
exit (1);
|
||||
}
|
||||
|
||||
# Links created successfully. Unlink the original files, release the
|
||||
# lock, and close the file.
|
||||
print "links ok\n" if ($debug);
|
||||
if (unlink($qfile) == 0) {
|
||||
&syslog('err', 'unlink(%s): %m', $qfile);
|
||||
print STDERR "$0: unlink($qfile): $!\n";
|
||||
exit (1);
|
||||
}
|
||||
if (unlink($dfile) == 0) {
|
||||
&syslog('err', 'unlink(%s): %m', $dfile);
|
||||
print STDERR "$0: unlink($dfile): $!\n";
|
||||
exit (1);
|
||||
}
|
||||
flock(QF, $LOCK_UN);
|
||||
close(QF);
|
||||
&syslog('info', '%s moved to %s', $mfile, $queueB);
|
||||
print "Done with $dfile $qfile\n\n" if ($debug);
|
||||
}
|
||||
exit 0;
|
File diff suppressed because it is too large
Load Diff
|
@ -38,7 +38,7 @@ static char copyright[] =
|
|||
#endif /* not lint */
|
||||
|
||||
#ifndef lint
|
||||
static char sccsid[] = "@(#)mail.local.c 8.22 (Berkeley) 6/21/95";
|
||||
static char sccsid[] = "@(#)mail.local.c 8.30 (Berkeley) 10/9/96";
|
||||
#endif /* not lint */
|
||||
|
||||
/*
|
||||
|
@ -63,10 +63,13 @@ static char sccsid[] = "@(#)mail.local.c 8.22 (Berkeley) 6/21/95";
|
|||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <sysexits.h>
|
||||
#include <syslog.h>
|
||||
#include <time.h>
|
||||
#include <unistd.h>
|
||||
#ifdef EX_OK
|
||||
# undef EX_OK /* unistd.h may have another use for this */
|
||||
#endif
|
||||
#include <sysexits.h>
|
||||
#include <ctype.h>
|
||||
|
||||
#if __STDC__
|
||||
|
@ -75,6 +78,46 @@ static char sccsid[] = "@(#)mail.local.c 8.22 (Berkeley) 6/21/95";
|
|||
#include <varargs.h>
|
||||
#endif
|
||||
|
||||
#if (defined(sun) && defined(__svr4__)) || defined(__SVR4)
|
||||
# define USE_LOCKF 1
|
||||
# define USE_SETEUID 1
|
||||
# define _PATH_MAILDIR "/var/mail"
|
||||
#endif
|
||||
|
||||
#if defined(_AIX)
|
||||
# define USE_LOCKF 1
|
||||
# define USE_VSYSLOG 0
|
||||
#endif
|
||||
|
||||
#if defined(ultrix)
|
||||
# define USE_VSYSLOG 0
|
||||
#endif
|
||||
|
||||
#if defined(__osf__)
|
||||
# define USE_VSYSLOG 0
|
||||
#endif
|
||||
|
||||
#if defined(NeXT)
|
||||
# include <libc.h>
|
||||
# define _PATH_MAILDIR "/usr/spool/mail"
|
||||
# define __dead /* empty */
|
||||
# define S_IRUSR S_IREAD
|
||||
# define S_IWUSR S_IWRITE
|
||||
#endif
|
||||
|
||||
/*
|
||||
* If you don't have flock, you could try using lockf instead.
|
||||
*/
|
||||
|
||||
#ifdef USE_LOCKF
|
||||
# define flock(a, b) lockf(a, b, 0)
|
||||
# define LOCK_EX F_LOCK
|
||||
#endif
|
||||
|
||||
#ifndef USE_VSYSLOG
|
||||
# define USE_VSYSLOG 1
|
||||
#endif
|
||||
|
||||
#ifndef LOCK_EX
|
||||
# include <sys/file.h>
|
||||
#endif
|
||||
|
@ -101,8 +144,12 @@ static char sccsid[] = "@(#)mail.local.c 8.22 (Berkeley) 6/21/95";
|
|||
|
||||
#ifndef BSD4_4
|
||||
# define _BSD_VA_LIST_ va_list
|
||||
#endif
|
||||
|
||||
#if !defined(BSD4_4) && !defined(linux)
|
||||
extern char *strerror __P((int));
|
||||
extern int snprintf __P((char *, int, const char *, ...));
|
||||
extern FILE *fdopen __P((int, const char *));
|
||||
#endif
|
||||
|
||||
/*
|
||||
|
@ -135,6 +182,8 @@ int store __P((char *));
|
|||
void usage __P((void));
|
||||
void vwarn __P((const char *, _BSD_VA_LIST_));
|
||||
void warn __P((const char *, ...));
|
||||
void lockmbox __P((char *));
|
||||
void unlockmbox __P((void));
|
||||
|
||||
int
|
||||
main(argc, argv)
|
||||
|
@ -341,15 +390,16 @@ tryagain:
|
|||
warn("%s: irregular file", path);
|
||||
goto err0;
|
||||
} else if (sb.st_uid != pw->pw_uid) {
|
||||
eval = EX_CANTCREAT;
|
||||
warn("%s: wrong ownership (%d)", path, sb.st_uid);
|
||||
unlockmbox();
|
||||
return;
|
||||
goto err0;
|
||||
} else {
|
||||
mbfd = open(path, O_APPEND|O_WRONLY, 0);
|
||||
if (mbfd != -1 &&
|
||||
(fstat(mbfd, &fsb) || fsb.st_nlink != 1 ||
|
||||
!S_ISREG(fsb.st_mode) || sb.st_dev != fsb.st_dev ||
|
||||
sb.st_ino != fsb.st_ino || sb.st_uid != fsb.st_uid)) {
|
||||
eval = EX_CANTCREAT;
|
||||
warn("%s: file changed after open", path);
|
||||
goto err1;
|
||||
}
|
||||
|
@ -449,6 +499,7 @@ err0: unlockmbox();
|
|||
char lockname[MAXPATHLEN];
|
||||
int locked = 0;
|
||||
|
||||
void
|
||||
lockmbox(path)
|
||||
char *path;
|
||||
{
|
||||
|
@ -481,6 +532,7 @@ lockmbox(path)
|
|||
}
|
||||
}
|
||||
|
||||
void
|
||||
unlockmbox()
|
||||
{
|
||||
if (!locked)
|
||||
|
@ -587,7 +639,7 @@ vwarn(fmt, ap)
|
|||
(void)vfprintf(stderr, fmt, ap);
|
||||
(void)fprintf(stderr, "\n");
|
||||
|
||||
#if !defined(ultrix) && !defined(__osf__)
|
||||
#if USE_VSYSLOG
|
||||
/* Log the message to syslog. */
|
||||
vsyslog(LOG_ERR, fmt, ap);
|
||||
#else
|
||||
|
@ -693,9 +745,8 @@ e_to_sys(num)
|
|||
}
|
||||
}
|
||||
|
||||
#ifndef BSD4_4
|
||||
#if !defined(BSD4_4) && !defined(__osf__)
|
||||
|
||||
# ifndef __osf__
|
||||
char *
|
||||
strerror(eno)
|
||||
int eno;
|
||||
|
@ -709,8 +760,11 @@ strerror(eno)
|
|||
(void) sprintf(ebuf, "Error %d", eno);
|
||||
return ebuf;
|
||||
}
|
||||
|
||||
# endif
|
||||
|
||||
#if !defined(BSD4_4) && !defined(linux)
|
||||
|
||||
# if __STDC__
|
||||
snprintf(char *buf, int bufsiz, const char *fmt, ...)
|
||||
# else
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
# @(#)Makefile 8.1 (Berkeley) 6/7/93
|
||||
# @(#)Makefile 8.2 (Berkeley) 9/21/96
|
||||
|
||||
PROG= praliases
|
||||
MAN8= praliases.0
|
||||
CFLAGS+=-I${.CURDIR}/../src
|
||||
DPADD= ${LIBDBM}
|
||||
NOMAN= noman
|
||||
|
||||
.include "../../Makefile.inc"
|
||||
.include <bsd.prog.mk>
|
||||
|
|
|
@ -0,0 +1,41 @@
|
|||
.\" @(#)praliases.8 8.1 (Berkeley) 9/21/96
|
||||
.Dd April 25, 1996
|
||||
.Dt PRALIASES 1
|
||||
.Os BSD 3
|
||||
.Sh NAME
|
||||
.Nm praliases
|
||||
.Nd display system mail aliases
|
||||
.Sh SYNOPSIS
|
||||
.Nm praliases
|
||||
.Op Fl f Ar file
|
||||
.Sh DESCRIPTION
|
||||
The
|
||||
.Nm praliases
|
||||
utility displays the current system aliases,
|
||||
one per line, in no particular order.
|
||||
.Pp
|
||||
The options are as follows:
|
||||
.Bl -tag -width Ds
|
||||
.It Fl f
|
||||
Read the specified file instead of the default
|
||||
.Nm sendmail
|
||||
system aliases file.
|
||||
.El
|
||||
.Pp
|
||||
The
|
||||
.Nm praliases
|
||||
utility exits 0 on success, and >0 if an error occurs.
|
||||
.Sh FILES
|
||||
.Bl -tag -width /var/log/sendmail.stXX -compact
|
||||
.It Pa /etc/aliases
|
||||
The default
|
||||
.Nm sendmail
|
||||
system aliases file.
|
||||
.It Pa /etc/aliases.db
|
||||
The database version of the
|
||||
.Pa /etc/aliases
|
||||
file.
|
||||
.El
|
||||
.Sh SEE ALSO
|
||||
.Xr mailq 1 ,
|
||||
.Xr sendmail 8
|
|
@ -39,10 +39,11 @@ static char copyright[] =
|
|||
#endif /* not lint */
|
||||
|
||||
#ifndef lint
|
||||
static char sccsid[] = "@(#)praliases.c 8.3 (Berkeley) 3/6/94";
|
||||
static char sccsid[] = "@(#)praliases.c 8.4 (Berkeley) 9/25/96";
|
||||
#endif /* not lint */
|
||||
|
||||
#include <ndbm.h>
|
||||
#define NOT_SENDMAIL
|
||||
#include <sendmail.h>
|
||||
#ifdef NEWDB
|
||||
#include <db.h>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# Copyright (c) 1983, 1995 Eric P. Allman
|
||||
# Copyright (c) 1983, 1995, 1996 Eric P. Allman
|
||||
# Copyright (c) 1988 The Regents of the University of California.
|
||||
# All rights reserved.
|
||||
#
|
||||
|
@ -30,7 +30,7 @@
|
|||
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
# SUCH DAMAGE.
|
||||
#
|
||||
# @(#)READ_ME 8.113 (Berkeley) 11/29/95
|
||||
# @(#)READ_ME 8.125 (Berkeley) 10/18/96
|
||||
#
|
||||
|
||||
This directory contains the source files for sendmail.
|
||||
|
@ -144,46 +144,56 @@ There are several database formats that can be used for the alias files
|
|||
and for general maps. When used for alias files they interact in an
|
||||
attempt to be back compatible.
|
||||
|
||||
The three options are NEWDB (the new Berkeley DB package), NDBM (the
|
||||
older DBM implementation -- the very old V7 implementation is no
|
||||
longer supported), and NIS (Network Information Services). Used alone
|
||||
these just include the support they indicate. [If you are using NEWDB,
|
||||
get the latest version from FTP.CS.Berkeley.EDU in /ucb/4bsd/db.tar.Z
|
||||
(or db.tar.gz). DO NOT use the version from the Net2 distribution!
|
||||
However, if you are on BSD/386 or 386BSD-based systems, use the one
|
||||
that already exists on your system. You may need to #define OLD_NEWDB
|
||||
1 to do this.]
|
||||
The options are:
|
||||
|
||||
[NOTE WELL: it is CRITICAL that you remove ndbm.o from libdb.a and
|
||||
ndbm.h from the appropriate include directories if you want to get
|
||||
ndbm support. These files OVERRIDE calls to ndbm routines -- in
|
||||
particular, if you leave ndbm.h in, you can find yourself using
|
||||
the new db package even if you don't define NEWDB.]
|
||||
NEWDB The new Berkeley DB package. Some systems (e.g., BSD/OS and
|
||||
Digital UNIX 4.0) have this package pre-installed. If your
|
||||
system does not have NEWDB installed, get the latest version
|
||||
from FTP.CS.Berkeley.EDU in /ucb/4bsd/db.tar.gz (or db.tar.Z).
|
||||
DO NOT use the version from the Net2 distribution. If you are
|
||||
still running BSD/386 1.x, you will also need to define
|
||||
OLD_NEWDB.
|
||||
NDBM The older NDBM implementation -- the very old V7 DBM
|
||||
implementation is no longer supported.
|
||||
NIS Network Information Services. To use this you must have
|
||||
NIS support on your system.
|
||||
NISPLUS NIS+ (the revised NIS released with Solaris 2). You must
|
||||
have NIS+ support on your system to use this flag.
|
||||
HESIOD Support for Hesiod (from the DEC/Athena distribution). You
|
||||
must already have Hesiod support on your system for this to
|
||||
work. You may be able to get this to work with the MIT/Athena
|
||||
version of Hesiod, but that's likely to be a lot of work.
|
||||
LDAPMAP Lightweight Directory Lookup Protocol support. You will
|
||||
have to install the UMich ldap and lber libraries to use
|
||||
this flag.
|
||||
|
||||
>>> NOTE WELL for NEWDB support: it is CRITICAL that you remove ndbm.o
|
||||
>>> from libdb.a and ndbm.h from the appropriate include directories if
|
||||
>>> you want to get ndbm support. If you don't delete these, there is
|
||||
>>> absolutely no point to including -DNDBM, since it will just get you
|
||||
>>> another (inferior) API to the same format database. These files
|
||||
>>> OVERRIDE calls to ndbm routines -- in particular, if you leave ndbm.h
|
||||
>>> in, you can find yourself using the new db package even if you don't
|
||||
>>> define NEWDB.
|
||||
|
||||
If NEWDB and NDBM are defined (but not NIS), then sendmail will read
|
||||
NDBM format alias files, but the next time a newaliases is run the
|
||||
format will be converted to NEWDB; that format will be used forever
|
||||
more. This is intended as a transition feature. [Note however that
|
||||
the NEWDB library also catches and maps NDBM calls; you will have to
|
||||
back out this feature to get this to work. See ``Quirks'' section
|
||||
below for details.]
|
||||
more. This is intended as a transition feature.
|
||||
|
||||
If all three are defined and the name of the file includes the string
|
||||
"/yp/", sendmail will rebuild BOTH the NEWDB and NDBM format alias
|
||||
files. However, it will only read the NEWDB file; the NDBM format file
|
||||
is used only by the NIS subsystem.
|
||||
If NEWDB, NDBM, and NIS are all defined and the name of the file includes
|
||||
the string "/yp/", sendmail will rebuild BOTH the NEWDB and NDBM format
|
||||
alias files. However, it will only read the NEWDB file; the NDBM format
|
||||
file is used only by the NIS subsystem. This is needed because the NIS
|
||||
maps on an NIS server are built directly from the NDBM files.
|
||||
|
||||
If NDBM and NIS are defined (regardless of the definition of NEWDB),
|
||||
and the filename includes the string "/yp/", sendmail adds the special
|
||||
tokens "YP_LAST_MODIFIED" and "YP_MASTER_NAME", both of which are
|
||||
required if the NDBM file is to be used as an NIS map.
|
||||
|
||||
There is also preliminary support for NIS+ (-DNISPLUS), Hesiod
|
||||
(-DHESIOD), and NetInfo (-DNETINFO). These have not been well
|
||||
tested.
|
||||
|
||||
All of -DNEWDB, -DNDBM, -DNIS, -DNISPLUS, -DHESIOD, and -DNETINFO are
|
||||
normally defined in the DBMDEF line in the Makefile.
|
||||
All of these flags are normally defined in the DBMDEF line in the
|
||||
Makefile.
|
||||
|
||||
If you define NEWDB or HESIOD you get the User Database (USERDB)
|
||||
automatically. Generally you do want to have NEWDB for it to do
|
||||
|
@ -191,6 +201,11 @@ anything interesting. See above for getting the Berkeley "db"
|
|||
package (i.e., NEWDB). There is no separate "user database"
|
||||
package -- don't bother searching for it on the net.
|
||||
|
||||
Hesiod and LDAP require libraries that may not be installed with your
|
||||
system. These are outside of my ability to provide support. See the
|
||||
"Quirks" section for more information.
|
||||
|
||||
|
||||
|
||||
+---------------+
|
||||
| COMPILE FLAGS |
|
||||
|
@ -462,7 +477,7 @@ IP_SRCROUTE Define this to 1 to get IP source routing information
|
|||
it won't compile properly (that is, no support for fetching
|
||||
IP_OPTIONs), or it compiles but source-routed TCP connections
|
||||
either refuse to open or open and hang for no apparent reason.
|
||||
Ultrix and AIX are known to fail this way.
|
||||
Ultrix and AIX3 are known to fail this way.
|
||||
LOG Set this to get syslog(3) support. Defined by default
|
||||
in conf.h. You want this if at all possible.
|
||||
NETINET Set this to get TCP/IP support. Defined by default
|
||||
|
@ -500,6 +515,19 @@ HES_GETMAILHOST Define this to 1 if you are using Hesiod with the
|
|||
Hesiod distribution, but not with the DEC Hesiod distribution.
|
||||
XDEBUG Do additional internal checking. These don't cost too
|
||||
much; you might as well leave this on.
|
||||
TCPWRAPPERS Turns on support for the TCP wrappers library (-lwrap).
|
||||
This library is available on ftp.win.tue.nl in /pub/security;
|
||||
grab tcp_wrappers_<VER>.tar.gz (where <VER> is the highest
|
||||
numbered version).
|
||||
SECUREWARE Enable calls to the SecureWare luid enabling/changing routines.
|
||||
SecureWare is a C2 security package added to several UNIX's
|
||||
(notably ConvexOS) to get a C2 Secure system. This
|
||||
option causes mail delivery to be done with the luid of the
|
||||
recipient.
|
||||
SHARE_V1 Support for the fair share scheduler, version 1. Setting to
|
||||
1 causes final delivery to be done using the recipients
|
||||
resource limitations. So far as I know, this is only
|
||||
supported on ConvexOS.
|
||||
|
||||
|
||||
+---------------------+
|
||||
|
@ -515,7 +543,10 @@ dn_skipname.
|
|||
|
||||
Some people have had a problem with BIND 4.9; it uses some routines
|
||||
that it expects to be externally defined such as strerror(). It may
|
||||
help to link with "-l44bsd" to solve this problem.
|
||||
help to link with "-l44bsd" to solve this problem. This has apparently
|
||||
been fixed in later versions of BIND, starting around 4.9.3. In other
|
||||
words, if you use 4.9.0 through 4.9.2, you need -l44bsd; for earlier or
|
||||
later versions, you do not.
|
||||
|
||||
!PLEASE! be sure to link with the same version of the resolver as
|
||||
the header files you used -- some people have used the 4.9 headers
|
||||
|
@ -587,6 +618,13 @@ Configuration file location
|
|||
vendor location rather than changing the location in the sendmail
|
||||
binary.
|
||||
|
||||
ld: fatal: library -l44bsd: not found
|
||||
Most of the Makefiles include -l44bsd in the LIBS= definition;
|
||||
this is because several versions of BIND (4.9.0, 4.9.1, 4.9.2)
|
||||
require this library. If you are running one of these versions,
|
||||
install this library. Otherwise, just delete "-l44bsd" from the
|
||||
LIBS= line in the Makefile.
|
||||
|
||||
SunOS 4.x (Solaris 1.x)
|
||||
You may have to use -lresolv on SunOS. However, beware that
|
||||
this links in a new version of gethostbyname that does not
|
||||
|
@ -631,17 +669,18 @@ SunOS 4.0.2 (Sun 386i)
|
|||
(and change the Makefile to use this library).
|
||||
Note that the sendmail.cf and aliases files are found in /etc.
|
||||
|
||||
SunOS 4.1.3_U1
|
||||
Sendmail causes crashes on SunOS 4.1.3_U1. According to Sun
|
||||
bug number 1077939:
|
||||
SunOS 4.1.3, 4.1.3_U1
|
||||
Sendmail causes crashes on SunOS 4.1.3 and 4.1.3_U1. According
|
||||
to Sun bug number 1077939:
|
||||
|
||||
If an application does a getsockopt() on a SOCK_STREAM (TCP) socket
|
||||
after the other side of the connection has sent a TCP RESET for
|
||||
the stream, the kernel gets a Bus Trap in the tcp_ctloutput() or
|
||||
ip_ctloutput() routine.
|
||||
|
||||
This is fixed in patch 101790-01 (SunOS 4.1.3_U1: TCP socket and
|
||||
reset problems).
|
||||
For 4.1.3, this is fixed in patch 100584-08, available on the
|
||||
Sunsolve 2.7.1 or later CDs. For 4.1.3_U1, this is fixed in patch
|
||||
101790-01 (SunOS 4.1.3_U1: TCP socket and reset problems).
|
||||
|
||||
Solaris 2.x (SunOS 5.x)
|
||||
To compile for Solaris, be sure you use -DSOLARIS.
|
||||
|
@ -751,6 +790,10 @@ OSF/1
|
|||
Also, the enclosed makefile removed /usr/sbin/smtpd; if you need
|
||||
it, just create the link to the sendmail binary.
|
||||
|
||||
On DEC OSF/1 3.2 or earlier, the MatchGECOS option doesn't work
|
||||
properly due to a bug in the getpw* routines. If you want to use
|
||||
this, use -DDEC_OSF_BROKEN_GETPWENT=1. The problem is fixed in 3.2C.
|
||||
|
||||
IRIX
|
||||
The header files on SGI IRIX are completely prototyped, and as
|
||||
a result you can sometimes get some warning messages during
|
||||
|
@ -931,7 +974,22 @@ Linux
|
|||
of libc between 4.4.4 and 4.7.0 (snprintf improves security, so
|
||||
you want to use this if at all possible).
|
||||
|
||||
AIX
|
||||
NOTE ON LINUX & BIND: By default, the Makefiles for linux include
|
||||
header files in /usr/local/include and libraries in /usr/local/lib.
|
||||
If you've installed BIND on your system, the header files typically
|
||||
end up in the search path and you need to add "-lresolv" to the
|
||||
LIBS line in your Makefile. Really old versions may need to include
|
||||
"-l44bsd" as well (particularly if the link phase complains about
|
||||
missing strcasecmp, strncasecmp or strpbrk). Complaints about an
|
||||
undefined reference to `__dn_skipname' in domain.o are a sure sign
|
||||
that you need to add -lresolv to LIBS. Newer versions of linux
|
||||
are basically threaded BIND, so you may or may not see complaints
|
||||
if you accidentally mix BIND headers/libraries with virginal libc.
|
||||
If you have BIND headers in /usr/local/include (resolv.h, etc)
|
||||
you *should* be adding -lresolv to LIBS. Data structures may change
|
||||
and you'd be asking for a core dump.
|
||||
|
||||
AIX 3.x
|
||||
This version of sendmail does not support MB, MG, and MR resource
|
||||
records, which are supported by AIX sendmail.
|
||||
|
||||
|
@ -940,6 +998,56 @@ AIX
|
|||
necessary to replace the resolver, which will simplify installation.
|
||||
A new BIND resolver can be found at http://www.isc.org/isc/.
|
||||
|
||||
AIX 3.1.x
|
||||
The supplied load average code only works correctly for AIX 3.2.x.
|
||||
For 3.1, use -DLA_TYPE=LA_SUBR and get the latest ``monitor''
|
||||
package by Jussi Maki <jmaki@hut.fi> from ftp.funet.fi in the
|
||||
directory pub/unix/AIX/rs6000/monitor-1.12.tar.Z; use the loadavgd
|
||||
daemon, and the getloadavg subroutine supplied with that package.
|
||||
If you don't care about load average throttling, just turn off
|
||||
load average checking using -DLA_TYPE=LA_ZERO.
|
||||
|
||||
AIX 2.2.1
|
||||
Date: Mon Dec 4 14:14:56 CST 1995
|
||||
From: Mark Whetzel <markw@antimatr.houston.tx.us>
|
||||
Subject: Porting sendmail 8.7.2 to AIX V2 on the RT.
|
||||
|
||||
This version of sendmail does not support MB, MG, and MR resource
|
||||
records, which are supported by AIX sendmail.
|
||||
|
||||
AIX V2 on the RT does not have 'paths.h'. Create a null
|
||||
file in the 'obj' directory to remove this compile error.
|
||||
|
||||
A patch file is needed to get the BSD 'db' library to compile
|
||||
for AIX/RT. I have sent the necessary updates to the author,
|
||||
but they may not be immediately available.
|
||||
|
||||
The original AIX/RT resolver libraries are very old, and you
|
||||
should get the latest BIND to replace it. The 4.8.3 version
|
||||
has been tested, but 4.9.x is out and should work.
|
||||
|
||||
To make the load average code work correctly requires an
|
||||
external routine, as the kernel does not maintain system
|
||||
load averages, similar to AIX V3.1.x. A reverse port of the
|
||||
older 1.05 'monitor' load average daemon code written by
|
||||
Jussi Maki that will work on AIX V2 for the RT is available
|
||||
by E-mail to Mark Whetzel <markw@antimatr.houston.tx.us>.
|
||||
That code depends on an external daemon to collect system
|
||||
load information, and the external routine 'getloadavg',
|
||||
that will return that information. The 'LA_SUBR' define
|
||||
will handle this for AIX V2 on the RT.
|
||||
|
||||
Note: You will have to change the Makefile.AIX.2 to correctly
|
||||
point to the locatons of the updated BIND source tree and
|
||||
the location of the 'newdb' tree and library location.
|
||||
You will also have to change the Makefile.AIX.2 to know
|
||||
about the location of the 'getloadavg' routine if you use
|
||||
the LA_SUBR define.
|
||||
|
||||
|
||||
Manual pages will format correctly if given the mandoc macros
|
||||
and used with nroff. I have not tried groff.
|
||||
|
||||
RISC/os
|
||||
RISC/os from MIPS is a merged AT&T/Berkeley system. When you
|
||||
compile on that platform you will get duplicate definitions
|
||||
|
@ -1089,6 +1197,56 @@ Listproc 6.0c
|
|||
cause it to use "HELO hostname" (which Z-mail apparently requires
|
||||
as well. :)
|
||||
|
||||
LDAP
|
||||
LDAP was provided by Booker Bense <bbense@networking.stanford.edu> of
|
||||
Stanford University. From Booker:
|
||||
|
||||
- The patch attached to this message implements an Ldap map class.
|
||||
Currently we are using this at stanford to support campus-wide
|
||||
email addressing. This project is discussed at
|
||||
http://www-leland.stanford.edu/group/networking/project/sunetid.html
|
||||
|
||||
- Currently we are using the ldap map as follows:
|
||||
|
||||
Kluser ldapx
|
||||
-h"localhost borax.stanford.edu borate.stanford.edu boron.stanford.edu"
|
||||
-k"mailacceptinggeneralid=%s" -v maildrop
|
||||
|
||||
and in Rule set S5
|
||||
|
||||
# Now attempt to lookup in luser (ldap map)
|
||||
R< $L > $+ $: < $L > $( luser $1 $)
|
||||
R< $* > $+ @ $+ $: < $3 > $2 Rewrite if forward
|
||||
|
||||
- The map definition supports most of the standard Map args plus most
|
||||
of the command line options of ldapsearch. The software is currently
|
||||
limited to only accepting the first entry returned. It expects that
|
||||
the map defines an ldap filter that returns at most 1 valid entry.
|
||||
It requires the ldap and lber libraries from the Umich Ldap3.2
|
||||
release.
|
||||
|
||||
- KNOWN BUGS: It does not work under Digital Unix 3.2c, with gcc and
|
||||
ldap3.2 or ldap3.3. It dumps core after attempting to take strlen
|
||||
of a garbage string pointer in the lber libraries routine
|
||||
ber_printf.
|
||||
|
||||
The string pointer in question is set to 0x50000000, when the
|
||||
program crashes. If anyone recognizes where this magic number comes
|
||||
from that would be really helpful.
|
||||
|
||||
I've tested the software on Solaris.2.4 with gcc and on NeXTStep3.2
|
||||
and it runs without problems. If you have any questions, please
|
||||
send them along.
|
||||
|
||||
TCP Wrappers
|
||||
If you are using -DTCPWRAPPERS to get TCP Wrappers support, you will
|
||||
also need to install libwrap.a (you can get it from ftp.win.tue.nl)
|
||||
and modify the Makefile to include -lwrap in the LIBS line.
|
||||
|
||||
If you have alternate MX sites for your site, be sure that all of
|
||||
your MX sites reject the same set of hosts. If not, a bad guy whom
|
||||
you reject will connect to your site, fail, and move on to the next
|
||||
MX site, which will accept the mail for your and forward it on to you.
|
||||
|
||||
|
||||
+--------------+
|
||||
|
@ -1190,4 +1348,4 @@ version.c The version number and information about this
|
|||
|
||||
Eric Allman
|
||||
|
||||
(Version 8.113, last update 11/29/95 11:05:14)
|
||||
(Version 8.125, last update 10/18/96 07:32:40)
|
||||
|
|
|
@ -62,9 +62,11 @@
|
|||
53 util.c xfclose
|
||||
54 err.c putoutmsg
|
||||
55 conf.c lockfile
|
||||
59 Extended Load Average implementation from Christophe Wolfhugel
|
||||
56 mci.c persistent host status
|
||||
57 util.c snprintf
|
||||
60 map.c
|
||||
61 conf.c sm_gethostbyname
|
||||
62 multiple file descriptor checking
|
||||
80 content length
|
||||
81 sun remote mode
|
||||
91 mci.c syslogging of MCI cache information
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 1983, 1995 Eric P. Allman
|
||||
* Copyright (c) 1983, 1995, 1996 Eric P. Allman
|
||||
* Copyright (c) 1988, 1993
|
||||
* The Regents of the University of California. All rights reserved.
|
||||
*
|
||||
|
@ -35,7 +35,7 @@
|
|||
# include "sendmail.h"
|
||||
|
||||
#ifndef lint
|
||||
static char sccsid[] = "@(#)alias.c 8.52.1.3 (Berkeley) 9/16/96";
|
||||
static char sccsid[] = "@(#)alias.c 8.66 (Berkeley) 9/20/96";
|
||||
#endif /* not lint */
|
||||
|
||||
|
||||
|
@ -152,8 +152,6 @@ alias(a, sendq, aliaslevel, e)
|
|||
(void) strcat(obuf, "owner");
|
||||
else
|
||||
(void) strcat(obuf, a->q_user);
|
||||
if (!bitnset(M_USR_UPPER, a->q_mailer->m_flags))
|
||||
makelower(obuf);
|
||||
owner = aliaslookup(obuf, &stat, e);
|
||||
if (owner == NULL)
|
||||
return;
|
||||
|
@ -207,6 +205,11 @@ aliaslookup(name, pstat, e)
|
|||
}
|
||||
if (!bitset(MF_OPEN, map->map_mflags))
|
||||
return NULL;
|
||||
|
||||
/* special case POstMastER -- always use lower case */
|
||||
if (strcasecmp(name, "postmaster") == 0)
|
||||
name = "postmaster";
|
||||
|
||||
return (*map->map_class->map_lookup)(map, name, NULL, pstat);
|
||||
}
|
||||
/*
|
||||
|
@ -292,8 +295,7 @@ setalias(spec)
|
|||
s = stab(class, ST_MAPCLASS, ST_FIND);
|
||||
if (s == NULL)
|
||||
{
|
||||
if (tTd(27, 1))
|
||||
printf("Unknown alias class %s\n", class);
|
||||
syserr("setalias: unknown alias class %s", class);
|
||||
}
|
||||
else if (!bitset(MCF_ALIASOK, s->s_mapclass.map_cflags))
|
||||
{
|
||||
|
@ -494,7 +496,7 @@ rebuildaliases(map, automatic)
|
|||
!lockfile(fileno(af), map->map_file, NULL, LOCK_EX|LOCK_NB))
|
||||
{
|
||||
/* yes, they are -- wait until done */
|
||||
message("Alias file %s is already being rebuilt",
|
||||
message("Alias file %s is locked (maybe being rebuilt)",
|
||||
map->map_file);
|
||||
if (OpMode != MD_INITALIAS)
|
||||
{
|
||||
|
@ -710,10 +712,12 @@ readaliases(map, af, announcestats, logstats)
|
|||
}
|
||||
|
||||
/*
|
||||
** Insert alias into symbol table or DBM file
|
||||
** Insert alias into symbol table or database file.
|
||||
**
|
||||
** Special case pOStmaStER -- always make it lower case.
|
||||
*/
|
||||
|
||||
if (!bitnset(M_USR_UPPER, al.q_mailer->m_flags))
|
||||
if (strcasecmp(al.q_user, "postmaster") == 0)
|
||||
makelower(al.q_user);
|
||||
|
||||
lhssize = strlen(al.q_user);
|
||||
|
@ -776,6 +780,7 @@ forward(user, sendq, aliaslevel, e)
|
|||
{
|
||||
char *pp;
|
||||
char *ep;
|
||||
bool got_transient;
|
||||
|
||||
if (tTd(27, 1))
|
||||
printf("forward(%s)\n", user->q_paddr);
|
||||
|
@ -786,7 +791,7 @@ forward(user, sendq, aliaslevel, e)
|
|||
if (user->q_home == NULL)
|
||||
{
|
||||
syserr("554 forward: no home");
|
||||
user->q_home = "/nosuchdirectory";
|
||||
user->q_home = "/no/such/directory";
|
||||
}
|
||||
|
||||
/* good address -- look for .forward file in home */
|
||||
|
@ -796,11 +801,11 @@ forward(user, sendq, aliaslevel, e)
|
|||
if (ForwardPath == NULL)
|
||||
ForwardPath = newstr("\201z/.forward");
|
||||
|
||||
got_transient = FALSE;
|
||||
for (pp = ForwardPath; pp != NULL; pp = ep)
|
||||
{
|
||||
int err;
|
||||
char buf[MAXPATHLEN+1];
|
||||
extern int include();
|
||||
|
||||
ep = strchr(pp, ':');
|
||||
if (ep != NULL)
|
||||
|
@ -808,6 +813,8 @@ forward(user, sendq, aliaslevel, e)
|
|||
expand(pp, buf, sizeof buf, e);
|
||||
if (ep != NULL)
|
||||
*ep++ = ':';
|
||||
if (buf[0] == '\0')
|
||||
continue;
|
||||
if (tTd(27, 3))
|
||||
printf("forward: trying %s\n", buf);
|
||||
|
||||
|
@ -816,7 +823,8 @@ forward(user, sendq, aliaslevel, e)
|
|||
break;
|
||||
else if (transienterror(err))
|
||||
{
|
||||
/* we have to suspend this message */
|
||||
/* we may have to suspend this message */
|
||||
got_transient = TRUE;
|
||||
if (tTd(27, 2))
|
||||
printf("forward: transient error on %s\n", buf);
|
||||
#ifdef LOG
|
||||
|
@ -825,9 +833,18 @@ forward(user, sendq, aliaslevel, e)
|
|||
e->e_id == NULL ? "NOQUEUE" : e->e_id,
|
||||
buf, errstring(err));
|
||||
#endif
|
||||
message("%s: %s: message queued", buf, errstring(err));
|
||||
user->q_flags |= QQUEUEUP;
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (pp == NULL && got_transient)
|
||||
{
|
||||
/*
|
||||
** There was no successful .forward open and at least one
|
||||
** transient open. We have to defer this address for
|
||||
** further delivery.
|
||||
*/
|
||||
|
||||
message("transient .forward open error: message queued");
|
||||
user->q_flags |= QQUEUEUP;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 1983, 1995 Eric P. Allman
|
||||
* Copyright (c) 1983, 1995, 1996 Eric P. Allman
|
||||
* Copyright (c) 1988, 1993
|
||||
* The Regents of the University of California. All rights reserved.
|
||||
*
|
||||
|
@ -33,7 +33,7 @@
|
|||
*/
|
||||
|
||||
#ifndef lint
|
||||
static char sccsid[] = "@(#)arpadate.c 8.4.1.1 (Berkeley) 9/16/96";
|
||||
static char sccsid[] = "@(#)arpadate.c 8.6 (Berkeley) 9/16/96";
|
||||
#endif /* not lint */
|
||||
|
||||
# include "sendmail.h"
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 1983, 1995 Eric P. Allman
|
||||
* Copyright (c) 1983, 1995, 1996 Eric P. Allman
|
||||
* Copyright (c) 1988, 1993
|
||||
* The Regents of the University of California. All rights reserved.
|
||||
*
|
||||
|
@ -33,7 +33,7 @@
|
|||
*/
|
||||
|
||||
#ifndef lint
|
||||
static char sccsid[] = "@(#)clock.c 8.12 (Berkeley) 5/23/95";
|
||||
static char sccsid[] = "@(#)clock.c 8.13 (Berkeley) 2/21/96";
|
||||
#endif /* not lint */
|
||||
|
||||
# include "sendmail.h"
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 1983, 1995 Eric P. Allman
|
||||
* Copyright (c) 1983, 1995, 1996 Eric P. Allman
|
||||
* Copyright (c) 1988, 1993
|
||||
* The Regents of the University of California. All rights reserved.
|
||||
*
|
||||
|
@ -33,7 +33,7 @@
|
|||
*/
|
||||
|
||||
#ifndef lint
|
||||
static char sccsid[] = "@(#)convtime.c 8.4.1.1 (Berkeley) 9/16/96";
|
||||
static char sccsid[] = "@(#)convtime.c 8.7 (Berkeley) 9/15/96";
|
||||
#endif /* not lint */
|
||||
|
||||
# include "sendmail.h"
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 1983, 1995 Eric P. Allman
|
||||
* Copyright (c) 1983, 1995, 1996 Eric P. Allman
|
||||
* Copyright (c) 1988, 1993
|
||||
* The Regents of the University of California. All rights reserved.
|
||||
*
|
||||
|
@ -33,7 +33,7 @@
|
|||
*/
|
||||
|
||||
#ifndef lint
|
||||
static char sccsid[] = "@(#)envelope.c 8.76.1.2 (Berkeley) 9/16/96";
|
||||
static char sccsid[] = "@(#)envelope.c 8.93 (Berkeley) 9/26/96";
|
||||
#endif /* not lint */
|
||||
|
||||
#include "sendmail.h"
|
||||
|
@ -82,6 +82,7 @@ newenvelope(e, parent)
|
|||
**
|
||||
** Parameters:
|
||||
** e -- the envelope to deallocate.
|
||||
** fulldrop -- if set, do return receipts.
|
||||
**
|
||||
** Returns:
|
||||
** none.
|
||||
|
@ -92,11 +93,14 @@ newenvelope(e, parent)
|
|||
*/
|
||||
|
||||
void
|
||||
dropenvelope(e)
|
||||
dropenvelope(e, fulldrop)
|
||||
register ENVELOPE *e;
|
||||
bool fulldrop;
|
||||
{
|
||||
bool queueit = FALSE;
|
||||
bool message_timeout = FALSE;
|
||||
bool failure_return = FALSE;
|
||||
bool delay_return = FALSE;
|
||||
bool success_return = FALSE;
|
||||
register ADDRESS *q;
|
||||
char *id = e->e_id;
|
||||
|
@ -143,6 +147,9 @@ dropenvelope(e)
|
|||
** Extract state information from dregs of send list.
|
||||
*/
|
||||
|
||||
if (curtime() > e->e_ctime + TimeOuts.to_q_return[e->e_timeoutclass])
|
||||
message_timeout = TRUE;
|
||||
|
||||
e->e_flags &= ~EF_QUEUERUN;
|
||||
for (q = e->e_sendqueue; q != NULL; q = q->q_next)
|
||||
{
|
||||
|
@ -151,8 +158,9 @@ dropenvelope(e)
|
|||
queueit = TRUE;
|
||||
|
||||
/* see if a notification is needed */
|
||||
if (bitset(QBADADDR, q->q_flags) &&
|
||||
bitset(QPINGONFAILURE, q->q_flags))
|
||||
if (bitset(QPINGONFAILURE, q->q_flags) &&
|
||||
((message_timeout && bitset(QQUEUEUP, q->q_flags)) ||
|
||||
bitset(QBADADDR, q->q_flags)))
|
||||
{
|
||||
failure_return = TRUE;
|
||||
if (q->q_owner == NULL && !emptyaddr(&e->e_from))
|
||||
|
@ -177,16 +185,19 @@ dropenvelope(e)
|
|||
|
||||
if (!queueit)
|
||||
/* nothing to do */ ;
|
||||
else if (curtime() > e->e_ctime + TimeOuts.to_q_return[e->e_timeoutclass])
|
||||
else if (message_timeout)
|
||||
{
|
||||
(void) snprintf(buf, sizeof buf, "Cannot send message for %s",
|
||||
pintvl(TimeOuts.to_q_return[e->e_timeoutclass], FALSE));
|
||||
if (e->e_message != NULL)
|
||||
free(e->e_message);
|
||||
e->e_message = newstr(buf);
|
||||
message(buf);
|
||||
e->e_flags |= EF_CLRQUEUE;
|
||||
failure_return = TRUE;
|
||||
if (failure_return)
|
||||
{
|
||||
(void) snprintf(buf, sizeof buf,
|
||||
"Cannot send message within %s",
|
||||
pintvl(TimeOuts.to_q_return[e->e_timeoutclass], FALSE));
|
||||
if (e->e_message != NULL)
|
||||
free(e->e_message);
|
||||
e->e_message = newstr(buf);
|
||||
message(buf);
|
||||
e->e_flags |= EF_CLRQUEUE;
|
||||
}
|
||||
fprintf(e->e_xfp, "Message could not be delivered for %s\n",
|
||||
pintvl(TimeOuts.to_q_return[e->e_timeoutclass], FALSE));
|
||||
fprintf(e->e_xfp, "Message will be deleted from queue\n");
|
||||
|
@ -203,25 +214,25 @@ dropenvelope(e)
|
|||
else if (TimeOuts.to_q_warning[e->e_timeoutclass] > 0 &&
|
||||
curtime() > e->e_ctime + TimeOuts.to_q_warning[e->e_timeoutclass])
|
||||
{
|
||||
bool delay_return = FALSE;
|
||||
|
||||
for (q = e->e_sendqueue; q != NULL; q = q->q_next)
|
||||
{
|
||||
if (bitset(QQUEUEUP, q->q_flags) &&
|
||||
bitset(QPINGONDELAY, q->q_flags))
|
||||
{
|
||||
q->q_flags |= QDELAYED;
|
||||
delay_return = TRUE;
|
||||
}
|
||||
}
|
||||
if (delay_return &&
|
||||
!bitset(EF_WARNING|EF_RESPONSE, e->e_flags) &&
|
||||
if (!bitset(EF_WARNING|EF_RESPONSE, e->e_flags) &&
|
||||
e->e_class >= 0 &&
|
||||
e->e_from.q_paddr != NULL &&
|
||||
strcmp(e->e_from.q_paddr, "<>") != 0 &&
|
||||
strncasecmp(e->e_from.q_paddr, "owner-", 6) != 0 &&
|
||||
(strlen(e->e_from.q_paddr) <= (SIZE_T) 8 ||
|
||||
strcasecmp(&e->e_from.q_paddr[strlen(e->e_from.q_paddr) - 8], "-request") != 0))
|
||||
{
|
||||
for (q = e->e_sendqueue; q != NULL; q = q->q_next)
|
||||
{
|
||||
if (bitset(QQUEUEUP, q->q_flags) &&
|
||||
bitset(QPINGONDELAY, q->q_flags))
|
||||
{
|
||||
q->q_flags |= QDELAYED;
|
||||
delay_return = TRUE;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (delay_return)
|
||||
{
|
||||
(void) snprintf(buf, sizeof buf,
|
||||
"Warning: could not send message for past %s",
|
||||
|
@ -231,7 +242,6 @@ dropenvelope(e)
|
|||
e->e_message = newstr(buf);
|
||||
message(buf);
|
||||
e->e_flags |= EF_WARNING;
|
||||
failure_return = TRUE;
|
||||
}
|
||||
fprintf(e->e_xfp,
|
||||
"Warning: message still undelivered after %s\n",
|
||||
|
@ -241,8 +251,8 @@ dropenvelope(e)
|
|||
}
|
||||
|
||||
if (tTd(50, 2))
|
||||
printf("failure_return=%d success_return=%d queueit=%d\n",
|
||||
failure_return, success_return, queueit);
|
||||
printf("failure_return=%d delay_return=%d success_return=%d queueit=%d\n",
|
||||
failure_return, delay_return, success_return, queueit);
|
||||
|
||||
/*
|
||||
** If we had some fatal error, but no addresses are marked as
|
||||
|
@ -263,21 +273,15 @@ dropenvelope(e)
|
|||
** Send back return receipts as requested.
|
||||
*/
|
||||
|
||||
/*
|
||||
if (e->e_receiptto != NULL && bitset(EF_SENDRECEIPT, e->e_flags)
|
||||
&& !bitset(PRIV_NORECEIPTS, PrivacyFlags))
|
||||
*/
|
||||
if (e->e_receiptto == NULL)
|
||||
e->e_receiptto = e->e_from.q_paddr;
|
||||
if (success_return && !failure_return &&
|
||||
if (success_return && !failure_return && !delay_return && fulldrop &&
|
||||
!bitset(PRIV_NORECEIPTS, PrivacyFlags) &&
|
||||
strcmp(e->e_receiptto, "<>") != 0)
|
||||
strcmp(e->e_from.q_paddr, "<>") != 0)
|
||||
{
|
||||
auto ADDRESS *rlist = NULL;
|
||||
|
||||
e->e_flags |= EF_SENDRECEIPT;
|
||||
(void) sendtolist(e->e_receiptto, NULLADDR, &rlist, 0, e);
|
||||
(void) returntosender("Return receipt", rlist, FALSE, e);
|
||||
(void) sendtolist(e->e_from.q_paddr, NULLADDR, &rlist, 0, e);
|
||||
(void) returntosender("Return receipt", rlist, RTSF_NO_BODY, e);
|
||||
}
|
||||
e->e_flags &= ~EF_SENDRECEIPT;
|
||||
|
||||
|
@ -285,8 +289,12 @@ dropenvelope(e)
|
|||
** Arrange to send error messages if there are fatal errors.
|
||||
*/
|
||||
|
||||
if (failure_return && e->e_errormode != EM_QUIET)
|
||||
if ((failure_return || delay_return) && e->e_errormode != EM_QUIET)
|
||||
{
|
||||
extern void savemail __P((ENVELOPE *, bool));
|
||||
|
||||
savemail(e, !bitset(EF_NO_BODY_RETN, e->e_flags));
|
||||
}
|
||||
|
||||
/*
|
||||
** Arrange to send warning messages to postmaster as requested.
|
||||
|
@ -299,7 +307,7 @@ dropenvelope(e)
|
|||
auto ADDRESS *rlist = NULL;
|
||||
|
||||
(void) sendtolist(PostMasterCopy, NULLADDR, &rlist, 0, e);
|
||||
(void) returntosender(e->e_message, rlist, FALSE, e);
|
||||
(void) returntosender(e->e_message, rlist, RTSF_PM_BOUNCE, e);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -499,7 +507,6 @@ settime(e)
|
|||
char tbuf[20]; /* holds "current" time */
|
||||
char dbuf[30]; /* holds ctime(tbuf) */
|
||||
register struct tm *tm;
|
||||
extern char *arpadate();
|
||||
extern struct tm *gmtime();
|
||||
|
||||
now = curtime();
|
||||
|
@ -548,7 +555,7 @@ openxscript(e)
|
|||
if (e->e_xfp != NULL)
|
||||
return;
|
||||
p = queuename(e, 'x');
|
||||
fd = open(p, O_WRONLY|O_CREAT|O_APPEND, 0644);
|
||||
fd = open(p, O_WRONLY|O_CREAT|O_APPEND, FileMode);
|
||||
if (fd < 0)
|
||||
{
|
||||
syserr("Can't create transcript file %s", p);
|
||||
|
@ -754,7 +761,8 @@ setsender(from, e, delimptr, internal)
|
|||
FullName = NULL;
|
||||
}
|
||||
|
||||
if ((pw = sm_getpwnam(e->e_from.q_user)) != NULL)
|
||||
if (e->e_from.q_user[0] != '\0' &&
|
||||
(pw = sm_getpwnam(e->e_from.q_user)) != NULL)
|
||||
{
|
||||
/*
|
||||
** Process passwd file entry.
|
||||
|
@ -782,6 +790,10 @@ setsender(from, e, delimptr, internal)
|
|||
FullName = newstr(buf);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
e->e_from.q_home = "/no/such/directory";
|
||||
}
|
||||
if (FullName != NULL && !internal)
|
||||
define('x', FullName, e);
|
||||
}
|
||||
|
@ -874,31 +886,31 @@ struct eflags
|
|||
|
||||
struct eflags EnvelopeFlags[] =
|
||||
{
|
||||
"OLDSTYLE", EF_OLDSTYLE,
|
||||
"INQUEUE", EF_INQUEUE,
|
||||
"NO_BODY_RETN", EF_NO_BODY_RETN,
|
||||
"CLRQUEUE", EF_CLRQUEUE,
|
||||
"SENDRECEIPT", EF_SENDRECEIPT,
|
||||
"FATALERRS", EF_FATALERRS,
|
||||
"DELETE_BCC", EF_DELETE_BCC,
|
||||
"RESPONSE", EF_RESPONSE,
|
||||
"RESENT", EF_RESENT,
|
||||
"VRFYONLY", EF_VRFYONLY,
|
||||
"WARNING", EF_WARNING,
|
||||
"QUEUERUN", EF_QUEUERUN,
|
||||
"GLOBALERRS", EF_GLOBALERRS,
|
||||
"PM_NOTIFY", EF_PM_NOTIFY,
|
||||
"METOO", EF_METOO,
|
||||
"LOGSENDER", EF_LOGSENDER,
|
||||
"NORECEIPT", EF_NORECEIPT,
|
||||
"HAS8BIT", EF_HAS8BIT,
|
||||
"NL_NOT_EOL", EF_NL_NOT_EOL,
|
||||
"CRLF_NOT_EOL", EF_CRLF_NOT_EOL,
|
||||
"RET_PARAM", EF_RET_PARAM,
|
||||
"HAS_DF", EF_HAS_DF,
|
||||
"IS_MIME", EF_IS_MIME,
|
||||
"DONT_MIME", EF_DONT_MIME,
|
||||
NULL
|
||||
{ "OLDSTYLE", EF_OLDSTYLE },
|
||||
{ "INQUEUE", EF_INQUEUE },
|
||||
{ "NO_BODY_RETN", EF_NO_BODY_RETN },
|
||||
{ "CLRQUEUE", EF_CLRQUEUE },
|
||||
{ "SENDRECEIPT", EF_SENDRECEIPT },
|
||||
{ "FATALERRS", EF_FATALERRS },
|
||||
{ "DELETE_BCC", EF_DELETE_BCC },
|
||||
{ "RESPONSE", EF_RESPONSE },
|
||||
{ "RESENT", EF_RESENT },
|
||||
{ "VRFYONLY", EF_VRFYONLY },
|
||||
{ "WARNING", EF_WARNING },
|
||||
{ "QUEUERUN", EF_QUEUERUN },
|
||||
{ "GLOBALERRS", EF_GLOBALERRS },
|
||||
{ "PM_NOTIFY", EF_PM_NOTIFY },
|
||||
{ "METOO", EF_METOO },
|
||||
{ "LOGSENDER", EF_LOGSENDER },
|
||||
{ "NORECEIPT", EF_NORECEIPT },
|
||||
{ "HAS8BIT", EF_HAS8BIT },
|
||||
{ "NL_NOT_EOL", EF_NL_NOT_EOL },
|
||||
{ "CRLF_NOT_EOL", EF_CRLF_NOT_EOL },
|
||||
{ "RET_PARAM", EF_RET_PARAM },
|
||||
{ "HAS_DF", EF_HAS_DF },
|
||||
{ "IS_MIME", EF_IS_MIME },
|
||||
{ "DONT_MIME", EF_DONT_MIME },
|
||||
{ NULL }
|
||||
};
|
||||
|
||||
void
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 1983, 1995 Eric P. Allman
|
||||
* Copyright (c) 1983, 1995, 1996 Eric P. Allman
|
||||
* Copyright (c) 1988, 1993
|
||||
* The Regents of the University of California. All rights reserved.
|
||||
*
|
||||
|
@ -33,7 +33,7 @@
|
|||
*/
|
||||
|
||||
#ifndef lint
|
||||
static char sccsid[] = "@(#)err.c 8.42.1.2 (Berkeley) 9/16/96";
|
||||
static char sccsid[] = "@(#)err.c 8.50 (Berkeley) 9/20/96";
|
||||
#endif /* not lint */
|
||||
|
||||
# include "sendmail.h"
|
||||
|
@ -145,10 +145,30 @@ syserr(fmt, va_alist)
|
|||
CurEnv->e_id == NULL ? "NOQUEUE" : CurEnv->e_id,
|
||||
uname, &MsgBuf[4]);
|
||||
# endif /* LOG */
|
||||
if (olderrno == EMFILE)
|
||||
switch (olderrno)
|
||||
{
|
||||
case EBADF:
|
||||
case ENFILE:
|
||||
case EMFILE:
|
||||
case ENOTTY:
|
||||
#ifdef EFBIG
|
||||
case EFBIG:
|
||||
#endif
|
||||
#ifdef ESPIPE
|
||||
case ESPIPE:
|
||||
#endif
|
||||
#ifdef EPIPE
|
||||
case EPIPE:
|
||||
#endif
|
||||
#ifdef ENOBUFS
|
||||
case ENOBUFS:
|
||||
#endif
|
||||
#ifdef ESTALE
|
||||
case ESTALE:
|
||||
#endif
|
||||
printopenfds(TRUE);
|
||||
mci_dump_all(TRUE);
|
||||
break;
|
||||
}
|
||||
if (panic)
|
||||
{
|
||||
|
@ -384,6 +404,11 @@ putoutmsg(msg, holdmsg, heldmsg)
|
|||
if (!heldmsg && CurEnv->e_xfp != NULL && strchr("45", msg[0]) != NULL)
|
||||
fprintf(CurEnv->e_xfp, "%s\n", msg);
|
||||
|
||||
#ifdef LOG
|
||||
if (LogLevel >= 15 && (OpMode == MD_SMTP || OpMode == MD_DAEMON))
|
||||
syslog(LOG_INFO, "--> %s%s", msg, holdmsg ? " (held)" : "");
|
||||
#endif
|
||||
|
||||
if (msgcode == '8')
|
||||
msg[0] = '0';
|
||||
|
||||
|
@ -624,17 +649,29 @@ errstring(errnum)
|
|||
case ECONNRESET:
|
||||
bp = buf;
|
||||
snprintf(bp, SPACELEFT(buf, bp), "%s", sys_errlist[errnum]);
|
||||
bp += strlen(buf);
|
||||
bp += strlen(bp);
|
||||
if (CurHostName != NULL)
|
||||
{
|
||||
if (errnum == ETIMEDOUT)
|
||||
{
|
||||
snprintf(bp, SPACELEFT(buf, bp), " with ");
|
||||
bp += strlen(bp);
|
||||
}
|
||||
else
|
||||
{
|
||||
bp = buf;
|
||||
snprintf(bp, SPACELEFT(buf, bp),
|
||||
"Connection reset by ");
|
||||
bp += strlen(bp);
|
||||
}
|
||||
snprintf(bp, SPACELEFT(buf, bp), "%s",
|
||||
shortenstring(CurHostName, 203));
|
||||
bp += strlen(buf);
|
||||
}
|
||||
if (SmtpPhase != NULL)
|
||||
{
|
||||
snprintf(bp, SPACELEFT(buf, bp), " during %s",
|
||||
SmtpPhase);
|
||||
bp += strlen(bp);
|
||||
}
|
||||
if (CurHostName != NULL)
|
||||
{
|
||||
snprintf(bp, SPACELEFT(buf, bp), " with %s",
|
||||
shortenstring(CurHostName, 203));
|
||||
}
|
||||
return (buf);
|
||||
|
||||
|
|
|
@ -0,0 +1,60 @@
|
|||
/*
|
||||
** Support for LDAP.
|
||||
**
|
||||
** Contributed by Booker C. Bense <bbense@networking.stanford.edu>.
|
||||
** Please go to him for support -- since I (Eric) don't run LDAP, I
|
||||
** can't help you at all.
|
||||
**
|
||||
** @(#)ldap_map.h 8.2 (Berkeley) 5/22/96
|
||||
*/
|
||||
|
||||
#ifndef _LDAP_MAP_H
|
||||
#define _LDAP_MAP_H
|
||||
|
||||
struct ldap_map_struct
|
||||
{
|
||||
/* needed for ldap_open */
|
||||
char *ldaphost;
|
||||
int ldapport;
|
||||
|
||||
/* Options set in ld struct before ldap_bind_s */
|
||||
int deref;
|
||||
int timelimit;
|
||||
int sizelimit;
|
||||
int ldap_options;
|
||||
|
||||
/* args for ldap_bind_s */
|
||||
LDAP *ld;
|
||||
char *binddn;
|
||||
char *passwd;
|
||||
int method;
|
||||
|
||||
/* args for ldap_search_st */
|
||||
char *base;
|
||||
int scope;
|
||||
char *filter;
|
||||
char *attr;
|
||||
int attrsonly;
|
||||
struct timeval timeout;
|
||||
LDAPMessage *res;
|
||||
};
|
||||
|
||||
typedef struct ldap_map_struct LDAP_MAP_STRUCT;
|
||||
|
||||
#define DEFAULT_LDAP_MAP_PORT LDAP_PORT
|
||||
#define DEFAULT_LDAP_MAP_SCOPE LDAP_SCOPE_SUBTREE
|
||||
#define DEFAULT_LDAP_MAP_BINDDN NULL
|
||||
#define DEFAULT_LDAP_MAP_PASSWD NULL
|
||||
#define DEFAULT_LDAP_MAP_METHOD LDAP_AUTH_SIMPLE
|
||||
#define DEFAULT_LDAP_MAP_TIMELIMIT 5
|
||||
#define DEFAULT_LDAP_MAP_DEREF LDAP_DEREF_NEVER
|
||||
#define DEFAULT_LDAP_MAP_SIZELIMIT 0
|
||||
#define DEFAULT_LDAP_MAP_ATTRSONLY 0
|
||||
#define LDAP_MAP_MAX_FILTER 256
|
||||
#ifdef LDAP_REFERRALS
|
||||
# define DEFAULT_LDAP_MAP_LDAP_OPTIONS LDAP_OPT_REFERRALS
|
||||
#else /* LDAP_REFERRALS */
|
||||
# define DEFAULT_LDAP_MAP_LDAP_OPTIONS 0
|
||||
#endif /* LDAP_REFERRALS */
|
||||
|
||||
#endif /* _LDAP_MAP_H */
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 1983, 1995 Eric P. Allman
|
||||
* Copyright (c) 1983, 1995, 1996 Eric P. Allman
|
||||
* Copyright (c) 1988, 1993
|
||||
* The Regents of the University of California. All rights reserved.
|
||||
*
|
||||
|
@ -33,7 +33,7 @@
|
|||
*/
|
||||
|
||||
#ifndef lint
|
||||
static char sccsid[] = "@(#)macro.c 8.13 (Berkeley) 7/10/95";
|
||||
static char sccsid[] = "@(#)macro.c 8.17 (Berkeley) 5/13/96";
|
||||
#endif /* not lint */
|
||||
|
||||
# include "sendmail.h"
|
||||
|
@ -70,8 +70,10 @@ expand(s, buf, bufsize, e)
|
|||
bool skipping; /* set if conditionally skipping output */
|
||||
bool recurse = FALSE; /* set if recursion required */
|
||||
int i;
|
||||
int skiplev; /* skipping nesting level */
|
||||
int iflev; /* if nesting level */
|
||||
char xbuf[BUFSIZ];
|
||||
static int explevel = 0;
|
||||
|
||||
if (tTd(35, 24))
|
||||
{
|
||||
|
@ -81,6 +83,7 @@ expand(s, buf, bufsize, e)
|
|||
}
|
||||
|
||||
skipping = FALSE;
|
||||
skiplev = 0;
|
||||
iflev = 0;
|
||||
if (s == NULL)
|
||||
s = "";
|
||||
|
@ -98,23 +101,29 @@ expand(s, buf, bufsize, e)
|
|||
switch (c & 0377)
|
||||
{
|
||||
case CONDIF: /* see if var set */
|
||||
iflev++;
|
||||
c = *++s;
|
||||
if (skipping)
|
||||
iflev++;
|
||||
skiplev++;
|
||||
else
|
||||
skipping = macvalue(c, e) == NULL;
|
||||
continue;
|
||||
|
||||
case CONDELSE: /* change state of skipping */
|
||||
if (iflev == 0)
|
||||
break;
|
||||
if (skiplev == 0)
|
||||
skipping = !skipping;
|
||||
continue;
|
||||
|
||||
case CONDFI: /* stop skipping */
|
||||
if (iflev == 0)
|
||||
break;
|
||||
iflev--;
|
||||
if (skiplev == 0)
|
||||
skipping = FALSE;
|
||||
if (skipping)
|
||||
iflev--;
|
||||
skiplev--;
|
||||
continue;
|
||||
|
||||
case MACROEXPAND: /* macro interpolation */
|
||||
|
@ -135,7 +144,7 @@ expand(s, buf, bufsize, e)
|
|||
** Interpolate q or output one character
|
||||
*/
|
||||
|
||||
if (skipping || xp >= &xbuf[sizeof xbuf])
|
||||
if (skipping || xp >= &xbuf[sizeof xbuf - 1])
|
||||
continue;
|
||||
if (q == NULL)
|
||||
*xp++ = c;
|
||||
|
@ -163,8 +172,15 @@ expand(s, buf, bufsize, e)
|
|||
/* recurse as appropriate */
|
||||
if (recurse)
|
||||
{
|
||||
expand(xbuf, buf, bufsize, e);
|
||||
return;
|
||||
if (explevel < MaxMacroRecursion)
|
||||
{
|
||||
explevel++;
|
||||
expand(xbuf, buf, bufsize, e);
|
||||
explevel--;
|
||||
return;
|
||||
}
|
||||
syserr("expand: recursion too deep (%d max)",
|
||||
MaxMacroRecursion);
|
||||
}
|
||||
|
||||
/* copy results out */
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#!/bin/sh
|
||||
|
||||
# Copyright (c) 1993 Eric P. Allman
|
||||
# Copyright (c) 1993, 1996 Eric P. Allman
|
||||
# Copyright (c) 1993 The Regents of the University of California.
|
||||
# All rights reserved.
|
||||
#
|
||||
|
@ -32,7 +32,7 @@
|
|||
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
# SUCH DAMAGE.
|
||||
#
|
||||
# @(#)makesendmail 8.29 (Berkeley) 8/1/95
|
||||
# @(#)makesendmail 8.41 (Berkeley) 9/23/96
|
||||
#
|
||||
|
||||
#
|
||||
|
@ -51,12 +51,12 @@ fi
|
|||
#
|
||||
# Do heuristic guesses !ONLY! for machines that do not have uname
|
||||
#
|
||||
if [ -d /LocalApps -a ! -f /bin/uname -a ! -f /usr/bin/uname ]
|
||||
if [ -d /NextApps -a ! -f /bin/uname -a ! -f /usr/bin/uname ]
|
||||
then
|
||||
# probably a NeXT box
|
||||
arch=NeXT
|
||||
os=Mach
|
||||
rel=`strings /mach | grep 'Mach.*:' | sed -e 's/.* Mach //' -e 's/:.*//'`
|
||||
arch=`hostinfo | sed -n 's/.*Processor type: \([^ ]*\).*/\1/p'`
|
||||
os=NeXT
|
||||
rel=`hostinfo | sed -n 's/.*NeXT Mach \([0-9\.]*\).*/\1/p'`
|
||||
elif [ -f /usr/sony/bin/machine -a -f /etc/osversion ]
|
||||
then
|
||||
# probably a Sony NEWS 4.x
|
||||
|
@ -85,8 +85,8 @@ fi
|
|||
if [ ! "$arch" -a ! "$os" -a ! "$rel" ]
|
||||
then
|
||||
arch=`uname -m | sed -e 's/ //g'`
|
||||
os=`uname -s | sed 's/\//-/g'`
|
||||
rel=`uname -r`
|
||||
os=`uname -s | sed -e 's/\//-/g' -e 's/ //g'`
|
||||
rel=`uname -r | sed -e 's/(/-/g' -e 's/)//g'`
|
||||
fi
|
||||
|
||||
#
|
||||
|
@ -104,6 +104,8 @@ in
|
|||
sun4*) arch=sun4;;
|
||||
|
||||
9000/*) arch=`echo $arch | sed -e 's/9000.//' -e 's/..$/xx/'`;;
|
||||
|
||||
DS/907000) arch=ds90;;
|
||||
esac
|
||||
|
||||
# tweak operating system type and release
|
||||
|
@ -112,12 +114,27 @@ in
|
|||
DYNIX-ptx) os=PTX;;
|
||||
Paragon*) os=Paragon;;
|
||||
HP-UX) rel=`echo $rel | sed -e 's/^[^.]*\.0*//'`;;
|
||||
AIX) rel=`uname -v`;;
|
||||
AIX) rel=`uname -v`
|
||||
if [ "$rel" = "2" ]
|
||||
then
|
||||
arch=""
|
||||
fi;;
|
||||
BSD-386) os=BSD-OS;;
|
||||
SCO_SV) os=SCO; rel=`uname -X | sed -n 's/Release = 3.2v//p'`;;
|
||||
UNIX_System_V) if [ "$arch" = "ds90" ]
|
||||
then
|
||||
os="UXPDS"
|
||||
rel=`uname -v | sed -e 's/\(V.*\)L.*/\1/'`
|
||||
fi;;
|
||||
esac
|
||||
|
||||
# get "base part" of operating system release
|
||||
rroot=`echo $rel | sed -e 's/\.[^.]*$//'`
|
||||
rbase=`echo $rel | sed -e 's/\..*//'`
|
||||
if [ "$rroot" = "$rbase" ]
|
||||
then
|
||||
rroot=$rel
|
||||
fi
|
||||
|
||||
# heuristic tweaks to clean up names -- PLEASE LIMIT THESE!
|
||||
if [ "$os" = "unix" ]
|
||||
|
@ -164,11 +181,13 @@ else
|
|||
sfx=".${SENDMAIL_SUFFIX}"
|
||||
fi
|
||||
|
||||
echo "Configuration: os=$os, rel=$rel, rbase=$rbase, arch=$arch, sfx=$sfx"
|
||||
echo "Configuration: os=$os, rel=$rel, rbase=$rbase, rroot=$rroot, arch=$arch, sfx=$sfx"
|
||||
|
||||
# now try to find a reasonable object directory
|
||||
if [ -r obj.$os.$rel.$arch$sfx ]; then
|
||||
obj=obj.$os.$rel.$arch$sfx
|
||||
elif [ -r obj.$os.$rroot.$arch$sfx ]; then
|
||||
obj=obj.$os.$rroot.$arch$sfx
|
||||
elif [ -r obj.$os.$rbase.x.$arch$sfx ]; then
|
||||
obj=obj.$os.$rbase.x.$arch$sfx
|
||||
elif [ -r obj.$os.$rel$sfx ]; then
|
||||
|
@ -196,6 +215,10 @@ else
|
|||
makefile=Makefile.$os.$rel.$arch$sfx
|
||||
elif [ -r Makefiles/Makefile.$os.$rel.$arch ]; then
|
||||
makefile=Makefile.$os.$rel.$arch
|
||||
elif [ -r Makefiles/Makefile.$os.$rroot.$arch$sfx ]; then
|
||||
makefile=Makefile.$os.$rroot.$arch$sfx
|
||||
elif [ -r Makefiles/Makefile.$os.$rroot.$arch ]; then
|
||||
makefile=Makefile.$os.$rroot.$arch
|
||||
elif [ -r Makefiles/Makefile.$os.$rbase.x.$arch$sfx ]; then
|
||||
makefile=Makefile.$os.$rbase.x.$arch$sfx
|
||||
elif [ -r Makefiles/Makefile.$os.$rbase.x.$arch ]; then
|
||||
|
@ -204,6 +227,10 @@ else
|
|||
makefile=Makefile.$os.$rel$sfx
|
||||
elif [ -r Makefiles/Makefile.$os.$rel ]; then
|
||||
makefile=Makefile.$os.$rel
|
||||
elif [ -r Makefiles/Makefile.$os.$rroot$sfx ]; then
|
||||
makefile=Makefile.$os.$rroot$sfx
|
||||
elif [ -r Makefiles/Makefile.$os.$rroot ]; then
|
||||
makefile=Makefile.$os.$rroot
|
||||
elif [ -r Makefiles/Makefile.$os.$rbase.x$sfx ]; then
|
||||
makefile=Makefile.$os.$rbase.x$sfx
|
||||
elif [ -r Makefiles/Makefile.$os.$rbase.x ]; then
|
||||
|
@ -216,6 +243,10 @@ else
|
|||
makefile=Makefile.$rel.$arch$sfx
|
||||
elif [ -r Makefiles/Makefile.$rel.$arch ]; then
|
||||
makefile=Makefile.$rel.$arch
|
||||
elif [ -r Makefiles/Makefile.$rroot.$arch$sfx ]; then
|
||||
makefile=Makefile.$rroot.$arch$sfx
|
||||
elif [ -r Makefiles/Makefile.$rroot.$arch ]; then
|
||||
makefile=Makefile.$rroot.$arch
|
||||
elif [ -r Makefiles/Makefile.$rbase.x.$arch$sfx ]; then
|
||||
makefile=Makefile.$rbase.x.$arch$sfx
|
||||
elif [ -r Makefiles/Makefile.$rbase.x.$arch ]; then
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 1995 Eric P. Allman
|
||||
* Copyright (c) 1995, 1996 Eric P. Allman
|
||||
* Copyright (c) 1988, 1993
|
||||
* The Regents of the University of California. All rights reserved.
|
||||
*
|
||||
|
@ -33,10 +33,11 @@
|
|||
*/
|
||||
|
||||
#ifndef lint
|
||||
static char sccsid[] = "@(#)mci.c 8.22.1.1 (Berkeley) 9/16/96";
|
||||
static char sccsid[] = "@(#)mci.c 8.44 (Berkeley) 10/9/96";
|
||||
#endif /* not lint */
|
||||
|
||||
#include "sendmail.h"
|
||||
#include <dirent.h>
|
||||
|
||||
/*
|
||||
** Mail Connection Information (MCI) Caching Module.
|
||||
|
@ -62,10 +63,17 @@ static char sccsid[] = "@(#)mci.c 8.22.1.1 (Berkeley) 9/16/96";
|
|||
** connection and reopen it. Note that this means that a
|
||||
** server SMTP that doesn't support NOOP will hose the
|
||||
** algorithm -- but that doesn't seem too likely.
|
||||
**
|
||||
** The persistent MCI code is donated by Mark Lovell and Paul
|
||||
** Vixie. It is based on the long term host status code in KJS
|
||||
** written by Paul but has been adapted by Mark to fit into the
|
||||
** MCI structure.
|
||||
*/
|
||||
|
||||
MCI **MciCache; /* the open connection cache */
|
||||
|
||||
extern int mci_generate_persistent_path __P((const char *, char *, int, bool));
|
||||
extern void mci_load_persistent __P((MCI *));
|
||||
extern void mci_uncache __P((MCI **, bool));
|
||||
/*
|
||||
** MCI_CACHE -- enter a connection structure into the open connection cache
|
||||
|
@ -84,7 +92,6 @@ mci_cache(mci)
|
|||
register MCI *mci;
|
||||
{
|
||||
register MCI **mcislot;
|
||||
extern MCI **mci_scan();
|
||||
|
||||
/*
|
||||
** Find the best slot. This may cause expired connections
|
||||
|
@ -204,6 +211,8 @@ mci_uncache(mcislot, doquit)
|
|||
return;
|
||||
*mcislot = NULL;
|
||||
|
||||
mci_unlock_host(mci);
|
||||
|
||||
if (tTd(42, 5))
|
||||
printf("mci_uncache: uncaching %x (%s) from slot %d (%d)\n",
|
||||
mci, mci->mci_host, mcislot - MciCache, doquit);
|
||||
|
@ -279,7 +288,6 @@ mci_get(host, m)
|
|||
{
|
||||
register MCI *mci;
|
||||
register STAB *s;
|
||||
extern MCI **mci_scan();
|
||||
|
||||
#ifdef DAEMON
|
||||
extern SOCKADDR CurHostAddr;
|
||||
|
@ -297,6 +305,8 @@ mci_get(host, m)
|
|||
mci = &s->s_mci;
|
||||
mci->mci_host = s->s_name;
|
||||
|
||||
mci_load_persistent(mci);
|
||||
|
||||
if (tTd(42, 2))
|
||||
{
|
||||
printf("mci_get(%s %s): mci_state=%d, _flags=%x, _exitstat=%d, _errno=%d\n",
|
||||
|
@ -307,8 +317,10 @@ mci_get(host, m)
|
|||
#ifdef SMTP
|
||||
if (mci->mci_state == MCIS_OPEN)
|
||||
{
|
||||
extern int smtpprobe __P((MCI *));
|
||||
|
||||
/* poke the connection to see if it's still alive */
|
||||
smtpprobe(mci);
|
||||
(void) smtpprobe(mci);
|
||||
|
||||
/* reset the stored state in the event of a timeout */
|
||||
if (mci->mci_state != MCIS_OPEN)
|
||||
|
@ -330,7 +342,6 @@ mci_get(host, m)
|
|||
# endif
|
||||
}
|
||||
#endif
|
||||
#ifdef MAYBE_NEXT_RELEASE
|
||||
if (mci->mci_state == MCIS_CLOSED)
|
||||
{
|
||||
time_t now = curtime();
|
||||
|
@ -343,11 +354,36 @@ mci_get(host, m)
|
|||
mci->mci_exitstat = EX_OK;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
return mci;
|
||||
}
|
||||
/*
|
||||
** MCI_SETSTAT -- set status codes in MCI structure.
|
||||
**
|
||||
** Parameters:
|
||||
** mci -- the MCI structure to set.
|
||||
** dstat -- the DSN status code.
|
||||
** rstat -- the SMTP status code.
|
||||
**
|
||||
** Returns:
|
||||
** none.
|
||||
*/
|
||||
|
||||
void
|
||||
mci_setstat(mci, dstat, rstat)
|
||||
MCI *mci;
|
||||
char *dstat;
|
||||
char *rstat;
|
||||
{
|
||||
mci->mci_status = dstat;
|
||||
if (rstat != NULL)
|
||||
{
|
||||
if (mci->mci_rstatus != NULL)
|
||||
free(mci->mci_rstatus);
|
||||
mci->mci_rstatus = newstr(rstat);
|
||||
}
|
||||
}
|
||||
/*
|
||||
** MCI_DUMP -- dump the contents of an MCI structure.
|
||||
**
|
||||
** Parameters:
|
||||
|
@ -360,6 +396,32 @@ mci_get(host, m)
|
|||
** none.
|
||||
*/
|
||||
|
||||
struct mcifbits
|
||||
{
|
||||
int mcif_bit; /* flag bit */
|
||||
char *mcif_name; /* flag name */
|
||||
};
|
||||
struct mcifbits MciFlags[] =
|
||||
{
|
||||
{ MCIF_VALID, "VALID" },
|
||||
{ MCIF_TEMP, "TEMP" },
|
||||
{ MCIF_CACHED, "CACHED" },
|
||||
{ MCIF_ESMTP, "ESMTP" },
|
||||
{ MCIF_EXPN, "EXPN" },
|
||||
{ MCIF_SIZE, "SIZE" },
|
||||
{ MCIF_8BITMIME, "8BITMIME" },
|
||||
{ MCIF_7BIT, "7BIT" },
|
||||
{ MCIF_MULTSTAT, "MULTSTAT" },
|
||||
{ MCIF_INHEADER, "INHEADER" },
|
||||
{ MCIF_CVT8TO7, "CVT8TO7" },
|
||||
{ MCIF_DSN, "DSN" },
|
||||
{ MCIF_8BITOK, "8BITOK" },
|
||||
{ MCIF_CVT7TO8, "CVT7TO8" },
|
||||
{ MCIF_INMIME, "INMIME" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
|
||||
|
||||
void
|
||||
mci_dump(mci, logit)
|
||||
register MCI *mci;
|
||||
|
@ -379,9 +441,25 @@ mci_dump(mci, logit)
|
|||
snprintf(p, SPACELEFT(buf, p), "NULL");
|
||||
goto printit;
|
||||
}
|
||||
snprintf(p, SPACELEFT(buf, p), "flags=%x", mci->mci_flags);
|
||||
p += strlen(p);
|
||||
if (mci->mci_flags != 0)
|
||||
{
|
||||
struct mcifbits *f;
|
||||
|
||||
*p++ = '<';
|
||||
for (f = MciFlags; f->mcif_bit != 0; f++)
|
||||
{
|
||||
if (!bitset(f->mcif_bit, mci->mci_flags))
|
||||
continue;
|
||||
snprintf(p, SPACELEFT(buf, p), "%s,", f->mcif_name);
|
||||
p += strlen(p);
|
||||
}
|
||||
p[-1] = '>';
|
||||
}
|
||||
snprintf(p, SPACELEFT(buf, p),
|
||||
"flags=%x, errno=%d, herrno=%d, exitstat=%d, state=%d, pid=%d,%s",
|
||||
mci->mci_flags, mci->mci_errno, mci->mci_herrno,
|
||||
",%serrno=%d, herrno=%d, exitstat=%d, state=%d, pid=%d,%s",
|
||||
sep, mci->mci_errno, mci->mci_herrno,
|
||||
mci->mci_exitstat, mci->mci_state, mci->mci_pid, sep);
|
||||
p += strlen(p);
|
||||
snprintf(p, SPACELEFT(buf, p),
|
||||
|
@ -391,6 +469,12 @@ mci_dump(mci, logit)
|
|||
mci->mci_mailer == NULL ? "NULL" : mci->mci_mailer->m_name,
|
||||
sep);
|
||||
p += strlen(p);
|
||||
snprintf(p, SPACELEFT(buf, p),
|
||||
"status=%s, rstatus=%s,%s",
|
||||
mci->mci_status == NULL ? "NULL" : mci->mci_status,
|
||||
mci->mci_rstatus == NULL ? "NULL" : mci->mci_rstatus,
|
||||
sep);
|
||||
p += strlen(p);
|
||||
snprintf(p, SPACELEFT(buf, p),
|
||||
"host=%s, lastuse=%s",
|
||||
mci->mci_host == NULL ? "NULL" : mci->mci_host,
|
||||
|
@ -426,3 +510,742 @@ mci_dump_all(logit)
|
|||
for (i = 0; i < MaxMciCache; i++)
|
||||
mci_dump(MciCache[i], logit);
|
||||
}
|
||||
/*
|
||||
** MCI_LOCK_HOST -- Lock host while sending.
|
||||
**
|
||||
** If we are contacting a host, we'll need to
|
||||
** update the status information in the host status
|
||||
** file, and if we want to do that, we ought to have
|
||||
** locked it. This has the (according to some)
|
||||
** desirable effect of serializing connectivity with
|
||||
** remote hosts -- i.e.: one connection to a give
|
||||
** host at a time.
|
||||
**
|
||||
** Parameters:
|
||||
** mci -- containing the host we want to lock.
|
||||
**
|
||||
** Returns:
|
||||
** EX_OK -- got the lock.
|
||||
** EX_TEMPFAIL -- didn't get the lock.
|
||||
*/
|
||||
|
||||
int
|
||||
mci_lock_host(mci)
|
||||
MCI *mci;
|
||||
{
|
||||
if (mci == NULL)
|
||||
{
|
||||
if (tTd(56, 1))
|
||||
printf("mci_lock_host: NULL mci\n");
|
||||
return EX_OK;
|
||||
}
|
||||
|
||||
if (!SingleThreadDelivery)
|
||||
return EX_OK;
|
||||
|
||||
return mci_lock_host_statfile(mci);
|
||||
}
|
||||
|
||||
int
|
||||
mci_lock_host_statfile(mci)
|
||||
MCI *mci;
|
||||
{
|
||||
int savedErrno = errno;
|
||||
int retVal = EX_OK;
|
||||
char fname[MAXPATHLEN+1];
|
||||
|
||||
if (HostStatDir == NULL || mci->mci_host == NULL)
|
||||
return EX_OK;
|
||||
|
||||
if (tTd(56, 2))
|
||||
printf("mci_lock_host: attempting to lock %s\n",
|
||||
mci->mci_host);
|
||||
|
||||
if (mci_generate_persistent_path(mci->mci_host, fname, sizeof fname, TRUE) < 0)
|
||||
{
|
||||
/* of course this should never happen */
|
||||
if (tTd(56, 2))
|
||||
printf("mci_lock_host: Failed to generate host path for %s\n",
|
||||
mci->mci_host);
|
||||
|
||||
retVal = EX_TEMPFAIL;
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
if ((mci->mci_statfile = fopen(fname, "r+")) == NULL)
|
||||
mci->mci_statfile = fopen(fname, "w");
|
||||
|
||||
if (mci->mci_statfile == NULL)
|
||||
{
|
||||
syserr("mci_lock_host: cannot create host lock file %s",
|
||||
fname);
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
if (!lockfile(fileno(mci->mci_statfile), fname, "", LOCK_EX|LOCK_NB))
|
||||
{
|
||||
if (tTd(56, 2))
|
||||
printf("mci_lock_host: couldn't get lock on %s\n",
|
||||
fname);
|
||||
fclose(mci->mci_statfile);
|
||||
mci->mci_statfile = NULL;
|
||||
retVal = EX_TEMPFAIL;
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
if (tTd(56, 12) && mci->mci_statfile != NULL)
|
||||
printf("mci_lock_host: Sanity check -- lock is good\n");
|
||||
|
||||
cleanup:
|
||||
errno = savedErrno;
|
||||
return retVal;
|
||||
}
|
||||
/*
|
||||
** MCI_UNLOCK_HOST -- unlock host
|
||||
**
|
||||
** Clean up the lock on a host, close the file, let
|
||||
** someone else use it.
|
||||
**
|
||||
** Parameters:
|
||||
** mci -- us.
|
||||
**
|
||||
** Returns:
|
||||
** nothing.
|
||||
*/
|
||||
|
||||
void
|
||||
mci_unlock_host(mci)
|
||||
MCI *mci;
|
||||
{
|
||||
int saveErrno = errno;
|
||||
|
||||
if (mci == NULL)
|
||||
{
|
||||
if (tTd(56, 1))
|
||||
printf("mci_unlock_host: NULL mci\n");
|
||||
return;
|
||||
}
|
||||
|
||||
if (HostStatDir == NULL || mci->mci_host == NULL)
|
||||
return;
|
||||
|
||||
if (!SingleThreadDelivery && mci_lock_host_statfile(mci) == EX_TEMPFAIL)
|
||||
{
|
||||
if (tTd(56, 1))
|
||||
printf("mci_unlock_host: stat file already locked\n");
|
||||
}
|
||||
else
|
||||
{
|
||||
if (tTd(56, 2))
|
||||
printf("mci_unlock_host: store prior to unlock\n");
|
||||
|
||||
mci_store_persistent(mci);
|
||||
}
|
||||
|
||||
if (mci->mci_statfile != NULL)
|
||||
{
|
||||
fclose(mci->mci_statfile);
|
||||
mci->mci_statfile = NULL;
|
||||
}
|
||||
|
||||
errno = saveErrno;
|
||||
}
|
||||
/*
|
||||
** MCI_LOAD_PERSISTENT -- load persistent host info
|
||||
**
|
||||
** Load information about host that is kept
|
||||
** in common for all running sendmails.
|
||||
**
|
||||
** Parameters:
|
||||
** mci -- the host/connection to load persistent info
|
||||
** for.
|
||||
**
|
||||
** Returns:
|
||||
** none.
|
||||
*/
|
||||
|
||||
void
|
||||
mci_load_persistent(mci)
|
||||
MCI *mci;
|
||||
{
|
||||
int saveErrno = errno;
|
||||
FILE *fp;
|
||||
int status;
|
||||
char fname[MAXPATHLEN+1];
|
||||
|
||||
if (mci == NULL)
|
||||
{
|
||||
if (tTd(56, 1))
|
||||
printf("mci_load_persistent: NULL mci\n");
|
||||
return;
|
||||
}
|
||||
|
||||
if (HostStatDir == NULL || mci->mci_host == NULL)
|
||||
return;
|
||||
|
||||
if (tTd(56, 1))
|
||||
printf("mci_load_persistent: Attempting to load persistent information for %s\n",
|
||||
mci->mci_host);
|
||||
|
||||
if (mci_generate_persistent_path(mci->mci_host, fname, sizeof fname, FALSE) < 0)
|
||||
{
|
||||
/* Not much we can do if the file isn't there... */
|
||||
if (tTd(56, 1))
|
||||
printf("mci_load_persistent: Couldn't generate host path\n");
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
fp = fopen(fname, "r");
|
||||
if (fp == NULL)
|
||||
{
|
||||
/* I can't think of any reason this should ever happen */
|
||||
if (tTd(56, 1))
|
||||
printf("mci_load_persistent: open(%s): %s\n",
|
||||
fname, errstring(errno));
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
FileName = fname;
|
||||
(void) mci_read_persistent(fp, mci);
|
||||
FileName = NULL;
|
||||
fclose(fp);
|
||||
|
||||
cleanup:
|
||||
errno = saveErrno;
|
||||
return;
|
||||
}
|
||||
/*
|
||||
** MCI_READ_PERSISTENT -- read persistent host status file
|
||||
**
|
||||
** Parameters:
|
||||
** fp -- the file pointer to read.
|
||||
** mci -- the pointer to fill in.
|
||||
**
|
||||
** Returns:
|
||||
** -1 -- if the file was corrupt.
|
||||
** 0 -- otherwise.
|
||||
**
|
||||
** Warning:
|
||||
** This code makes the assumption that this data
|
||||
** will be read in an atomic fashion, and that the data
|
||||
** was written in an atomic fashion. Any other functioning
|
||||
** may lead to some form of insanity. This should be
|
||||
** perfectly safe due to underlying stdio buffering.
|
||||
*/
|
||||
|
||||
int
|
||||
mci_read_persistent(fp, mci)
|
||||
FILE *fp;
|
||||
register MCI *mci;
|
||||
{
|
||||
int ver;
|
||||
register char *p;
|
||||
char buf[MAXLINE];
|
||||
|
||||
if (fp == NULL)
|
||||
syserr("mci_read_persistent: NULL fp");
|
||||
if (mci == NULL)
|
||||
syserr("mci_read_persistent: NULL mci");
|
||||
if (tTd(56, 93))
|
||||
{
|
||||
printf("mci_read_persistent: fp=%x, mci=", fp);
|
||||
mci_dump(mci, FALSE);
|
||||
}
|
||||
|
||||
mci->mci_status = NULL;
|
||||
if (mci->mci_rstatus != NULL)
|
||||
free(mci->mci_rstatus);
|
||||
mci->mci_rstatus = NULL;
|
||||
|
||||
rewind(fp);
|
||||
while (fgets(buf, sizeof buf, fp) != NULL)
|
||||
{
|
||||
p = strchr(buf, '\n');
|
||||
if (p != NULL)
|
||||
*p = '\0';
|
||||
switch (buf[0])
|
||||
{
|
||||
case 'V': /* version stamp */
|
||||
ver = atoi(&buf[1]);
|
||||
if (ver < 0 || ver > 0)
|
||||
syserr("Unknown host status version %d: %d max",
|
||||
ver, 0);
|
||||
break;
|
||||
|
||||
case 'E': /* UNIX error number */
|
||||
mci->mci_errno = atoi(&buf[1]);
|
||||
break;
|
||||
|
||||
case 'H': /* DNS error number */
|
||||
mci->mci_herrno = atoi(&buf[1]);
|
||||
break;
|
||||
|
||||
case 'S': /* UNIX exit status */
|
||||
mci->mci_exitstat = atoi(&buf[1]);
|
||||
break;
|
||||
|
||||
case 'D': /* DSN status */
|
||||
mci->mci_status = newstr(&buf[1]);
|
||||
break;
|
||||
|
||||
case 'R': /* SMTP status */
|
||||
mci->mci_rstatus = newstr(&buf[1]);
|
||||
break;
|
||||
|
||||
case 'U': /* last usage time */
|
||||
mci->mci_lastuse = atol(&buf[1]);
|
||||
break;
|
||||
|
||||
case '.': /* end of file */
|
||||
return 0;
|
||||
|
||||
default:
|
||||
syserr("Unknown host status line \"%s\"", buf);
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
/*
|
||||
** MCI_STORE_PERSISTENT -- Store persistent MCI information
|
||||
**
|
||||
** Store information about host that is kept
|
||||
** in common for all running sendmails.
|
||||
**
|
||||
** Parameters:
|
||||
** mci -- the host/connection to store persistent info for.
|
||||
**
|
||||
** Returns:
|
||||
** none.
|
||||
*/
|
||||
|
||||
void
|
||||
mci_store_persistent(mci)
|
||||
MCI *mci;
|
||||
{
|
||||
int saveErrno = errno;
|
||||
|
||||
if (mci == NULL)
|
||||
{
|
||||
if (tTd(56, 1))
|
||||
printf("mci_store_persistent: NULL mci\n");
|
||||
return;
|
||||
}
|
||||
|
||||
if (HostStatDir == NULL || mci->mci_host == NULL)
|
||||
return;
|
||||
|
||||
if (tTd(56, 1))
|
||||
printf("mci_store_persistent: Storing information for %s\n",
|
||||
mci->mci_host);
|
||||
|
||||
if (mci->mci_statfile == NULL)
|
||||
{
|
||||
if (tTd(56, 1))
|
||||
printf("mci_store_persistent: no statfile\n");
|
||||
return;
|
||||
}
|
||||
|
||||
rewind(mci->mci_statfile);
|
||||
#if !NOFTRUNCATE
|
||||
(void) ftruncate(fileno(mci->mci_statfile), (off_t) 0);
|
||||
#endif
|
||||
|
||||
fprintf(mci->mci_statfile, "V0\n");
|
||||
fprintf(mci->mci_statfile, "E%d\n", mci->mci_errno);
|
||||
fprintf(mci->mci_statfile, "H%d\n", mci->mci_herrno);
|
||||
fprintf(mci->mci_statfile, "S%d\n", mci->mci_exitstat);
|
||||
if (mci->mci_status != NULL)
|
||||
fprintf(mci->mci_statfile, "D%.80s\n",
|
||||
denlstring(mci->mci_status, TRUE, FALSE));
|
||||
if (mci->mci_rstatus != NULL)
|
||||
fprintf(mci->mci_statfile, "R%.80s\n",
|
||||
denlstring(mci->mci_rstatus, TRUE, FALSE));
|
||||
fprintf(mci->mci_statfile, "U%ld\n", mci->mci_lastuse);
|
||||
fprintf(mci->mci_statfile, ".\n");
|
||||
|
||||
fflush(mci->mci_statfile);
|
||||
|
||||
cleanup:
|
||||
errno = saveErrno;
|
||||
return;
|
||||
}
|
||||
/*
|
||||
** MCI_TRAVERSE_PERSISTENT -- walk persistent status tree
|
||||
**
|
||||
** Recursively find all the mci host files in `pathname'. Default to
|
||||
** main host status directory if no path is provided.
|
||||
** Call (*action)(pathname, host) for each file found.
|
||||
**
|
||||
** Note: all information is collected in a list before it is processed.
|
||||
** This may not be the best way to do it, but it seems safest, since
|
||||
** the file system would be touched while we are attempting to traverse
|
||||
** the directory tree otherwise (during purges).
|
||||
**
|
||||
** Parameters:
|
||||
** action -- function to call on each node. If returns < 0,
|
||||
** return immediately.
|
||||
** pathname -- root of tree. If null, use main host status
|
||||
** directory.
|
||||
**
|
||||
** Returns:
|
||||
** < 0 -- if any action routine returns a negative value, that
|
||||
** value is returned.
|
||||
** 0 -- if we successfully went to completion.
|
||||
*/
|
||||
|
||||
int
|
||||
mci_traverse_persistent(action, pathname)
|
||||
int (*action)();
|
||||
char *pathname;
|
||||
{
|
||||
struct stat statbuf;
|
||||
DIR *d;
|
||||
int ret = 0;
|
||||
|
||||
if (pathname == NULL)
|
||||
pathname = HostStatDir;
|
||||
if (pathname == NULL)
|
||||
return -1;
|
||||
|
||||
if (tTd(56, 1))
|
||||
printf("mci_traverse: pathname is %s\n", pathname);
|
||||
|
||||
ret = stat(pathname, &statbuf);
|
||||
if (ret < 0)
|
||||
{
|
||||
if (tTd(56, 2))
|
||||
printf("mci_traverse: Failed to stat %s: %s\n",
|
||||
pathname, errstring(errno));
|
||||
return ret;
|
||||
}
|
||||
if (S_ISDIR(statbuf.st_mode))
|
||||
{
|
||||
struct dirent *e;
|
||||
char *newptr;
|
||||
char newpath[MAXPATHLEN+1];
|
||||
|
||||
if ((d = opendir(pathname)) == NULL)
|
||||
{
|
||||
if (tTd(56, 2))
|
||||
printf("mci_traverse: opendir %s: %s\n",
|
||||
pathname, errstring(errno));
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (strlen(pathname) >= sizeof newpath - MAXNAMLEN - 3)
|
||||
{
|
||||
if (tTd(56, 2))
|
||||
printf("mci_traverse: path \"%s\" too long",
|
||||
pathname);
|
||||
return -1;
|
||||
}
|
||||
strcpy(newpath, pathname);
|
||||
newptr = newpath + strlen(newpath);
|
||||
*newptr++ = '/';
|
||||
|
||||
while ((e = readdir(d)) != NULL)
|
||||
{
|
||||
if (e->d_name[0] == '.')
|
||||
continue;
|
||||
|
||||
strncpy(newptr, e->d_name,
|
||||
sizeof newpath - (newptr - newpath) - 1);
|
||||
newpath[sizeof newpath - 1] = '\0';
|
||||
|
||||
ret = mci_traverse_persistent(action, newpath);
|
||||
if (ret < 0)
|
||||
break;
|
||||
|
||||
/*
|
||||
** The following appears to be
|
||||
** necessary during purgest, since
|
||||
** we modify the directory structure
|
||||
*/
|
||||
|
||||
if (action == mci_purge_persistent)
|
||||
rewinddir(d);
|
||||
}
|
||||
closedir(d);
|
||||
}
|
||||
else if (S_ISREG(statbuf.st_mode))
|
||||
{
|
||||
char *end = pathname + strlen(pathname) - 1;
|
||||
char *start;
|
||||
char *scan;
|
||||
char host[MAXHOSTNAMELEN];
|
||||
char *hostptr = host;
|
||||
|
||||
/*
|
||||
** Reconstruct the host name from the path to the
|
||||
** persistent information.
|
||||
*/
|
||||
|
||||
do
|
||||
{
|
||||
if (hostptr != host)
|
||||
*(hostptr++) = '.';
|
||||
start = end;
|
||||
while (*(start - 1) != '/')
|
||||
start--;
|
||||
|
||||
if (*end == '.')
|
||||
end--;
|
||||
|
||||
for (scan = start; scan <= end; scan++)
|
||||
*(hostptr++) = *scan;
|
||||
|
||||
end = start - 2;
|
||||
} while (*end == '.');
|
||||
|
||||
*hostptr = '\0';
|
||||
|
||||
/*
|
||||
** Do something with the file containing the persistent
|
||||
** information.
|
||||
*/
|
||||
ret = (*action)(pathname, host);
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
/*
|
||||
** MCI_PRINT_PERSISTENT -- print persisten info
|
||||
**
|
||||
** Dump the persistent information in the file 'pathname'
|
||||
**
|
||||
** Parameters:
|
||||
** pathname -- the pathname to the status file.
|
||||
** hostname -- the corresponding host name.
|
||||
**
|
||||
** Returns:
|
||||
** 0
|
||||
*/
|
||||
|
||||
int
|
||||
mci_print_persistent(pathname, hostname)
|
||||
char *pathname;
|
||||
char *hostname;
|
||||
{
|
||||
static int initflag = FALSE;
|
||||
FILE *fp;
|
||||
int status;
|
||||
int width = Verbose ? 78 : 25;
|
||||
bool locked;
|
||||
MCI mcib;
|
||||
|
||||
if (!initflag)
|
||||
{
|
||||
initflag = TRUE;
|
||||
printf(" -------------- Hostname --------------- How long ago ---------Results---------\n");
|
||||
}
|
||||
|
||||
fp = fopen(pathname, "r+");
|
||||
|
||||
if (fp == NULL)
|
||||
{
|
||||
if (tTd(56, 1))
|
||||
printf("mci_print_persistent: cannot open %s: %s\n",
|
||||
pathname, errstring(errno));
|
||||
return 0;
|
||||
}
|
||||
|
||||
bzero(&mcib, sizeof mcib);
|
||||
if (mci_read_persistent(fp, &mcib) < 0)
|
||||
{
|
||||
syserr("%s: could not read status file", pathname);
|
||||
fclose(fp);
|
||||
return 0;
|
||||
}
|
||||
|
||||
locked = !lockfile(fileno(fp), pathname, "", LOCK_EX|LOCK_NB);
|
||||
fclose(fp);
|
||||
|
||||
if (mcib.mci_rstatus == NULL)
|
||||
printf("%c%-39s %12s %.*s\n",
|
||||
locked ? '*' : ' ', hostname,
|
||||
pintvl(curtime() - mcib.mci_lastuse, TRUE),
|
||||
width, errstring(mcib.mci_errno));
|
||||
else
|
||||
printf("%c%-39s %12s %.*s\n",
|
||||
locked ? '*' : ' ', hostname,
|
||||
pintvl(curtime() - mcib.mci_lastuse, TRUE),
|
||||
width, mcib.mci_rstatus);
|
||||
|
||||
return 0;
|
||||
}
|
||||
/*
|
||||
** MCI_PURGE_PERSISTENT -- Remove a persistence status file.
|
||||
**
|
||||
** Parameters:
|
||||
** pathname -- path to the status file.
|
||||
** hostname -- name of host corresponding to that file.
|
||||
**
|
||||
** Returns:
|
||||
** 0
|
||||
*/
|
||||
|
||||
int
|
||||
mci_purge_persistent(pathname, hostname)
|
||||
char *pathname;
|
||||
char *hostname;
|
||||
{
|
||||
char *end = pathname + strlen(pathname) - 1;
|
||||
|
||||
if (tTd(56, 1))
|
||||
printf("mci_purge_persistent: purging %s\n", pathname);
|
||||
|
||||
/* remove the file */
|
||||
if (unlink(pathname) < 0)
|
||||
{
|
||||
if (tTd(56, 2))
|
||||
printf("mci_purge_persistent: failed to unlink %s: %s\n",
|
||||
pathname, errstring(errno));
|
||||
return -1;
|
||||
}
|
||||
|
||||
/*
|
||||
** remove empty parent directories.
|
||||
*/
|
||||
|
||||
for (;;)
|
||||
{
|
||||
while (*end != '/')
|
||||
end--;
|
||||
*(end--) = '\0';
|
||||
|
||||
if (*end != '.')
|
||||
break;
|
||||
|
||||
if (tTd(56, 1))
|
||||
printf("mci_purge_persistent: dpurge %s\n", pathname);
|
||||
|
||||
if (rmdir(pathname) < 0)
|
||||
{
|
||||
if (errno == ENOENT || errno == EEXIST)
|
||||
break; /* directory is not empty */
|
||||
#ifdef ENOTEMTPY
|
||||
if (errno == ENOTEMPTY)
|
||||
break; /* BSDism */
|
||||
#endif
|
||||
if (tTd(56, 2))
|
||||
printf("mci_purge_persistent: rmdir %s: %s\n",
|
||||
pathname, errstring(errno));
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
/*
|
||||
** MCI_GENERATE_PERSISTENT_PATH -- generate path from hostname
|
||||
**
|
||||
** Given `host', convert from a.b.c to $QueueDir/.hoststat/c./b./a,
|
||||
** putting the result into `path'. if `createflag' is set, intervening
|
||||
** directories will be created as needed.
|
||||
**
|
||||
** Parameters:
|
||||
** host -- host name to convert from.
|
||||
** path -- place to store result.
|
||||
** pathlen -- length of path buffer.
|
||||
** createflag -- if set, create intervening directories as
|
||||
** needed.
|
||||
**
|
||||
** Returns:
|
||||
** 0 -- success
|
||||
** -1 -- failure
|
||||
*/
|
||||
|
||||
int
|
||||
mci_generate_persistent_path(host, path, pathlen, createflag)
|
||||
const char *host;
|
||||
char *path;
|
||||
int pathlen;
|
||||
bool createflag;
|
||||
{
|
||||
char *elem, *p, *x, ch;
|
||||
int ret = 0;
|
||||
int len;
|
||||
char t_host[MAXHOSTNAMELEN];
|
||||
|
||||
/*
|
||||
** Rationality check the arguments.
|
||||
*/
|
||||
|
||||
if (host == NULL)
|
||||
syserr("mci_generate_persistent_path: null host");
|
||||
if (path == NULL)
|
||||
syserr("mci_generate_persistent_path: null path");
|
||||
|
||||
if (tTd(56, 80))
|
||||
printf("mci_generate_persistent_path(%s): ", host);
|
||||
|
||||
/* make certain this is not a bracketed host number */
|
||||
if (strlen(host) > sizeof t_host - 1)
|
||||
return -1;
|
||||
if (host[0] == '[')
|
||||
strcpy(t_host, host + 1);
|
||||
else
|
||||
strcpy(t_host, host);
|
||||
|
||||
/*
|
||||
** Delete any trailing dots from the hostname.
|
||||
** Leave 'elem' pointing at the \0.
|
||||
*/
|
||||
|
||||
elem = t_host + strlen(t_host);
|
||||
while (elem > t_host && (elem[-1] == '.' || elem[-1] == ']'))
|
||||
*--elem = '\0';
|
||||
|
||||
/* check for what will be the final length of the path */
|
||||
len = strlen(HostStatDir) + 2;
|
||||
for (p = (char *) host; *p != '\0'; p++)
|
||||
{
|
||||
if (*p == '|' || *p != '.')
|
||||
len++;
|
||||
len++;
|
||||
}
|
||||
if (len > pathlen)
|
||||
return -1;
|
||||
|
||||
strcpy(path, HostStatDir);
|
||||
p = path + strlen(path);
|
||||
|
||||
while (elem > t_host)
|
||||
{
|
||||
if (!path_is_dir(path, createflag))
|
||||
{
|
||||
ret = -1;
|
||||
break;
|
||||
}
|
||||
elem--;
|
||||
while (elem >= t_host && *elem != '.')
|
||||
elem--;
|
||||
*p++ = '/';
|
||||
x = elem + 1;
|
||||
while ((ch = *x++) != '\0' && ch != '.')
|
||||
{
|
||||
if (isupper(ch))
|
||||
ch = tolower(ch);
|
||||
if (ch == '|')
|
||||
*p++ = '|'; /* | -> || */
|
||||
else if (ch == '/')
|
||||
ch = '|'; /* / -> | */
|
||||
*p++ = ch;
|
||||
}
|
||||
if (elem >= t_host)
|
||||
*p++ = '.';
|
||||
*p = '\0';
|
||||
}
|
||||
|
||||
if (tTd(56, 80))
|
||||
{
|
||||
if (ret < 0)
|
||||
printf("FAILURE %d\n", ret);
|
||||
else
|
||||
printf("SUCCESS %s\n", path);
|
||||
}
|
||||
|
||||
return (ret);
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 1994 Eric P. Allman
|
||||
* Copyright (c) 1994, 1996 Eric P. Allman
|
||||
* Copyright (c) 1994
|
||||
* The Regents of the University of California. All rights reserved.
|
||||
*
|
||||
|
@ -36,7 +36,7 @@
|
|||
# include <string.h>
|
||||
|
||||
#ifndef lint
|
||||
static char sccsid[] = "@(#)mime.c 8.30.1.1 (Berkeley) 9/16/96";
|
||||
static char sccsid[] = "@(#)mime.c 8.48 (Berkeley) 10/18/96";
|
||||
#endif /* not lint */
|
||||
|
||||
/*
|
||||
|
@ -72,6 +72,10 @@ static char *MimeBoundaryNames[] =
|
|||
{
|
||||
"SYNTAX", "NOTSEP", "INTERMED", "FINAL"
|
||||
};
|
||||
|
||||
bool MapNLtoCRLF;
|
||||
|
||||
extern int mimeboundary __P((char *, char **));
|
||||
/*
|
||||
** MIME8TO7 -- output 8 bit body in 7 bit format
|
||||
**
|
||||
|
@ -125,11 +129,14 @@ mime8to7(mci, header, e, boundaries, flags)
|
|||
char **pvp;
|
||||
int argc = 0;
|
||||
char *bp;
|
||||
bool use_qp = FALSE;
|
||||
struct args argv[MAXMIMEARGS];
|
||||
char bbuf[128];
|
||||
char buf[MAXLINE];
|
||||
char pvpbuf[MAXLINE];
|
||||
extern u_char MimeTokenTab[256];
|
||||
extern int mime_getchar __P((FILE *, char **, int *));
|
||||
extern int mime_getchar_crlf __P((FILE *, char **, int *));
|
||||
|
||||
if (tTd(43, 1))
|
||||
{
|
||||
|
@ -143,6 +150,7 @@ mime8to7(mci, header, e, boundaries, flags)
|
|||
}
|
||||
printf("\n");
|
||||
}
|
||||
MapNLtoCRLF = TRUE;
|
||||
p = hvalue("Content-Transfer-Encoding", header);
|
||||
if (p == NULL ||
|
||||
(pvp = prescan(p, '\0', pvpbuf, sizeof pvpbuf, NULL,
|
||||
|
@ -226,6 +234,13 @@ mime8to7(mci, header, e, boundaries, flags)
|
|||
if (wordinclass(buf, 'n') || (cte != NULL && !wordinclass(cte, 'e')))
|
||||
flags |= M87F_NO8BIT;
|
||||
|
||||
#ifdef USE_B_CLASS
|
||||
if (wordinclass(buf, 'b') || wordinclass(type, 'b'))
|
||||
MapNLtoCRLF = FALSE;
|
||||
#endif
|
||||
if (wordinclass(buf, 'q') || wordinclass(type, 'q'))
|
||||
use_qp = TRUE;
|
||||
|
||||
/*
|
||||
** Multipart requires special processing.
|
||||
**
|
||||
|
@ -246,8 +261,12 @@ mime8to7(mci, header, e, boundaries, flags)
|
|||
}
|
||||
if (i >= argc)
|
||||
{
|
||||
syserr("mime8to7: Content-Type: %s missing boundary", p);
|
||||
syserr("mime8to7: Content-Type: \"%s\": missing boundary",
|
||||
p);
|
||||
p = "---";
|
||||
|
||||
/* avoid bounce loops */
|
||||
e->e_flags |= EF_DONT_MIME;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -260,6 +279,9 @@ mime8to7(mci, header, e, boundaries, flags)
|
|||
syserr("mime8to7: multipart boundary \"%s\" too long",
|
||||
p);
|
||||
blen = sizeof bbuf - 1;
|
||||
|
||||
/* avoid bounce loops */
|
||||
e->e_flags |= EF_DONT_MIME;
|
||||
}
|
||||
strncpy(bbuf, p, blen);
|
||||
bbuf[blen] = '\0';
|
||||
|
@ -269,7 +291,12 @@ mime8to7(mci, header, e, boundaries, flags)
|
|||
if (boundaries[i] == NULL)
|
||||
break;
|
||||
if (i >= MAXMIMENESTING)
|
||||
{
|
||||
syserr("mime8to7: multipart nesting boundary too deep");
|
||||
|
||||
/* avoid bounce loops */
|
||||
e->e_flags |= EF_DONT_MIME;
|
||||
}
|
||||
else
|
||||
{
|
||||
boundaries[i] = bbuf;
|
||||
|
@ -332,7 +359,7 @@ mime8to7(mci, header, e, boundaries, flags)
|
|||
}
|
||||
|
||||
/*
|
||||
** Message/* types -- recurse exactly once.
|
||||
** Message/xxx types -- recurse exactly once.
|
||||
**
|
||||
** Class 's' is predefined to have "rfc822" only.
|
||||
*/
|
||||
|
@ -422,9 +449,11 @@ mime8to7(mci, header, e, boundaries, flags)
|
|||
|
||||
if (tTd(43, 8))
|
||||
{
|
||||
printf("mime8to7: %ld high bit(s) in %ld byte(s), cte=%s\n",
|
||||
printf("mime8to7: %ld high bit(s) in %ld byte(s), cte=%s, type=%s/%s\n",
|
||||
sectionhighbits, sectionsize,
|
||||
cte == NULL ? "[none]" : cte);
|
||||
cte == NULL ? "[none]" : cte,
|
||||
type == NULL ? "[none]" : type,
|
||||
subtype == NULL ? "[none]" : subtype);
|
||||
}
|
||||
if (cte != NULL && strcasecmp(cte, "binary") == 0)
|
||||
sectionsize = sectionhighbits;
|
||||
|
@ -453,14 +482,19 @@ mime8to7(mci, header, e, boundaries, flags)
|
|||
if (feof(e->e_dfp))
|
||||
bt = MBT_FINAL;
|
||||
}
|
||||
else if (sectionsize / 8 < sectionhighbits)
|
||||
else if (!MapNLtoCRLF ||
|
||||
(sectionsize / 8 < sectionhighbits && !use_qp))
|
||||
{
|
||||
/* use base64 encoding */
|
||||
int c1, c2;
|
||||
|
||||
putline("Content-Transfer-Encoding: base64", mci);
|
||||
if (tTd(43, 36))
|
||||
printf(" ...Content-Transfer-Encoding: base64\n");
|
||||
putline("Content-Transfer-Encoding: base64", mci);
|
||||
snprintf(buf, sizeof buf,
|
||||
"X-MIME-Autoconverted: from 8bit to base64 by %s id %s",
|
||||
MyHostName, e->e_id);
|
||||
putline(buf, mci);
|
||||
putline("", mci);
|
||||
mci->mci_flags &= ~MCIF_INHEADER;
|
||||
while ((c1 = mime_getchar_crlf(e->e_dfp, boundaries, &bt)) != EOF)
|
||||
|
@ -519,9 +553,13 @@ mime8to7(mci, header, e, boundaries, flags)
|
|||
for (p = "!\"#$@[\\]^`{|}~"; *p != '\0'; p++)
|
||||
setbitn(*p, badchars);
|
||||
|
||||
putline("Content-Transfer-Encoding: quoted-printable", mci);
|
||||
if (tTd(43, 36))
|
||||
printf(" ...Content-Transfer-Encoding: quoted-printable\n");
|
||||
putline("Content-Transfer-Encoding: quoted-printable", mci);
|
||||
snprintf(buf, sizeof buf,
|
||||
"X-MIME-Autoconverted: from 8bit to quoted-printable by %s id %s",
|
||||
MyHostName, e->e_id);
|
||||
putline(buf, mci);
|
||||
putline("", mci);
|
||||
mci->mci_flags &= ~MCIF_INHEADER;
|
||||
fromstate = 0;
|
||||
|
@ -693,7 +731,7 @@ mime_getchar(fp, boundaries, btp)
|
|||
*bp++ = c;
|
||||
}
|
||||
*bp = '\0';
|
||||
bt = mimeboundary(&buf[1], boundaries);
|
||||
bt = mimeboundary((char *) &buf[1], boundaries);
|
||||
switch (bt)
|
||||
{
|
||||
case MBT_FINAL:
|
||||
|
@ -746,7 +784,7 @@ mime_getchar_crlf(fp, boundaries, btp)
|
|||
return '\n';
|
||||
}
|
||||
c = mime_getchar(fp, boundaries, btp);
|
||||
if (c == '\n')
|
||||
if (c == '\n' && MapNLtoCRLF)
|
||||
{
|
||||
sendlf = TRUE;
|
||||
return '\r';
|
||||
|
@ -776,6 +814,7 @@ mimeboundary(line, boundaries)
|
|||
int type = MBT_NOTSEP;
|
||||
int i;
|
||||
int savec;
|
||||
extern int isboundary __P((char *, char **));
|
||||
|
||||
if (line[0] != '-' || line[1] != '-' || boundaries == NULL)
|
||||
return MBT_NOTSEP;
|
||||
|
@ -864,4 +903,299 @@ isboundary(line, boundaries)
|
|||
return -1;
|
||||
}
|
||||
|
||||
#endif /* MIME */
|
||||
#endif /* MIME8TO7 */
|
||||
|
||||
#if MIME7TO8
|
||||
|
||||
/*
|
||||
** MIME7TO8 -- output 7 bit encoded MIME body in 8 bit format
|
||||
**
|
||||
** This is a hack. Supports translating the two 7-bit body-encodings
|
||||
** (quoted-printable and base64) to 8-bit coded bodies.
|
||||
**
|
||||
** There is not much point in supporting multipart here, as the UA
|
||||
** will be able to deal with encoded MIME bodies if it can parse MIME
|
||||
** multipart messages.
|
||||
**
|
||||
** Note also that we wont be called unless it is a text/plain MIME
|
||||
** message, encoded base64 or QP and mailer flag '9' has been defined
|
||||
** on mailer.
|
||||
**
|
||||
** Contributed by Marius Olaffson <marius@rhi.hi.is>.
|
||||
**
|
||||
** Parameters:
|
||||
** mci -- mailer connection information.
|
||||
** header -- the header for this body part.
|
||||
** e -- envelope.
|
||||
**
|
||||
** Returns:
|
||||
** none.
|
||||
*/
|
||||
|
||||
extern void mime_from64 __P((u_char *, u_char *, int));
|
||||
extern int mime_fromqp __P((u_char *, u_char **, int, int));
|
||||
|
||||
void
|
||||
mime7to8(mci, header, e)
|
||||
register MCI *mci;
|
||||
HDR *header;
|
||||
register ENVELOPE *e;
|
||||
{
|
||||
register char *p;
|
||||
char *cte;
|
||||
char **pvp;
|
||||
u_char *obp;
|
||||
u_char ch, *fbufp, *obufp;
|
||||
char buf[MAXLINE];
|
||||
u_char obuf[MAXLINE + 1];
|
||||
u_char fbuf[MAXLINE + 1];
|
||||
char pvpbuf[MAXLINE];
|
||||
extern u_char MimeTokenTab[256];
|
||||
|
||||
p = hvalue("Content-Transfer-Encoding", header);
|
||||
if (p == NULL ||
|
||||
(pvp = prescan(p, '\0', pvpbuf, sizeof pvpbuf, NULL,
|
||||
MimeTokenTab)) == NULL ||
|
||||
pvp[0] == NULL)
|
||||
{
|
||||
/* "can't happen" -- upper level should have caught this */
|
||||
syserr("mime7to8: unparsable CTE %s", p == NULL ? "<NULL>" : p);
|
||||
|
||||
/* avoid bounce loops */
|
||||
e->e_flags |= EF_DONT_MIME;
|
||||
|
||||
/* cheap failsafe algorithm -- should work on text/plain */
|
||||
if (p != NULL)
|
||||
{
|
||||
snprintf(buf, sizeof buf,
|
||||
"Content-Transfer-Encoding: %s", p);
|
||||
putline(buf, mci);
|
||||
}
|
||||
putline("", mci);
|
||||
mci->mci_flags &= ~MCIF_INHEADER;
|
||||
while (fgets(buf, sizeof buf, e->e_dfp) != NULL)
|
||||
putline(buf, mci);
|
||||
return;
|
||||
}
|
||||
cataddr(pvp, NULL, buf, sizeof buf, '\0');
|
||||
cte = newstr(buf);
|
||||
|
||||
putline("Content-Transfer-Encoding: 8bit", mci);
|
||||
snprintf(buf, sizeof buf,
|
||||
"X-MIME-Autoconverted: from %.200s to 8bit by %s id %s",
|
||||
cte, MyHostName, e->e_id);
|
||||
putline(buf, mci);
|
||||
putline("", mci);
|
||||
mci->mci_flags &= ~MCIF_INHEADER;
|
||||
|
||||
/*
|
||||
** Translate body encoding to 8-bit. Supports two types of
|
||||
** encodings; "base64" and "quoted-printable". Assume qp if
|
||||
** it is not base64.
|
||||
*/
|
||||
|
||||
if (strcasecmp(cte, "base64") == 0)
|
||||
{
|
||||
fbufp = fbuf;
|
||||
while (fgets(buf, sizeof buf, e->e_dfp) != NULL)
|
||||
{
|
||||
obufp = obuf;
|
||||
mime_from64((u_char *) buf, obuf, MAXLINE);
|
||||
while ((ch = *obufp++) != '\0')
|
||||
{
|
||||
*fbufp++ = ch;
|
||||
if (ch == '\n' || fbufp >= &fbuf[MAXLINE])
|
||||
{
|
||||
*fbufp = '\0';
|
||||
putline((char *) fbuf, mci);
|
||||
fbufp = fbuf;
|
||||
}
|
||||
}
|
||||
|
||||
/* force out partial last line */
|
||||
if (fbufp > fbuf)
|
||||
{
|
||||
*fbufp = '\0';
|
||||
putline((char *) fbuf, mci);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
/* quoted-printable */
|
||||
obp = obuf;
|
||||
while (fgets(buf, sizeof buf, e->e_dfp) != NULL)
|
||||
{
|
||||
if (mime_fromqp((u_char *) buf, &obp, 0, &obuf[MAXLINE] - obp) == 0)
|
||||
continue;
|
||||
|
||||
putline((char *) obuf, mci);
|
||||
obp = obuf;
|
||||
}
|
||||
}
|
||||
if (tTd(43, 3))
|
||||
printf("\t\t\tmime7to8 => %s to 8bit done\n", cte);
|
||||
}
|
||||
/*
|
||||
** The following is based on Borenstein's "codes.c" module, with simplifying
|
||||
** changes as we do not deal with multipart, and to do the translation in-core,
|
||||
** with an attempt to prevent overrun of output buffers.
|
||||
**
|
||||
** What is needed here are changes to defned this code better against
|
||||
** bad encodings. Questionable to always return 0xFF for bad mappings.
|
||||
*/
|
||||
|
||||
static char index_hex[128] =
|
||||
{
|
||||
-1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1,
|
||||
-1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1,
|
||||
-1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1,
|
||||
0, 1, 2, 3, 4, 5, 6, 7, 8, 9,-1,-1, -1,-1,-1,-1,
|
||||
-1,10,11,12, 13,14,15,-1, -1,-1,-1,-1, -1,-1,-1,-1,
|
||||
-1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1,
|
||||
-1,10,11,12, 13,14,15,-1, -1,-1,-1,-1, -1,-1,-1,-1,
|
||||
-1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1
|
||||
};
|
||||
|
||||
#define HEXCHAR(c) (((c) < 0 || (c) > 127) ? -1 : index_hex[(c)])
|
||||
|
||||
int
|
||||
mime_fromqp(infile, outfile, state, maxlen)
|
||||
u_char *infile;
|
||||
u_char **outfile;
|
||||
int state; /* Decoding body (0) or header (1) */
|
||||
int maxlen; /* Max # of chars allowed in outfile */
|
||||
{
|
||||
int c1, c2;
|
||||
int nchar = 0;
|
||||
|
||||
while ((c1 = *infile++) != '\0')
|
||||
{
|
||||
if (c1 == '=')
|
||||
{
|
||||
if ((c1 = *infile++) == 0)
|
||||
break;
|
||||
|
||||
if (c1 == '\n') /* ignore it */
|
||||
{
|
||||
if (state == 0)
|
||||
return 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
if ((c2 = *infile++) == '\0')
|
||||
break;
|
||||
|
||||
c1 = HEXCHAR(c1);
|
||||
c2 = HEXCHAR(c2);
|
||||
|
||||
if (++nchar > maxlen)
|
||||
break;
|
||||
|
||||
*(*outfile)++ = c1 << 4 | c2;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (state == 1 && c1 == '_')
|
||||
c1 = ' ';
|
||||
|
||||
if (++nchar > maxlen)
|
||||
break;
|
||||
|
||||
*(*outfile)++ = c1;
|
||||
|
||||
if (c1 == '\n')
|
||||
break;
|
||||
}
|
||||
}
|
||||
*(*outfile)++ = '\0';
|
||||
return 1;
|
||||
}
|
||||
|
||||
static char index_64[128] =
|
||||
{
|
||||
-1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1,
|
||||
-1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1,
|
||||
-1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,62, -1,-1,-1,63,
|
||||
52,53,54,55, 56,57,58,59, 60,61,-1,-1, -1,-1,-1,-1,
|
||||
-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9,10, 11,12,13,14,
|
||||
15,16,17,18, 19,20,21,22, 23,24,25,-1, -1,-1,-1,-1,
|
||||
-1,26,27,28, 29,30,31,32, 33,34,35,36, 37,38,39,40,
|
||||
41,42,43,44, 45,46,47,48, 49,50,51,-1, -1,-1,-1,-1
|
||||
};
|
||||
|
||||
#define CHAR64(c) (((c) < 0 || (c) > 127) ? -1 : index_64[(c)])
|
||||
|
||||
void
|
||||
mime_from64(infile, outfile, maxlen)
|
||||
u_char *infile;
|
||||
u_char *outfile;
|
||||
int maxlen;
|
||||
{
|
||||
int nchar = 0;
|
||||
int c1, c2, c3, c4;
|
||||
|
||||
while ((c1 = *infile++) != '\0')
|
||||
{
|
||||
if (isascii(c1) && isspace(c1))
|
||||
continue;
|
||||
|
||||
do
|
||||
{
|
||||
c2 = *infile++;
|
||||
} while (isascii(c2) && isspace(c2));
|
||||
if (c2 == '\0')
|
||||
break;
|
||||
|
||||
do
|
||||
{
|
||||
c3 = *infile++;
|
||||
} while (isascii(c3) && isspace(c3));
|
||||
if (c3 == '\0')
|
||||
break;
|
||||
|
||||
do
|
||||
{
|
||||
c4 = *infile++;
|
||||
} while (isascii(c4) && isspace(c4));
|
||||
if (c4 == '\0')
|
||||
break;
|
||||
|
||||
if (c1 == '=' || c2 == '=')
|
||||
{
|
||||
continue;
|
||||
}
|
||||
c1 = CHAR64(c1);
|
||||
c2 = CHAR64(c2);
|
||||
|
||||
if (++nchar > maxlen)
|
||||
break;
|
||||
|
||||
*outfile++ = (c1 << 2) | ((c2 & 0x30) >> 4);
|
||||
|
||||
if (c3 != '=')
|
||||
{
|
||||
c3 = CHAR64(c3);
|
||||
|
||||
if (++nchar > maxlen)
|
||||
break;
|
||||
|
||||
*outfile++ = ((c2 & 0x0f) << 4) | ((c3 & 0x3c) >> 2);
|
||||
if (c4 != '=')
|
||||
{
|
||||
c4 = CHAR64(c4);
|
||||
|
||||
if (++nchar > maxlen)
|
||||
break;
|
||||
|
||||
*outfile++ = ((c3 & 0x03) << 6) | c4;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
*outfile = '\0';
|
||||
return;
|
||||
}
|
||||
|
||||
#endif /* MIME7TO8 */
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 1983, 1995 Eric P. Allman
|
||||
* Copyright (c) 1983, 1995, 1996 Eric P. Allman
|
||||
* Copyright (c) 1988, 1993
|
||||
* The Regents of the University of California. All rights reserved.
|
||||
*
|
||||
|
@ -36,9 +36,9 @@
|
|||
|
||||
#ifndef lint
|
||||
#ifdef QUEUE
|
||||
static char sccsid[] = "@(#)queue.c 8.98.1.3 (Berkeley) 9/16/96 (with queueing)";
|
||||
static char sccsid[] = "@(#)queue.c 8.125 (Berkeley) 10/12/96 (with queueing)";
|
||||
#else
|
||||
static char sccsid[] = "@(#)queue.c 8.98.1.3 (Berkeley) 9/16/96 (without queueing)";
|
||||
static char sccsid[] = "@(#)queue.c 8.125 (Berkeley) 10/12/96 (without queueing)";
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
|
@ -71,6 +71,8 @@ WORK *WorkQ; /* queue of things to be done */
|
|||
#if !defined(NGROUPS_MAX) && defined(NGROUPS)
|
||||
# define NGROUPS_MAX NGROUPS /* POSIX naming convention */
|
||||
#endif
|
||||
|
||||
extern int orderq __P((bool));
|
||||
/*
|
||||
** QUEUEUP -- queue a message up for future transmission.
|
||||
**
|
||||
|
@ -261,6 +263,12 @@ queueup(e, announce)
|
|||
*p++ = 'r';
|
||||
if (bitset(EF_HAS8BIT, e->e_flags))
|
||||
*p++ = '8';
|
||||
if (bitset(EF_DELETE_BCC, e->e_flags))
|
||||
*p++ = 'b';
|
||||
if (bitset(EF_RET_PARAM, e->e_flags))
|
||||
*p++ = 'd';
|
||||
if (bitset(EF_NO_BODY_RETN, e->e_flags))
|
||||
*p++ = 'n';
|
||||
*p++ = '\0';
|
||||
if (buf[0] != '\0')
|
||||
fprintf(tfp, "F%s\n", buf);
|
||||
|
@ -298,6 +306,8 @@ queueup(e, announce)
|
|||
putc('R', tfp);
|
||||
if (bitset(QPRIMARY, q->q_flags))
|
||||
putc('P', tfp);
|
||||
if (bitset(QHASNOTIFY, q->q_flags))
|
||||
putc('N', tfp);
|
||||
if (bitset(QPINGONSUCCESS, q->q_flags))
|
||||
putc('S', tfp);
|
||||
if (bitset(QPINGONFAILURE, q->q_flags))
|
||||
|
@ -534,6 +544,7 @@ runqueue(forkflag)
|
|||
int njobs;
|
||||
int sequenceno = 0;
|
||||
extern ENVELOPE BlankEnvelope;
|
||||
extern void clrdaemon __P((void));
|
||||
|
||||
/*
|
||||
** If no work will ever be selected, don't even bother reading
|
||||
|
@ -578,7 +589,7 @@ runqueue(forkflag)
|
|||
#ifndef SIGCHLD
|
||||
(void) waitfor(pid);
|
||||
#else
|
||||
CurChildren++;
|
||||
proc_list_add(pid);
|
||||
#endif /* SIGCHLD */
|
||||
if (QueueIntvl != 0)
|
||||
(void) setevent(QueueIntvl, runqueue, TRUE);
|
||||
|
@ -592,6 +603,7 @@ runqueue(forkflag)
|
|||
(void) setsignal(SIGCHLD, SIG_DFL);
|
||||
#endif /* SIGCHLD */
|
||||
(void) setsignal(SIGHUP, intsig);
|
||||
Verbose = FALSE;
|
||||
}
|
||||
|
||||
setproctitle("running queue: %s", QueueDir);
|
||||
|
@ -627,6 +639,15 @@ runqueue(forkflag)
|
|||
|
||||
initmaps(FALSE, e);
|
||||
|
||||
/*
|
||||
** If we are running part of the queue, always ignore stored
|
||||
** host status.
|
||||
*/
|
||||
|
||||
if (QueueLimitId != NULL || QueueLimitSender != NULL ||
|
||||
QueueLimitRecipient != NULL)
|
||||
HostStatDir = NULL;
|
||||
|
||||
/*
|
||||
** Start making passes through the queue.
|
||||
** First, read and sort the entire queue.
|
||||
|
@ -643,6 +664,7 @@ runqueue(forkflag)
|
|||
WORK *w = WorkQ;
|
||||
|
||||
WorkQ = WorkQ->w_next;
|
||||
e->e_to = NULL;
|
||||
|
||||
/*
|
||||
** Ignore jobs that are too expensive for the moment.
|
||||
|
@ -652,8 +674,11 @@ runqueue(forkflag)
|
|||
if (shouldqueue(w->w_pri, w->w_ctime))
|
||||
{
|
||||
if (Verbose)
|
||||
printf("\nSkipping %s (sequence %d of %d)\n",
|
||||
{
|
||||
message("");
|
||||
message("Skipping %s (sequence %d of %d)",
|
||||
w->w_name + 2, sequenceno, njobs);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -661,8 +686,11 @@ runqueue(forkflag)
|
|||
extern pid_t dowork();
|
||||
|
||||
if (Verbose)
|
||||
printf("\nRunning %s (sequence %d of %d)\n",
|
||||
{
|
||||
message("");
|
||||
message("Running %s (sequence %d of %d)",
|
||||
w->w_name + 2, sequenceno, njobs);
|
||||
}
|
||||
pid = dowork(w->w_name + 2, ForkQueueRuns, FALSE, e);
|
||||
errno = 0;
|
||||
if (pid != 0)
|
||||
|
@ -850,10 +878,15 @@ orderq(doall)
|
|||
i |= NEED_R;
|
||||
while (i != 0 && fgets(lbuf, sizeof lbuf, cf) != NULL)
|
||||
{
|
||||
int qfver = 0;
|
||||
extern bool strcontainedin();
|
||||
|
||||
switch (lbuf[0])
|
||||
{
|
||||
case 'V':
|
||||
qfver = atoi(&lbuf[1]);
|
||||
break;
|
||||
|
||||
case 'P':
|
||||
w->w_pri = atol(&lbuf[1]);
|
||||
i &= ~NEED_P;
|
||||
|
@ -868,8 +901,20 @@ orderq(doall)
|
|||
if (w->w_host == NULL &&
|
||||
(p = strrchr(&lbuf[1], '@')) != NULL)
|
||||
w->w_host = newstr(&p[1]);
|
||||
if (QueueLimitRecipient == NULL ||
|
||||
strcontainedin(QueueLimitRecipient, &lbuf[1]))
|
||||
if (QueueLimitRecipient == NULL)
|
||||
{
|
||||
i &= ~NEED_R;
|
||||
break;
|
||||
}
|
||||
if (qfver > 0)
|
||||
{
|
||||
p = strchr(&lbuf[1], ':');
|
||||
if (p == NULL)
|
||||
p = &lbuf[1];
|
||||
}
|
||||
else
|
||||
p = &lbuf[1];
|
||||
if (strcontainedin(QueueLimitRecipient, p))
|
||||
i &= ~NEED_R;
|
||||
break;
|
||||
|
||||
|
@ -958,6 +1003,16 @@ orderq(doall)
|
|||
|
||||
qsort((char *) WorkList, wc, sizeof *WorkList, workcmpf2);
|
||||
}
|
||||
else if (QueueSortOrder == QS_BYTIME)
|
||||
{
|
||||
extern workcmpf3();
|
||||
|
||||
/*
|
||||
** Simple sort based on submission time only.
|
||||
*/
|
||||
|
||||
qsort((char *) WorkList, wc, sizeof *WorkList, workcmpf3);
|
||||
}
|
||||
else
|
||||
{
|
||||
extern workcmpf0();
|
||||
|
@ -1165,6 +1220,34 @@ workcmpf2(a, b)
|
|||
return a->w_pri - b->w_pri;
|
||||
}
|
||||
/*
|
||||
** WORKCMPF3 -- simple submission-time-only compare function.
|
||||
**
|
||||
** Parameters:
|
||||
** a -- the first argument.
|
||||
** b -- the second argument.
|
||||
**
|
||||
** Returns:
|
||||
** -1 if a < b
|
||||
** 0 if a == b
|
||||
** +1 if a > b
|
||||
**
|
||||
** Side Effects:
|
||||
** none.
|
||||
*/
|
||||
|
||||
int
|
||||
workcmpf3(a, b)
|
||||
register WORK *a;
|
||||
register WORK *b;
|
||||
{
|
||||
if (a->w_ctime > b->w_ctime)
|
||||
return 1;
|
||||
else if (a->w_ctime < b->w_ctime)
|
||||
return 1;
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
/*
|
||||
** DOWORK -- do a work request.
|
||||
**
|
||||
** Parameters:
|
||||
|
@ -1276,7 +1359,7 @@ dowork(id, forkflag, requeueflag, e)
|
|||
if (forkflag)
|
||||
finis();
|
||||
else
|
||||
dropenvelope(e);
|
||||
dropenvelope(e, TRUE);
|
||||
}
|
||||
e->e_id = NULL;
|
||||
return pid;
|
||||
|
@ -1310,7 +1393,6 @@ readqf(e)
|
|||
char qf[20];
|
||||
char buf[MAXLINE];
|
||||
extern ADDRESS *setctluser __P((char *, int));
|
||||
extern void loseqfile();
|
||||
|
||||
/*
|
||||
** Read and process the file.
|
||||
|
@ -1355,7 +1437,8 @@ readqf(e)
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
if (st.st_uid != geteuid() || bitset(S_IWOTH|S_IWGRP, st.st_mode))
|
||||
if ((st.st_uid != geteuid() && geteuid() != RealUid) ||
|
||||
bitset(S_IWOTH|S_IWGRP, st.st_mode))
|
||||
{
|
||||
# ifdef LOG
|
||||
if (LogLevel > 0)
|
||||
|
@ -1374,6 +1457,9 @@ readqf(e)
|
|||
if (st.st_size == 0)
|
||||
{
|
||||
/* must be a bogus file -- just remove it */
|
||||
qf[0] = 'd';
|
||||
(void) unlink(qf);
|
||||
qf[0] = 'q';
|
||||
(void) unlink(qf);
|
||||
fclose(qfp);
|
||||
return FALSE;
|
||||
|
@ -1408,6 +1494,8 @@ readqf(e)
|
|||
register char *p;
|
||||
u_long qflags;
|
||||
ADDRESS *q;
|
||||
int mid;
|
||||
auto char *ep;
|
||||
|
||||
if (tTd(40, 4))
|
||||
printf("+++++ %s\n", bp);
|
||||
|
@ -1448,6 +1536,10 @@ readqf(e)
|
|||
{
|
||||
switch (*p)
|
||||
{
|
||||
case 'N':
|
||||
qflags |= QHASNOTIFY;
|
||||
break;
|
||||
|
||||
case 'S':
|
||||
qflags |= QPINGONSUCCESS;
|
||||
break;
|
||||
|
@ -1472,6 +1564,8 @@ readqf(e)
|
|||
if (q != NULL)
|
||||
{
|
||||
q->q_alias = ctladdr;
|
||||
if (qfver >= 1)
|
||||
q->q_flags &= ~Q_PINGFLAGS;
|
||||
q->q_flags |= qflags;
|
||||
q->q_orcpt = orcpt;
|
||||
(void) recipient(q, &e->e_sendqueue, 0, e);
|
||||
|
@ -1508,8 +1602,7 @@ readqf(e)
|
|||
break;
|
||||
|
||||
case 'I': /* data file's inode number */
|
||||
if (e->e_dfino == -1)
|
||||
e->e_dfino = atol(&buf[1]);
|
||||
/* regenerated below */
|
||||
break;
|
||||
|
||||
case 'K': /* time of last deliver attempt */
|
||||
|
@ -1548,6 +1641,18 @@ readqf(e)
|
|||
case '8': /* has 8 bit data */
|
||||
e->e_flags |= EF_HAS8BIT;
|
||||
break;
|
||||
|
||||
case 'b': /* delete Bcc: header */
|
||||
e->e_flags |= EF_DELETE_BCC;
|
||||
break;
|
||||
|
||||
case 'd': /* envelope has DSN RET= */
|
||||
e->e_flags |= EF_RET_PARAM;
|
||||
break;
|
||||
|
||||
case 'n': /* don't return body */
|
||||
e->e_flags |= EF_NO_BODY_RETN;
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
@ -1557,7 +1662,8 @@ readqf(e)
|
|||
break;
|
||||
|
||||
case '$': /* define macro */
|
||||
define(bp[1], newstr(&bp[2]), e);
|
||||
mid = macid(&bp[1], &ep);
|
||||
define(mid, newstr(ep), e);
|
||||
break;
|
||||
|
||||
case '.': /* terminate file */
|
||||
|
@ -1566,7 +1672,7 @@ readqf(e)
|
|||
|
||||
default:
|
||||
syserr("readqf: %s: line %d: bad line \"%s\"",
|
||||
qf, LineNumber, bp);
|
||||
qf, LineNumber, shortenstring(bp, 203));
|
||||
fclose(qfp);
|
||||
loseqfile(e, "unrecognized line");
|
||||
return FALSE;
|
||||
|
@ -1706,8 +1812,8 @@ printqueue()
|
|||
CurrentLA = getla(); /* get load average */
|
||||
|
||||
printf("\t\tMail Queue (%d request%s", nrequests, nrequests == 1 ? "" : "s");
|
||||
if (nrequests > WorkListSize)
|
||||
printf(", only %d printed", WorkListSize);
|
||||
if (MaxQueueRun > 0 && nrequests > MaxQueueRun)
|
||||
printf(", only %d printed", MaxQueueRun);
|
||||
if (Verbose)
|
||||
printf(")\n--Q-ID-- --Size-- -Priority- ---Q-Time--- -----------Sender/Recipient-----------\n");
|
||||
else
|
||||
|
@ -1775,7 +1881,7 @@ printqueue()
|
|||
|
||||
case 'S': /* sender name */
|
||||
if (Verbose)
|
||||
printf("%8ld %10ld%c%.12s %.38s",
|
||||
printf("%8ld %10ld%c%.12s %.78s",
|
||||
dfsize,
|
||||
w->w_pri,
|
||||
bitset(EF_WARNING, flags) ? '+' : ' ',
|
||||
|
@ -1788,13 +1894,15 @@ printqueue()
|
|||
{
|
||||
printf("\n %10.10s", bodytype);
|
||||
if (statmsg[0] != '\0')
|
||||
printf(" (%.60s)", statmsg);
|
||||
printf(" (%.*s)",
|
||||
Verbose ? 100 : 60,
|
||||
statmsg);
|
||||
}
|
||||
break;
|
||||
|
||||
case 'C': /* controlling user */
|
||||
if (Verbose)
|
||||
printf("\n\t\t\t\t (---%.34s---)",
|
||||
printf("\n\t\t\t\t (---%.74s---)",
|
||||
&buf[1]);
|
||||
break;
|
||||
|
||||
|
@ -1808,7 +1916,7 @@ printqueue()
|
|||
p++;
|
||||
}
|
||||
if (Verbose)
|
||||
printf("\n\t\t\t\t\t %.38s", p);
|
||||
printf("\n\t\t\t\t\t %.78s", p);
|
||||
else
|
||||
printf("\n\t\t\t\t %.45s", p);
|
||||
break;
|
||||
|
@ -1966,7 +2074,8 @@ unlockqueue(e)
|
|||
ENVELOPE *e;
|
||||
{
|
||||
if (tTd(51, 4))
|
||||
printf("unlockqueue(%s)\n", e->e_id);
|
||||
printf("unlockqueue(%s)\n",
|
||||
e->e_id == NULL ? "NOQUEUE" : e->e_id);
|
||||
|
||||
/* if there is a lock file in the envelope, close it */
|
||||
if (e->e_lockfp != NULL)
|
||||
|
@ -2090,7 +2199,7 @@ loseqfile(e, why)
|
|||
|
||||
if (e == NULL || e->e_id == NULL)
|
||||
return;
|
||||
if (strlen(e->e_id) > sizeof buf - 4)
|
||||
if (strlen(e->e_id) > (SIZE_T) sizeof buf - 4)
|
||||
return;
|
||||
strcpy(buf, queuename(e, 'q'));
|
||||
p = queuename(e, 'Q');
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
cpyr
|
||||
cpyr Copyright (c) 1983, 1995 Eric P. Allman
|
||||
cpyr Copyright (c) 1983, 1995, 1996 Eric P. Allman
|
||||
cpyr Copyright (c) 1988, 1993
|
||||
cpyr The Regents of the University of California. All rights reserved.
|
||||
cpyr
|
||||
cpyr @(#)sendmail.hf 8.7 (Berkeley) 10/1/95
|
||||
cpyr @(#)sendmail.hf 8.11 (Berkeley) 9/11/96
|
||||
cpyr
|
||||
smtp Commands:
|
||||
smtp Topics:
|
||||
smtp HELO EHLO MAIL RCPT DATA
|
||||
smtp RSET NOOP QUIT HELP VRFY
|
||||
smtp EXPN VERB
|
||||
smtp EXPN VERB ETRN DSN
|
||||
smtp For more info use "HELP <topic>".
|
||||
smtp To report bugs in the implementation send email to
|
||||
smtp sendmail-bugs@sendmail.org.
|
||||
|
@ -19,10 +19,29 @@ helo HELO <hostname>
|
|||
helo Introduce yourself.
|
||||
ehlo EHLO <hostname>
|
||||
ehlo Introduce yourself, and request extended SMTP mode.
|
||||
mail MAIL FROM: <sender>
|
||||
mail Specifies the sender.
|
||||
rcpt RCPT TO: <recipient>
|
||||
ehlo Possible replies include:
|
||||
ehlo SEND Send as mail [RFC821]
|
||||
ehlo SOML Send as mail or terminal [RFC821]
|
||||
ehlo SAML Send as mail and terminal [RFC821]
|
||||
ehlo EXPN Expand the mailing list [RFC821]
|
||||
ehlo HELP Supply helpful information [RFC821]
|
||||
ehlo TURN Turn the operation around [RFC821]
|
||||
ehlo 8BITMIME Use 8-bit data [RFC1652]
|
||||
ehlo SIZE Message size declaration [RFC1870]
|
||||
ehlo VERB Verbose [Allman]
|
||||
ehlo ONEX One message transaction only [Allman]
|
||||
ehlo CHUNKING Chunking [RFC1830]
|
||||
ehlo BINARYMIME Binary MIME [RFC1830]
|
||||
ehlo PIPELINING Command Pipelining [RFC1854]
|
||||
ehlo DSN Delivery Status Notification [RFC1891]
|
||||
ehlo ETRN Remote Message Queue Starting [RFC1985]
|
||||
ehlo XUSR Initial (user) submission [Allman]
|
||||
mail MAIL FROM: <sender> [ <parameters> ]
|
||||
mail Specifies the sender. Parameters are ESMTP extensions.
|
||||
mail See "HELP DSN" for details.
|
||||
rcpt RCPT TO: <recipient> [ <parameters> ]
|
||||
rcpt Specifies the recipient. Can be used any number of times.
|
||||
rcpt Parameters are ESMTP extensions. See "HELP DSN" for details.
|
||||
data DATA
|
||||
data Following text is collected as the message.
|
||||
data End with a single dot.
|
||||
|
@ -56,6 +75,20 @@ saml implementation.
|
|||
turn TURN
|
||||
turn Reverses the direction of the connection. Not currently
|
||||
turn implemented.
|
||||
etrn ETRN [ <hostname> | @<domain> | #<queuename> ]
|
||||
etrn Run the queue for the specified <hostname>, or
|
||||
etrn all hosts within a given <domain>, or a specially-named
|
||||
etrn <queuename> (implementation-specific).
|
||||
dsn MAIL FROM: <sender> [ RET={ FULL | HDRS} ] [ ENVID=<envid> ]
|
||||
dsn RCPT TO: <recipient> [ NOTIFY={NEVER,SUCCESS,FAILURE,DELAY} ]
|
||||
dsn [ ORCPT=<recipient> ]
|
||||
dsn SMTP Delivery Status Notifications.
|
||||
dsn Descriptions:
|
||||
dsn RET Return either the full message or only headers.
|
||||
dsn ENVID Sender's "envelope identifier" for tracking.
|
||||
dsn NOTIFY When to send a DSN. Multiple options are OK, comma-
|
||||
dsn delimited. NEVER must appear by itself.
|
||||
dsn ORCPT Original recipient.
|
||||
-bt Help for test mode:
|
||||
-bt ? :this help message.
|
||||
-bt .Dmvalue :define macro `m' to `value'.
|
||||
|
@ -76,3 +109,5 @@ turn implemented.
|
|||
-bt flags for header recipients.
|
||||
-bt /canon hostname :try to canonify hostname.
|
||||
-bt /map mapname key :look up `key' in the indicated `mapname'.
|
||||
-bt rules addr :run the indicated address through the named rules.
|
||||
-bt Rules can be a comma separated list of rules.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 1983, 1995 Eric P. Allman
|
||||
* Copyright (c) 1983, 1995, 1996 Eric P. Allman
|
||||
* Copyright (c) 1988, 1993
|
||||
* The Regents of the University of California. All rights reserved.
|
||||
*
|
||||
|
@ -33,7 +33,7 @@
|
|||
*/
|
||||
|
||||
#ifndef lint
|
||||
static char sccsid[] = "@(#)stab.c 8.6 (Berkeley) 8/31/95";
|
||||
static char sccsid[] = "@(#)stab.c 8.9 (Berkeley) 10/17/96";
|
||||
#endif /* not lint */
|
||||
|
||||
# include "sendmail.h"
|
||||
|
@ -71,6 +71,7 @@ stab(name, type, op)
|
|||
register STAB **ps;
|
||||
register int hfunc;
|
||||
register char *p;
|
||||
int len;
|
||||
extern char lower();
|
||||
|
||||
if (tTd(36, 5))
|
||||
|
@ -129,11 +130,73 @@ stab(name, type, op)
|
|||
if (tTd(36, 5))
|
||||
printf("entered\n");
|
||||
|
||||
/* determine size of new entry */
|
||||
#ifdef FFR_MEMORY_MISER
|
||||
if (type >= ST_MCI)
|
||||
len = sizeof s->s_mci;
|
||||
else
|
||||
len = -1;
|
||||
switch (type)
|
||||
{
|
||||
case ST_CLASS:
|
||||
len = sizeof s->s_class;
|
||||
break;
|
||||
|
||||
case ST_ADDRESS:
|
||||
len = sizeof s->s_address;
|
||||
break;
|
||||
|
||||
case ST_MAILER:
|
||||
len = sizeof s->s_mailer;
|
||||
|
||||
case ST_ALIAS:
|
||||
len = sizeof s->s_alias;
|
||||
break;
|
||||
|
||||
case ST_MAPCLASS:
|
||||
len = sizeof s->s_mapclass;
|
||||
break;
|
||||
|
||||
case ST_MAP:
|
||||
len = sizeof s->s_map;
|
||||
break;
|
||||
|
||||
case ST_HOSTSIG:
|
||||
len = sizeof s->s_hostsig;
|
||||
break;
|
||||
|
||||
case ST_NAMECANON:
|
||||
len = sizeof s->s_namecanon;
|
||||
break;
|
||||
|
||||
case ST_MACRO:
|
||||
len = sizeof s->s_macro;
|
||||
break;
|
||||
|
||||
case ST_RULESET:
|
||||
len = sizeof s->s_ruleset;
|
||||
break;
|
||||
|
||||
case ST_SERVICE:
|
||||
len = sizeof s->s_service;
|
||||
break;
|
||||
}
|
||||
if (len < 0)
|
||||
{
|
||||
syserr("stab: unknown symbol type %d", type);
|
||||
len = sizeof s->s_value;
|
||||
}
|
||||
len += sizeof *s - sizeof s->s_value;
|
||||
#else
|
||||
len = sizeof *s;
|
||||
#endif
|
||||
|
||||
/* make new entry */
|
||||
s = (STAB *) xalloc(sizeof *s);
|
||||
bzero((char *) s, sizeof *s);
|
||||
s = (STAB *) xalloc(len);
|
||||
bzero((char *) s, len);
|
||||
s->s_name = newstr(name);
|
||||
s->s_type = type;
|
||||
s->s_len = len;
|
||||
|
||||
/* link it in */
|
||||
*ps = s;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 1983, 1995 Eric P. Allman
|
||||
* Copyright (c) 1983, 1995, 1996 Eric P. Allman
|
||||
* Copyright (c) 1988, 1993
|
||||
* The Regents of the University of California. All rights reserved.
|
||||
*
|
||||
|
@ -33,7 +33,7 @@
|
|||
*/
|
||||
|
||||
#ifndef lint
|
||||
static char sccsid[] = "@(#)stats.c 8.5 (Berkeley) 5/28/95";
|
||||
static char sccsid[] = "@(#)stats.c 8.6 (Berkeley) 2/21/96";
|
||||
#endif /* not lint */
|
||||
|
||||
# include "sendmail.h"
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 1983, 1995 Eric P. Allman
|
||||
* Copyright (c) 1983, 1995, 1996 Eric P. Allman
|
||||
* Copyright (c) 1988, 1993
|
||||
* The Regents of the University of California. All rights reserved.
|
||||
*
|
||||
|
@ -33,7 +33,7 @@
|
|||
*/
|
||||
|
||||
#ifndef lint
|
||||
static char sccsid[] = "@(#)sysexits.c 8.5 (Berkeley) 5/24/95";
|
||||
static char sccsid[] = "@(#)sysexits.c 8.6 (Berkeley) 2/21/96";
|
||||
#endif /* not lint */
|
||||
|
||||
#include <sendmail.h>
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue