[prev in list] [next in list] [prev in thread] [next in thread] 

List:       majordomo-users
Subject:    looping mail from majordomo.. well, maybe not?
From:       c1040 () azfms ! com (Rusty Carruth)
Date:       1997-07-29 21:32:27
[Download RAW message or body]


Well, I've got a real problem.

Platform: linux from 1 year old Slackware release.  (I'll have to
check the precise versions of everything tonight).

Environment - PPP connection to the internet, no local network (yet),
fixed PPP ip address.  I originally set my machine up as 'descomp.com',
but have changed to 'descomp.phx.inficad.com' (the change MAY not have
been completely done - but I *thought* I got everything).

History of install of MajorD:  Download most recent version (1 month ago),
put source in /usr/src/major...blah...blah..., partially create user majordomo
(create home dir, hack /etc/passwd).  Build and install into /home/majordomo/pkg,
set up all the variables, run all the tests, everything worked fine as far as
I could tell.  (Oh - it DID complain about no <something>.db file - I touch'ed
the file and the complaining went away).  I subscribed locall and unsubscribed
locally, looked fine.

Then I changed from descomp.com to descomp.phx.inficad.com.  As I say, I think
I got everything, but now when I send a message to majordomo@descomp.phx..blah....,
my system goes into an email loop.

I believe I can still subscribe and unscribe locally, but external email dies
a looping death.

Shoot - the exact bounce message is not here, its at home.  I'll send that along
later today.

Any ideas from the group?

Here's the commands I used to send the following stuff to myself from my soon-to-be
majordomo machine:

  504  ./wrapper config-test | mail c1040@azfms.com
  506  mail c1040@azfms.com < majordomo.aliases
  507  mail c1040@azfms.com < majordomo.cf
  508  mail c1040@azfms.com < lists/silly
  509  mail c1040@azfms.com < lists/silly.config
  510  mail c1040@azfms.com < /etc/sendmail.cf
  511  history|egrep mail | tail -20|mail c1040@azfms.com

And here is the actual stuff:

> From majordomo@descomp.phx.inficad.com Mon Jul 28 06:43 MST 1997
Return-Path: <majordomo@descomp.phx.inficad.com>
Received: from azfms.com (ihost2) by fmsserv99.azfms.com (5.x/SMI-SVR4)
	id AA11712; Mon, 28 Jul 1997 06:43:09 -0700
Received: from mail.inficad.com by azfms.com (SMI-8.6/SMI-SVR4)
	id GAA23040; Mon, 28 Jul 1997 06:42:58 -0700
Received: from descomp.phx.inficad.com (majordomo@descomp.phx.inficad.com \
[207.19.74.63]) by mail.inficad.com (8.8.6/8.7.3) with ESMTP id GAA08123 for \
                <rustyc@user2.inficad.com>; Mon, 28 Jul 1997 06:59:25 -0700 (MST)
Received: (from majordomo@localhost) by descomp.phx.inficad.com (8.7.5/8.7.3) id \
                GAA00156; Mon, 28 Jul 1997 06:42:28 -0700
Date: Mon, 28 Jul 1997 06:42:28 -0700
From: MajorDomo <majordomo@descomp.phx.inficad.com>
Message-Id: <199707281342.GAA00156@descomp.phx.inficad.com>
X-Authentication-Warning: descomp.phx.inficad.com: majordomo set sender to \
                majordomo@descomp.phx.inficad.com using -f
To: rustyc@user2.inficad.com
Subject: Majordomo results: help
Reply-To: majordomo@descomp.phx.inficad.com
Content-Type: text
Content-Length: 8837
X-Lines: 246
Status: RO

--

> > > > help

This help message is being sent to you from the Majordomo mailing list
management system at majordomo@descomp.phx.inficad.com.

This is version 1.94.3 of Majordomo.

If you're familiar with mail servers, an advanced user's summary of
Majordomo's commands appears at the end of this message.

Majordomo is an automated system which allows users to subscribe
and unsubscribe to mailing lists, and to retrieve files from list
archives.

You can interact with the Majordomo software by sending it commands
in the body of mail messages addressed to "majordomo@descomp.phx.inficad.com".
Please do not put your commands on the subject line; Majordomo does
not process commands in the subject line.

You may put multiple Majordomo commands in the same mail message.
Put each command on a line by itself.

If you use a "signature block" at the end of your mail, Majordomo may
mistakenly believe each line of your message is a command; you will
then receive spurious error messages.  To keep this from happening,
either put a line starting with a hyphen ("-") before your signature,
or put a line with just the word

	end

on it in the same place.  This will stop the Majordomo software from
processing your signature as bad commands.

Here are some of the things you can do using Majordomo:

I.	FINDING OUT WHICH LISTS ARE ON THIS SYSTEM

To get a list of publicly-available mailing lists on this system, put the
following line in the body of your mail message to majordomo@descomp.phx.inficad.com:

	lists

Each line will contain the name of a mailing list and a brief description
of the list.

To get more information about a particular list, use the "info" command,
supplying the name of the list.  For example, if the name of the list
about which you wish information is "demo-list", you would put the line

	info demo-list

in the body of the mail message.

II.	SUBSCRIBING TO A LIST

Once you've determined that you wish to subscribe to one or more lists on
this system, you can send commands to Majordomo to have it add you to the
list, so you can begin receiving mailings.

To receive list mail at the address from which you're sending your mail,
simply say "subscribe" followed by the list's name:

	subscribe demo-list

If for some reason you wish to have the mailings go to a different address
(a friend's address, a specific other system on which you have an account,
or an address which is more correct than the one that automatically appears
in the "From:" header on the mail you send), you would add that address to
the command.  For instance, if you're sending a request from your work
account, but wish to receive "demo-list" mail at your personal account
(for which we will use "jqpublic@my-isp.com" as an example), you'd put
the line

	subscribe demo-list jqpublic@my-isp.com

in the mail message body.

Based on configuration decisions made by the list owners, you may be added
to the mailing list automatically.  You may also receive notification
that an authorization key is required for subscription.  Another message
will be sent to the address to be subscribed (which may or may not be the
same as yours) containing the key, and directing the user to send a
command found in that message back to majordomo@descomp.phx.inficad.com.  (This can \
be a bit of extra hassle, but it helps keep you from being swamped in extra
email by someone who forged requests from your address.)  You may also
get a message that your subscription is being forwarded to the list owner
for approval; some lists have waiting lists, or policies about who may
subscribe.  If your request is forwarded for approval, the list owner
should contact you soon after your request.

Upon subscribing, you should receive an introductory message, containing
list policies and features.  Save this message for future reference; it
will also contain exact directions for unsubscribing.  If you lose the
intro mail and would like another copy of the policies, send this message
to majordomo@descomp.phx.inficad.com:

	intro demo-list

(substituting, of course, the real name of your list for "demo-list").

III.	UNSUBSCRIBING FROM MAILING LISTS

Your original intro message contains the exact command which should be
used to remove your address from the list.  However, in most cases, you
may simply send the command "unsubscribe" followed by the list name:

	unsubscribe demo-list

(This command may fail if your provider has changed the way your
address is shown in your mail.)

To remove an address other than the one from which you're sending
the request, give that address in the command:

	unsubscribe demo-list jqpublic@my-isp.com

In either of these cases, you can tell majordomo@descomp.phx.inficad.com to remove
the address in question from all lists on this server by using "*"
in place of the list name:

	unsubscribe *
	unsubscribe * jqpublic@my-isp.com

IV.	FINDING THE LISTS TO WHICH AN ADDRESS IS SUBSCRIBED

To find the lists to which your address is subscribed, send this command
in the body of a mail message to majordomo@descomp.phx.inficad.com:

	which

You can look for other addresses, or parts of an address, by specifying
the text for which Majordomo should search.  For instance, to find which
users at my-isp.com are subscribed to which lists, you might send the
command

	which my-isp.com

Note that many list owners completely or fully disable the "which"
command, considering it a privacy violation.

V.	FINDING OUT WHO'S SUBSCRIBED TO A LIST

To get a list of the addresses on a particular list, you may use the
"who" command, followed by the name of the list:

	who demo-list

Note that many list owners allow only a list's subscribers to use the
"who" command, or disable it completely, believing it to be a privacy
violation.

VI.	RETRIEVING FILES FROM A LIST'S ARCHIVES

Many list owners keep archives of files associated with a list.  These
may include:
- back issues of the list
- help files, user profiles, and other documents associated with the list
- daily, monthly, or yearly archives for the list

To find out if a list has any files associated with it, use the "index"
command:

	index demo-list

If you see files in which you're interested, you may retrieve them by
using the "get" command and specifying the list name and archive filename.
For instance, to retrieve the files called "profile.form" (presumably a
form to fill out with your profile) and "demo-list.9611" (presumably the
messages posted to the list in November 1996), you would put the lines

	get demo-list profile.form
	get demo-list demo-list.9611

in your mail to majordomo@descomp.phx.inficad.com.

VII.	GETTING MORE HELP

To contact a human site manager, send mail to majordomo@descomp.phx.inficad.com.
To contact the owner of a specific list, send mail to that list's
approval address, which is formed by adding "-approval" to the user-name
portion of the list's address.  For instance, to contact the list owner
for demo-list@descomp.phx.inficad.com, you would send mail to \
demo-list-approval@descomp.phx.inficad.com.

To get another copy of this help message, send mail to \
majordomo@descomp.phx.inficad.com with a line saying

	help

in the message body.

VIII.	COMMAND SUMMARY FOR ADVANCED USERS

In the description below items contained in []'s are optional. When
providing the item, do not include the []'s around it.  Items in angle
brackets, such as <address>, are meta-symbols that should be replaced
by appropriate text without the angle brackets.

It understands the following commands:

    subscribe <list> [<address>]
	Subscribe yourself (or <address> if specified) to the named <list>.

    unsubscribe <list> [<address>]
	Unsubscribe yourself (or <address> if specified) from the named <list>.
	"unsubscribe *" will remove you (or <address>) from all lists.  This
	_may not_ work if you have subscribed using multiple addresses.

    get <list> <filename>
        Get a file related to <list>.

    index <list>
        Return an index of files you can "get" for <list>.

    which [<address>]
	Find out which lists you (or <address> if specified) are on.

    who <list>
	Find out who is on the named <list>.

    info <list>
	Retrieve the general introductory information for the named <list>.

    intro <list>
	Retrieve the introductory message sent to new users.  Non-subscribers
	may not be able to retrieve this.

    lists
	Show the lists served by this Majordomo server.

    help
	Retrieve this message.

    end
	Stop processing commands (useful if your mailer adds a signature).

Commands should be sent in the body of an email message to
"majordomo@descomp.phx.inficad.com". Multiple commands can be processed provided
each occurs on a separate line.

Commands in the "Subject:" line are NOT processed.

If you have any questions or problems, please contact
"majordomo@descomp.phx.inficad.com".


> From root@descomp.phx.inficad.com Mon Jul 28 07:08 MST 1997
Return-Path: <root@descomp.phx.inficad.com>
Received: from azfms.com (ihost2) by fmsserv99.azfms.com (5.x/SMI-SVR4)
	id AA11755; Mon, 28 Jul 1997 07:08:38 -0700
Received: from descomp.phx.inficad.com by azfms.com (SMI-8.6/SMI-SVR4)
	id HAA23422; Mon, 28 Jul 1997 07:08:34 -0700
Received: (from root@localhost) by descomp.phx.inficad.com (8.7.5/8.7.3) id HAA00155 \
                for c1040@azfms.com; Mon, 28 Jul 1997 07:08:10 -0700
Date: Mon, 28 Jul 1997 07:08:10 -0700
From: root <root@descomp.phx.inficad.com>
Message-Id: <199707281408.HAA00155@descomp.phx.inficad.com>
To: c1040@azfms.com
Content-Type: text
Content-Length: 3095
X-Lines: 77
Status: RO

------------------------------------------------------------
---------------- Config-test for Majordomo ----------------
------------------------------------------------------------


--------------------- Obvious things: ---------------------
------------------ environment variables ------------------
   HOME=/home/majordomo/pkg
   LOGNAME=root
   MAJORDOMO_CF=/home/majordomo/pkg/majordomo.cf
   PATH=/bin:/usr/bin:/usr/ucb
   SHELL=/bin/sh
--------------------- euid/egid checks ---------------------
   effective user  = majordomo (uid 406)
   effective group =  floppy wheel disk adm sys daemon bin root (gid 45 11 10 6 4 3 2 \
                1 0 )
---------------------- uid/gid checks ----------------------
   real      user  = majordomo (uid 406)
   real      group =  floppy wheel disk adm sys daemon bin root (gid 45 11 10 6 4 3 2 \
                1 0 )
------------------------------------------------------------

	Non obvious things that cause headaches:

------------------------------------------------------------
Good: 'require'd /home/majordomo/pkg/majordomo.cf okay.
Good: found ctime.pl okay.
Good: found majordomo_version.pl okay.
Good: found majordomo.pl okay.
Good: found shlock.pl okay.
Good: found config_parse.pl okay.

You're running Majordomo Version 1.94.3.

--==> Majordomo home directory is /home/majordomo/pkg.
------------------- Include directories -------------------
	/home/majordomo/pkg
	/usr/lib/perl5/i586-linux/5.003
	/usr/lib/perl5
	/usr/lib/perl5/site_perl/i586-linux
	/usr/lib/perl5/site_perl
	.
--------------------------- Home ---------------------------
Good: changedir to /home/majordomo/pkg succeeded.
Good: Created a mock lock file.
---------------------- temp directory ----------------------
Good: Created a temp file in $TMPDIR (/tmp).
---------------------- list directory ----------------------
Good: list directory /home/majordomo/pkg/lists has good permissions.
--------------------------- log ---------------------------
Good: logfile /home/majordomo/pkg/Log exists and is writeable.
------------------------- Mailers -------------------------
You have defined a mailer for delivery.
Attempting to verify that this is a valid mailer...looks okay.
You have defined a mailer for delivering administrative messages.
Attempting to verify that this is a valid mailer...looks okay.
------------------ Checking majordomo.cf ------------------
Checking to see if there are new variables that should be in
your majordomo.cf file...
Unknown configuration variables in existing majordomo.cf:
	$config_default_subscribe_policy

Have you configured where Majordomo is?
	$whereami is descomp.phx.inficad.com
Good: yup!
----------------------- end of tests -----------------------


Nothing bad found!  Majordomo _should_ work correctly.

If it doesn't, check your configuration file
	(/home/majordomo/pkg/majordomo.cf)
closely, and if it still looks okay, consider asking the majordomo-users
mailing list at "majordomo-users@greatcircle.com" for assistance.  Be sure
and fully specify what your problems are, and what type of machine (and
operating system) you are using.

Enjoy!


> From root@descomp.phx.inficad.com Mon Jul 28 07:08 MST 1997
Return-Path: <root@descomp.phx.inficad.com>
Received: from azfms.com (ihost2) by fmsserv99.azfms.com (5.x/SMI-SVR4)
	id AA11760; Mon, 28 Jul 1997 07:08:55 -0700
Received: from descomp.phx.inficad.com by azfms.com (SMI-8.6/SMI-SVR4)
	id HAA23425; Mon, 28 Jul 1997 07:08:49 -0700
Received: (from root@localhost) by descomp.phx.inficad.com (8.7.5/8.7.3) id HAA00159 \
                for c1040@azfms.com; Mon, 28 Jul 1997 07:08:26 -0700
Date: Mon, 28 Jul 1997 07:08:26 -0700
From: root <root@descomp.phx.inficad.com>
Message-Id: <199707281408.HAA00159@descomp.phx.inficad.com>
To: c1040@azfms.com
Content-Type: text
Content-Length: 334
X-Lines: 10


majordomo: "|/home/majordomo/pkg/wrapper majordomo"
majordomo-owner: majordomo
owner-majordomo: majordomo

silly: "|/home/majordomo/pkg/wrapper resend -l silly silly-list"
silly-list:	:include:/home/majordomo/pkg/lists/silly
owner-test:	majordomo
test-owner:	majordomo
test-request:	"|/home/majordomo/pkg/wrapper majordomo -l silly"

> From root@descomp.phx.inficad.com Mon Jul 28 07:09 MST 1997
Return-Path: <root@descomp.phx.inficad.com>
Received: from azfms.com (ihost2) by fmsserv99.azfms.com (5.x/SMI-SVR4)
	id AA11764; Mon, 28 Jul 1997 07:09:12 -0700
Received: from descomp.phx.inficad.com by azfms.com (SMI-8.6/SMI-SVR4)
	id HAA23428; Mon, 28 Jul 1997 07:09:00 -0700
Received: (from root@localhost) by descomp.phx.inficad.com (8.7.5/8.7.3) id HAA00162 \
                for c1040@azfms.com; Mon, 28 Jul 1997 07:08:31 -0700
Date: Mon, 28 Jul 1997 07:08:31 -0700
From: root <root@descomp.phx.inficad.com>
Message-Id: <199707281408.HAA00162@descomp.phx.inficad.com>
To: c1040@azfms.com
Content-Type: text
Content-Length: 10628
X-Lines: 320

#
# A sample configuration file for majordomo.  You must read through this and
# edit it accordingly!
#


# $whereami -- What machine am I running on?
#
#$whereami = "example.com";
$whereami = "descomp.phx.inficad.com";

# $whoami -- Who do users send requests to me as?
#
#$whoami = "Majordomo\@$whereami";
$whoami = "majordomo\@$whereami";

# $whoami_owner -- Who is the owner of the above, in case of problems?
#
#$whoami_owner = "Majordomo-Owner\@$whereami";
$whoami_owner = "majordomo\@descomp.phx.inficad.com";

# $homedir -- Where can I find my extra .pl files, like majordomo.pl?
# the environment variable HOME is set by the wrapper
#
if ( defined $ENV{"HOME"}) {
     $homedir = $ENV{"HOME"};
} else {
     $homedir = "/usr/test/majordomo";
}

# $listdir -- Where are the mailing lists?
#
$listdir = "$homedir/lists";

# $digest_work_dir -- the parent directory for digest's queue area
# Each list must have a subdirectory under this directory in order for
# digest to work. E.G. The bblisa list would use:
# 	/usr/local/mail/digest/bblisa
# as its directory.
#
$digest_work_dir = "/usr/local/mail/digest";

# $log -- Where do I write my log?
#
$log = "$homedir/Log";

# $sendmail_command -- Pathname to the sendmail program
#                      usually /usr/lib/sendmail, but some newer BSD systems
#                      seem to prefer /usr/sbin/sendmail
#
#$sendmail_command = "/usr/lib/sendmail";
# $sendmail_command = "/usr/sbin/sendmail";
$sendmail_command = "/usr/bin/sendmail";

# $mailer -- What program and args do I use to send mail to the list?
# $bounce_mailer -- What is used to send mail anywhere else?
# The variables $to, $from, $subject, and $sender can be interpolated into
# this command line.  Note, however, that the $to, $from, and $subject
# variables may be provided by the person sending mail, and much mischief
# can be had by playing with this variable.  It is perfectly safe to use
# $sender, but the others are insecure.
#
# Sendmail option -oi:  Do not take a . on a line by itself as the message
#			terminator.
# Sendmail option -oee: Force sendmail to exit with a zero exit status if
#			if it's not going to give useful information.
#
$mailer = "$sendmail_command -oi -oee -f\$sender";
$bounce_mailer = "$sendmail_command -oi -oee -f\$sender -t";

# You can special case the mailer used to deliver outbound mail as follows:
#
# To use TLB and use no outgoing alias:
# if ($main'program_name eq 'mj_resend' && $opt_l eq 'test-list') {
#   $mailer = "/usr/local/majordomo/tlb /usr/local/lists/${opt_l}.tlb";
# }
#
# To use a different Sendmail queue for this list's mail:
# if ($main'program_name eq 'mj_resend' && $opt_l eq 'test-list') {
#   $mailer = "$sendmail_command -oQ /var/spool/listq -f\$sender";
# }

# You can force Majordomo to delay any processing if the system load is too
# high by uncommenting the following lines.  THIS ONLY WORKS if your "uptime"
# command (usually found in /usr/bin/uptime or /usr/bsd/uptime)
# returns a string like:
#   5:23pm  up  5:51,  9 users,  load average: 0.19, 0.25, 0.33
#
#$max_loadavg = 10;                 # Choose the maximum allowed load
#
#$uptime = `/usr/bin/uptime` if -x '/usr/bin/uptime';     # Get system uptime
#$uptime = `/usr/bsd/uptime` if -x '/usr/bsd/uptime';     # or uptime is over here.
#
#($avg_1_minute, $avg_5_minutes, $avg_15_minutes) #    $uptime =~ \
/average:\s+(\S+),\s+(\S+),\s+(\S+)/; #
#exit 75 if ($avg_15_minutes >= $max_loadavg);           # E_TEMPFAIL
#

# Set the default subscribe policy for new lists here.
# If not defined, defaults to "open", but in today's increasingly
# imbecile Internet, "open+confirm" or "auto+confirm" is a wiser
# choice for publicly available Majordomo servers.
#
$config_default_subscribe_policy = "open+confirm";

#
#  Configure X400 parsing here.  This is functional, but not well tested
#  and rather a hack.
#  By default all addresses that look x400-ish will be checked for a
#  @ sign (meaning that it's headed to an smtp->x400 gateway, as well
#  as the 'c=' and 'a[dm]=' parts, which mean something as well.
#
#  If you will be receiving x400 style return addresses that do not have
#  an @ sign in them indicating an smtp->x400 gateway, set $no_x400at to 1.
#  Otherwise, leave $no_x400 at 0.
#
$no_x400at = 0;
#
#  If you will be receiving x400 addresses without the c= or a[dm]= parts
#  set the $no_true_x400 variable to 1.  This will disable checking for
#   "c=" and "a[dm]=" pieces.
#
$no_true_x400 = 0;


#--------------------------------------------------------------------
#    Stuff below here isn't commonly changed....
#--------------------------------------------------------------------
#
# Majordomo will look for "get" and "index" files related to $list in
# directory "$filedir/$list$filedir_suffix", so set $filedir and
# $filedir_suffix appropriately.  For instance, to look in
# /usr/local/mail/files/$list, use:
#   $filedir = "/usr/local/mail/files";
#   $filedir_suffix = "";		# empty string
# or to look in $listdir/$list.archive, use:
#   $filedir = "$listdir";
#   $filedir_suffix = ".archive";

$filedir = "$listdir";
$filedir_suffix = ".archive";

# What command should I use to process an "index" request?
#
$index_command = "/bin/ls -lRL";

# If you want to use FTPMAIL, rather than local access, for file transfer
# and access, define the following:
#   $ftpmail_address = "ftpmail\@decwrl.dec.com";
#   $ftpmail_location = "FTP.$whereami";

# if you want the subject of the request to be included as part of the
# subject of the reply (useful when automatically testing, or submitting
# multiple command sets), set $return_subject to 1.
#
$return_subject = 1;

# If you are using majordomo at the -request address, set the
# following variable to 1. This affects the welcome message that is
# sent to a new subscriber as well as the help text that is generated.
#
$majordomo_request = 0;

# If you have lists that have who turned off, but still allow which
# requests to work for subscribed members, and you don't want to have
# "which @" to act like a who, the variable $max_which_hits sets the
# number of hits that are allowed using which before an error is returned.
# Arguably this should be a per list settable number.
#
$max_which_hits = 0;

# Set the umask for the process. Used to set default file status for
# config file.
#
umask(007);
$config_umask = 007;

# don't change this. It checks to make sure that you have a new enough
# version of perl to run majordomo. It is in here because this file is
# used by almost all of the majordomo programs.
#
die "Perl version $] too old\n" if ($] < 4.019);

# the safe locations for archive directories
# None of the parameters that use safedirs are actually used, so
# @safedirs is a placeholder for future functionality.
# Just ignore it for version 1.90 through 1.94.
#
@safedirs = ( );

# Directory where resend temporarily puts its rewritten output message.
# For the paranoid, this could be changed to a directory that only
# majordomo has r/w permission to.
# Uses the environment variable TMPDIR, since that's pretty common
#
$TMPDIR = $ENV{'TMPDIR'} || "/tmp";

# Tune how long set_lock tries to obtain a lock before giving up. Each
# attempt waits 1 to 10 seconds before trying again and waittime is
# the total minimum time spent trying. This defaults to 600 seconds (5
# minutes), which translates to no less then 60 nor more than 600 tries.
#
# $shlock'waittime = 1200;

# tune the cookie for subscribe_policy=confirm.  Normally this is
# set to $homedir.  *Don't* make this something like rand(400),
# the key isn't saved between sessions.
#
# $cookie_seed = "Harry Truman, Doris Day, Red China, Johnnie Ray" .
# " South Pacific, Walter Winchell, Joe DiMaggio";

# The maximum character length of the header lines for resend
#
$MAX_HEADER_LINE_LENGTH = 128;

# The maximum character length of the _entire_ header for resend
#
$MAX_TOTAL_HEADER_LENGTH = 1024;

# List of perl regular expressions that, if found in the headers of a message,
# will cause the message to be bounced to the list approver.
# Put each regular expression on a separate line before the "END" mark, with
# no trailing ";"
# For example:
#   $global_taboo_headers = <<'END';
#   /^from:.*trouble@hassle.net/i
#   /^subject:.*non-delivery notice/i
#   END
# NOTE! Using ' instead of " in the 'END' is VERY IMPORTANT!!!
#

# Administrative checks.  These used to be buried in the resend code
#
$admin_headers = <<'END';
/^subject:\s*subscribe\b/i
/^subject:\s*unsubscribe\b/i
/^subject:\s*uns\w*b/i
/^subject:\s*.*un-sub/i
/^subject:\s*help\b/i
/^subject:\s.*\bchange\b.*\baddress\b/i
/^subject:\s*request\b(.*\b)?addition\b/i
/^subject:\s*cancel\b/i
END

# Common things that people send to the wrong address.
# These are caught in the first 10 lines of the message body
# if 'administrivia' is turned on and the message isn't marked approved.
#
# The code that catches this should transparently redirect
# majordomo commands to majordomo.  That would give the additional
# advantage of not having to add to this silly construct for
# each new majordomo command.
#
$admin_body = <<'END';
/\bcancel\b/i
/\badd me\b/i
/\bdelete me\b/i
/\bremove\s+me\b/i
/\bchange\b.*\baddress\b/
/\bsubscribe\b/i
/^sub\b/i
/\bunsubscribe\b/i
/^unsub\b/i
/\buns\w*b/i
/^\s*help\s*$/i
/^\s*info\s*$/i
/^\s*info\s+\S+\s*$/i
/^\s*lists\s*$/i
/^\s*which\s*$/i
/^\s*which\s+\S+\s*$/i
/^\s*index\s*$/i
/^\s*index\s+\S+\s*$/i
/^\s*who\s*$/i
/^\s*who\s+\S+\s*$/i
/^\s*get\s+\S+\s*$/i
/^\s*get\s+\S+\s+\S+\s*$/i
/^\s*approve\b/i
/^\s*passwd\b/i
/^\s*newinfo\b/i
/^\s*config\b/i
/^\s*newconfig\b/i
/^\s*writeconfig\b/i
/^\s*mkdigest\b/i
END

# taboo headers to catch
#
$global_taboo_headers = <<'END';
/^subject: ndn: /i
/^subject:\s*RCPT:/i
/^subject:\s*Delivery Confirmation\b/i
/^subject:\s*NON-DELIVERY of:/i
/^subject:\s*Undeliverable Message\b/i
/^subject:\s*Receipt Confirmation\b/i
/^subject:\s*Failed mail\b/i
/^subject:\s*Returned mail\b/i
/^subject:\s*unable to deliver mail\b/i
/^subject:\s.*\baway from my mail\b/i
/^subject:\s*Autoreply/i
END

# Taboo body contents to catch and forward to the approval address
#
# For example:
#   $global_taboo_body = <<'END';
#   /taboo topic/i
#   /another taboo/i
#   END
# NOTE! Using ' instead of " in the next line is VERY IMPORTANT!!!
#
$global_taboo_body = <<'END';
END

# Majordomo will not send replies to addresses which match this.
# The match is done case-insensitively.
$majordomo_dont_reply = '(mailer-daemon|uucp|listserv|majordomo|listproc)\@';

1;
# $Header: /sources/cvsrepos/majordomo/sample.cf,v 1.33 1997/04/27 14:56:45 cwilson \
Exp $

> From root@descomp.phx.inficad.com Mon Jul 28 07:09 MST 1997
Return-Path: <root@descomp.phx.inficad.com>
Received: from azfms.com (ihost2) by fmsserv99.azfms.com (5.x/SMI-SVR4)
	id AA11782; Mon, 28 Jul 1997 07:09:29 -0700
Received: from descomp.phx.inficad.com by azfms.com (SMI-8.6/SMI-SVR4)
	id HAA23431; Mon, 28 Jul 1997 07:09:26 -0700
Received: (from root@localhost) by descomp.phx.inficad.com (8.7.5/8.7.3) id HAA00168 \
                for c1040@azfms.com; Mon, 28 Jul 1997 07:09:03 -0700
Date: Mon, 28 Jul 1997 07:09:03 -0700
From: root <root@descomp.phx.inficad.com>
Message-Id: <199707281409.HAA00168@descomp.phx.inficad.com>
To: c1040@azfms.com
Content-Type: text
Content-Length: 19
X-Lines: 1

rustyc@inficad.com

> From root@descomp.phx.inficad.com Mon Jul 28 07:09 MST 1997
Return-Path: <root@descomp.phx.inficad.com>
Received: from azfms.com (ihost2) by fmsserv99.azfms.com (5.x/SMI-SVR4)
	id AA11794; Mon, 28 Jul 1997 07:09:43 -0700
Received: from descomp.phx.inficad.com by azfms.com (SMI-8.6/SMI-SVR4)
	id HAA23434; Mon, 28 Jul 1997 07:09:30 -0700
Received: (from root@localhost) by descomp.phx.inficad.com (8.7.5/8.7.3) id HAA00171 \
                for c1040@azfms.com; Mon, 28 Jul 1997 07:09:07 -0700
Date: Mon, 28 Jul 1997 07:09:07 -0700
From: root <root@descomp.phx.inficad.com>
Message-Id: <199707281409.HAA00171@descomp.phx.inficad.com>
To: c1040@azfms.com
Content-Type: text
Content-Length: 15539
X-Lines: 369

# The configuration file for a majordomo mailing list.
# Comments start with the first # on a line, and continue to the end
# of the line. There is no way to escape the # character. The file
# ... cut by rusty so this is not so big to read for the majordomo-=users list...
admin_passwd        =   ffff
administrivia       =   yes
advertise           <<  END

END
approve_passwd      =   ffff
archive_dir         comments            <<  END

END
date_info           =   yes
date_intro          =   yes
debug               =   no
description         digest_archive      digest_issue        =   1
digest_maxdays      digest_maxlines     digest_name         =   silly
digest_rm_footer    digest_rm_fronter   digest_volume       =   1
digest_work_dir     get_access          =   list
index_access        =   open
info_access         =   open
intro_access        =   list
maxlength           =   40000
message_footer      <<  END

END
message_fronter     <<  END

END
message_headers     <<  END

END
moderate            =   no
moderator           mungedomain         =   no
noadvertise         <<  END

END
precedence          =   bulk
purge_received      =   no
reply_to            resend_host         restrict_post       sender              =   \
owner-silly strip               =   yes
subject_prefix      subscribe_policy    =   open
taboo_body          <<  END
END

taboo_headers       <<  END

END
unsubscribe_policy  =   open

which_access        =   open

who_access          =   open



> From root@descomp.phx.inficad.com Mon Jul 28 07:10 MST 1997
Return-Path: <root@descomp.phx.inficad.com>
Received: from azfms.com (ihost2) by fmsserv99.azfms.com (5.x/SMI-SVR4)
	id AA11802; Mon, 28 Jul 1997 07:10:09 -0700
Received: from descomp.phx.inficad.com by azfms.com (SMI-8.6/SMI-SVR4)
	id HAA23458; Mon, 28 Jul 1997 07:09:52 -0700
Received: (from root@localhost) by descomp.phx.inficad.com (8.7.5/8.7.3) id HAA00175 \
                for c1040@azfms.com; Mon, 28 Jul 1997 07:09:28 -0700
Date: Mon, 28 Jul 1997 07:09:28 -0700
From: root <root@descomp.phx.inficad.com>
Message-Id: <199707281409.HAA00175@descomp.phx.inficad.com>
To: c1040@azfms.com
Content-Type: text
Subject: Sendmail.cf
Content-Length: 21484
X-Lines: 780

#
# Copyright (c) 1983, 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.
#

######################################################################
######################################################################
#####
#####		SENDMAIL CONFIGURATION FILE
#####
##### built by root@darkstar on Sat May 11 18:32:32 CDT 1996
##### in /tmp/sendmail-8.7.5/cf/cf
##### using ../ as configuration include directory
#####
######################################################################
######################################################################

#####  @(#)cfhead.m4	8.3 (Berkeley) 9/15/95  #####
#####  @(#)cf.m4	8.24 (Berkeley) 8/16/95  #####

#####  linux for smtp-only setup  #####
#####  @(#)linux.m4	8.2 (Berkeley) 8/21/93  #####


#####  @(#)nodns.m4	8.1 (Berkeley) 8/6/93  #####

#####  @(#)nouucp.m4	8.1 (Berkeley) 6/7/93  #####

#####  @(#)always_add_domain.m4	8.1 (Berkeley) 6/7/93  #####


#####  @(#)proto.m4	8.100 (Berkeley) 12/3/95  #####


# level 6 config file format
V6/Berkeley

##################
#   local info   #
##################

Cwlocalhost

# my official domain name
# ... define this only if sendmail cannot automatically determine your domain
#Dj$w.Foo.COM


CP.

# "Smart" relay host (may be null)
DS

# place to which unknown users should be forwarded
#Kuser user -m -a<>
#DLname_of_luser_relay

# operators that cannot be in local usernames (i.e., network indicators)
CO @ %

# a class with just dot (for identifying canonical names)
C..

# Mailer table (overriding domains)
#Kmailertable dbm /etc/mailertable

# Domain table (adding domains)
#Kdomaintable dbm /etc/domaintable

# who I send unqualified names to (null means deliver locally)
DR

# who gets all local email traffic ($R has precedence for unqualified names)
DH

# class L: names that should be delivered locally, even if we have a relay
# class E: names that should be exposed as from this host, even if we masquerade
# class M: domains that should be converted to $M
#CL root
CE root

# dequoting map
Kdequote dequote

# who I masquerade as (null for no masquerading) (see also $=M)
DM

# my name for error messages
DnMAILER-DAEMON


# Configuration version number
DZ8.7.3


###############
#   Options   #
###############

# strip message body to 7 bits on input?
O SevenBitInputúlse

# 8-bit data handling
O EightBitMode=pass8


# wait for alias file rebuild (default units: minutes)
O AliasWait

# location of alias file
O AliasFile=/etc/aliases

# minimum number of free blocks on filesystem
O MinFreeBlocks0

# maximum message size
#O MaxMessageSize00000

# substitution for space (blank) characters
O BlankSub=.

# avoid connecting to "expensive" mailers on initial submission?
O HoldExpensiveúlse

# checkpoint queue runs after every N successful deliveries
#O CheckpointInterval

# default delivery mode
O DeliveryModeºckground

# automatically rebuild the alias database?
#O AutoRebuildAliases

# error message header/file
#O ErrorHeader=/etc/sendmail.oE

# error mode
#O ErrorMode=print

# save Unix-style "From_" lines at top of header?
#O SaveFromLine

# temporary file mode
O TempFileMode00

# match recipients against GECOS field?
#O MatchGECOS

# maximum hop count
#O MaxHopCount

# location of help file
O HelpFile=/usr/lib/sendmail.hf

# ignore dots as terminators in incoming messages?
#O IgnoreDots

# name resolver options
#O ResolverOptions=+AAONLY

# deliver MIME-encapsulated error messages?
O SendMimeErrors=True

# Forward file search path
O ForwardPath=$z/.forward.$w:$z/.forward

# open connection cache size
O ConnectionCacheSize=2

# open connection cache timeout
O ConnectionCacheTimeout=5m

# use Errors-To: header?
O UseErrorsToúlse

# log level
O LogLevel=9

# send to me too, even in an alias expansion?
#O MeToo

# verify RHS in newaliases?
O CheckAliasesúlse

# default messages to old style headers if no special punctuation?
O OldStyleHeaders=True

# SMTP daemon options
#O DaemonPortOptions=Port=esmtp

# privacy flags
O PrivacyOptions=authwarnings

# who (if anyone) should get extra copies of error messages
#O PostMasterCopy=Postmaster

# slope of queue-only function
#O QueueFactor`0000

# queue directory
O QueueDirectory=/var/spool/mqueue

# timeouts (many of these)
#O Timeout.initial=5m
#O Timeout.helo=5m
#O Timeout.mailm
#O Timeout.rcpt=1h
#O Timeout.datainit=5m
#O Timeout.datablock=1h
#O Timeout.datafinal=1h
#O Timeout.rset=5m
#O Timeout.quit=2m
#O Timeout.misc=2m
#O Timeout.command=1h
#O Timeout.ident0s
#O Timeout.fileopen`s
O Timeout.queuereturn]
#O Timeout.queuereturn.normal]
#O Timeout.queuereturn.urgent-
#O Timeout.queuereturn.non-urgent}
O Timeout.queuewarn=4h
#O Timeout.queuewarn.normal=4h
#O Timeout.queuewarn.urgent=1h
#O Timeout.queuewarn.non-urgenth

# should we not prune routes in route-addr syntax addresses?
#O DontPruneRoutes

# queue up everything before forking?
O SuperSafe=True

# status file
O StatusFile=/etc/sendmail.st

# time zone handling:
#  if undefined, use system default
#  if defined but null, use TZ envariable passed in
#  if defined and non-null, use that info
#O TimeZoneSpec
# default UID (can be username or userid:groupid)
O DefaultUser=1:1

# list of locations of user database file (null means no lookup)
#O UserDatabaseSpec=/etc/userdb

# fallback MX host
#O FallbackMXhostúll.back.host.net

# if we are the best MX host for a site, try it directly instead of config err
#O TryNullMXList

# load average at which we just queue messages
#O QueueLA=8

# load average at which we refuse connections
#O RefuseLA

# work recipient factor
#O RecipientFactor0000

# deliver each queued job in a separate process?
#O ForkEachJob

# work class factor
#O ClassFactor00

# work time factor
#O RetryFactor000

# shall we sort the queue by hostname first?
#O QueueSortOrder=priority

# minimum time in queue before retry
#O MinQueueAge0m

# default character set
#O DefaultCharSet=iso-8859-1

# service switch file (ignored on Solaris, Ultrix, OSF/1, others)
#O ServiceSwitchFile=/etc/service.switch

# hosts file (normally /etc/hosts)
#O HostsFile=/etc/hosts

# dialup line delay on connection failure
#O DialDelays

# action to take if there are no recipients in the message
#O NoRecipientAction­d-to-undisclosed

# chrooted environment for writing to files
#O SafeFileEnvironment=/arch

# are colons OK in addresses?
#O ColonOkInAddr

# how many jobs can you process in the queue?
#O MaxQueueRunSize000

# shall I avoid expanding CNAMEs (violates protocols)?
#O DontExpandCnames

# SMTP initial login message (old $e macro)
O SmtpGreetingMessage=$j Sendmail $v/$Z; $b

# UNIX initial From header format (old $l macro)
O UnixFromLine=From $g  $d

# delimiter (operator) characters (old $o macro)
O OperatorChars=.:%@!^/[]+

# shall I avoid calling initgroups(3) because of high NIS costs?
#O DontInitGroups
OA/home/majordomo/pkg/majordomo.aliases

###########################
#   Message precedences   #
###########################

Pfirst-class=0
Pspecial-delivery0
Plist=-30
Pbulk=-60
Pjunk=-100

#####################
#   Trusted users   #
#####################

# this is equivalent to setting class "t"
#Ft/etc/sendmail.ct
Troot
Tdaemon

#########################
#   Format of headers   #
#########################

H?P?Return-Path: $g
HReceived: $?sfrom $s $.$?_($?s$|from $.$_) $.by $j ($v/$Z)$?r with $r$. id $i$?u for \
$u$.; $b H?D?Resent-Date: $a
H?D?Date: $a
H?F?Resent-From: $?x$x <$g>$|$g$.
H?F?From: $?x$x <$g>$|$g$.
H?x?Full-Name: $x
HSubject:
# HPosted-Date: $a
# H?l?Received-Date: $b
H?M?Resent-Message-Id: <$t.$i@$j>
H?M?Message-Id: <$t.$i@$j>
#
######################################################################
######################################################################
#####
#####			REWRITING RULES
#####
######################################################################
######################################################################


###########################################
###  Rulset 3 -- Name Canonicalization  ###
###########################################
S3

# handle null input (translate to <@> special case)
R$@			$@ <@>

# strip group: syntax (not inside angle brackets!) and trailing semicolon
R$*			$: $1 <@>			mark addresses
R$* < $* > $* <@>	$: $1 < $2 > $3			unmark <addr>
R$* :: $* <@>		$: $1 :: $2			unmark node::addr
R:include: $* <@>	$: :include: $1			unmark :include:...
R$* : $* <@>		$: $2				strip colon if marked
R$* <@>			$: $1				unmark
R$* ;			$: $1				strip trailing semi

# null input now results from list:; syntax
R$@			$@ :; <@>

# strip angle brackets -- note RFC733 heuristic to get innermost item
R$*			$: < $1 >			housekeeping <>
R$+ < $* >		   < $2 >			strip excess on left
R< $* > $+		   < $1 >			strip excess on right
R<>			$@ < @ >			MAIL FROM:<> case
R< $+ >			$: $1				remove housekeeping <>

# make sure <@a,@b,@c:user@d> syntax is easy to parse -- undone later
R@ $+ , $+		@ $1 : $2			change all "," to ":"

# localize and dispose of route-based addresses
R@ $+ : $+		$@ $>96 < @$1 > : $2		handle <route-addr>

# find focus for list syntax
R $+ : $* ; @ $+	$@ $>96 $1 : $2 ; < @ $3 >	list syntax
R $+ : $* ;		$@ $1 : $2;			list syntax

# find focus for @ syntax addresses
R$+ @ $+		$: $1 < @ $2 >			focus on domain
R$+ < $+ @ $+ >		$1 $2 < @ $3 >			move gaze right
R$+ < @ $+ >		$@ $>96 $1 < @ $2 >		already canonical

# do some sanity checking
R$* < @ $* : $* > $*	$1 < @ $2 $3 > $4		nix colons in addrs

# if we have % signs, take the rightmost one
R$* % $*		$1 @ $2				First make them all @s.
R$* @ $* @ $*		$1 % $2 @ $3			Undo all but the last.
R$* @ $*		$@ $>96 $1 < @ $2 >		Insert < > and finish

# else we must be a local name
R$*			$@ $>96 $1


################################################
###  Ruleset 96 -- bottom half of ruleset 3  ###
################################################

S96

# handle special cases for local names
R$* < @ localhost > $*		$: $1 < @ $j . > $2		no domain at all
R$* < @ localhost . $m > $*	$: $1 < @ $j . > $2		local domain
R$* < @ [ $+ ] > $*		$: $1 < @@ [ $2 ] > $3		mark [a.b.c.d]
R$* < @@ $=w > $*		$: $1 < @ $j . > $3		self-literal
R$* < @@ $+ > $*		$@ $1 < @ $2 > $3		canon IP addr

# look up domains in the domain table
#R$* < @ $+ > $* 		$: $1 < @ $(domaintable $2 $) > $3


# pass to name server to make hostname canonical
R$* < @ $* $~P > $*		$: $1 < @ $[ $2 $3 $] > $4

# local host aliases and pseudo-domains are always canonical
R$* < @ $=w > $*		$: $1 < @ $2 . > $3
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  ###
##################################################
S4

R$* <@>			$@				handle <> and list:;

# strip trailing dot off possibly canonical name
R$* < @ $+ . > $*	$1 < @ $2 > $3

# eliminate internal code -- should never get this far!
R$* < @ *LOCAL* > $*	$1 < @ $j > $2

# externalize local domain info
R$* < $+ > $*		$1 $2 $3			defocus
R@ $+ : @ $+ : $+	@ $1 , @ $2 : $3		<route-addr> canonical
R@ $*			$@ @ $1				... and exit


# delete duplicate local names
R$+ % $=w @ $=w		$1 @ $j				u%host@host => u@host



##############################################################
###   Ruleset 97 -- recanonicalize and call ruleset zero   ###
###		   (used for recursive calls)		   ###
##############################################################

S97
R$*			$: $>3 $1
R$*			$@ $>0 $1


######################################
###   Ruleset 0 -- Parse Address   ###
######################################

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$* < @ . > $*		$#error $@ 5.1.2 $: "invalid host name"

# handle numeric address spec
R$* < @ [ $+ ] > $*	$: $>98 $1 < @ [ $2 ] > $3	numeric internet spec
R$* < @ [ $+ ] > $*	$#smtp $@ [$2] $: $1 < @ [$2] > $3	still numeric: send

# now delete the local info -- note $=O to find characters that cause forwarding
R$* < @ > $*		$@ $>97 $1		user@ => user
R< @ $=w . > : $*	$@ $>97 $2		@here:... -> ...
R$- < @ $=w . >		$: $(dequote $1 $) < @ $2 . >	dequote "foo"@here
R$* $=O $* < @ $=w . >	$@ $>97 $1 $2 $3		...@here -> ...

# handle local hacks
R$*			$: $>98 $1

# short circuit local delivery so forwarded email works
R$=L < @ $=w . >	$#local $: @ $1		special local names
R$+ < @ $=w . >		$#local $: $1			regular local name

# not local -- try mailer table lookup
#R$* <@ $+ > $*		$: < $2 > $1 < @ $2 > $3	extract host name
#R< $+ . > $*		$: < $1 > $2			strip trailing dot
#R< $+ > $*		$: < $(mailertable $1 $) > $2	lookup
#R< error : $- $+ > $*	$#error $@ $1 $: $2		check -- error?
#R< $- : $+ > $* 	$# $1 $@ $2 $: $3		check -- resolved?
#R< $+ > $*		$: $>90 <$1> $2			try domain


# resolve fake top level domains by forwarding to other hosts



# pass names that still have a host to a smarthost (if defined)
R$* < @ $* > $*		$: $>95 < $S > $1 < @ $2 > $3	glue on smarthost name

# deal with other remote names
R$* < @$* > $*		$#smtp $@ $2 $: $1 < @ $2 > $3		user@host.domain

# if this is quoted, strip the quotes and try again
R$+			$: $(dequote $1 $)		strip quotes
R$+ $=O $+		$@ $>97 $1 $2 $3			try again

# handle locally delivered names
R$=L			$#local $: @ $1			special local names
R$+			$#local $: $1			regular local names

###########################################################################
###   Ruleset 5 -- special rewriting after aliases have been expanded   ###
###########################################################################

S5

# deal with plussed users so aliases work nicely
R$+ + *			$#local $@ $&h $: $1
R$+ + $*		$#local $@ $2 $: $1 + *

# prepend an empty "forward host" on the front
R$+			$: <> $1

# send unrecognized local users to a relay host
#R< > $+ + $*		$: < $L . > $( user $1 $) + $2
#R< > $+ 		$: < $L . > $( user $1 $)	look up user
#R< $* > $+ <> $*	$: < > $2 $3			found; strip $L
#R< $* . > $+		$: < $1 > $2			strip extra dot

# handle plussed local names
R< > $+ + $*		$#local $@ $2 $: $1

# see if we have a relay or a hub
R< > $+			$: < $H > $1			try hub
R< > $+			$: < $R > $1			try relay
R< > $+			$@ $1				nope, give up
R< $- : $+ > $+		$: $>95 < $1 : $2 > $3 < @ $2 >
R< $+ > $+		$@ $>95 < $1 > $2 < @ $1 >

###################################################################
###  Ruleset 90 -- try domain part of mailertable entry 	###
###################################################################

#S90
#R$* <$- . $+ > $*	$: $1$2 < $(mailertable .$3 $@ $1$2 $@ $2 $) > $4
#R$* <$- : $+ > $*	$# $2 $@ $3 $: $4		check -- resolved?
#R$* < . $+ > $* 	$@ $>90 $1 . <$2> $3		no -- strip & try again
#R$* < $* > $*		$: < $(mailertable . $@ $1$2 $) > $3	try "."
#R<$- : $+ > $*		$# $1 $@ $2 $: $3		"." found?
#R< $* > $*		$@ $2				no mailertable match

###################################################################
###  Ruleset 95 -- canonify mailer: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

###################################################################
###  Ruleset 93 -- convert header names to masqueraded form	###
###################################################################

S93
R$=E < @ *LOCAL* >	$@ $1 < @ $j . >		leave exposed
R$=E < @ $=M . >	$@ $1 < @ $2 . >
R$=E < @ $=w . >	$@ $1 < @ $2 . >
R$* < @ $=M . > $*	$: $1 < @ $2 . @ $M > $3	convert masqueraded doms
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

###################################################################
###  Ruleset 94 -- convert envelope names to masqueraded form	###
###################################################################

S94
#R$+			$@ $>93 $1
R$* < @ *LOCAL* > $*	$: $1 < @ $j . > $2

###################################################################
###  Ruleset 98 -- local part of ruleset zero (can be null)	###
###################################################################

S98
#
######################################################################
######################################################################
#####
#####			MAILER DEFINITIONS
#####
######################################################################
######################################################################


##################################################
###   Local and Program Mailer specification   ###
##################################################

#####  @(#)local.m4	8.21 (Berkeley) 11/6/95  #####

Mlocal,		P=/usr/bin/procmail, F=lsDFMAw5:/|@ShP, S/30, R /40,
		T=DNS/RFC822/X-Unix,
		A=procmail -a $h -d $u
Mprog,		P=/bin/sh, F=lsDFMoeu, S/30, R /40, D=$z:/,
		T=X-Unix,
		A=sh -c $u

#
#  Envelope sender rewriting
#
S10
R<@>			$n			errors to mailer-daemon
R$+			$: $>50 $1		add local domain if needed
R$*			$: $>94 $1		do masquerading

#
#  Envelope recipient rewriting
#
S20
R$+ < @ $* >		$: $1			strip host part

#
#  Header sender rewriting
#
S30
R<@>			$n			errors to mailer-daemon
R$+			$: $>50 $1		add local domain if needed
R$*			$: $>93 $1		do masquerading

#
#  Header recipient rewriting
#
S40
R$+			$: $>50 $1		add local domain if needed
#R$*			$: $>93 $1		do all-masquerading

#
#  Common code to add local domain name (only if always-add-domain)
#
S50
R$* < @ $* > $* 	$@ $1 < @ $2 > $3		already fully qualified
R$+			$@ $1 < @ *LOCAL* >		add local qualification

#####################################
###   SMTP Mailer specification   ###
#####################################

#####  @(#)smtp.m4	8.32 (Berkeley) 11/20/95  #####

Msmtp,		P=[IPC], F=mDFMuX, S/31, R!, E=\r\n, L™0,
		T=DNS/RFC822/SMTP,
		A=IPC $h
Mesmtp,		P=[IPC], F=mDFMuXa, S/31, R!, E=\r\n, L™0,
		T=DNS/RFC822/SMTP,
		A=IPC $h
Msmtp8,		P=[IPC], F=mDFMuX8, S/31, R!, E=\r\n, L™0,
		T=DNS/RFC822/SMTP,
		A=IPC $h
Mrelay,		P=[IPC], F=mDFMuXa8, S/31, Ra, E=\r\n, L 40,
		T=DNS/RFC822/SMTP,
		A=IPC $h

#
#  envelope sender rewriting
#
S11
R$+			$: $>51 $1			sender/recipient common
R$* :; <@>		$@				list:; special case
R$*			$: $>61 $1			qualify unqual'ed names
R$+			$: $>94 $1			do masquerading


#
#  envelope recipient rewriting --
#  also header recipient if not masquerading recipients
#
S21
R$+			$: $>51 $1			sender/recipient common
R$+			$: $>61 $1			qualify unqual'ed names


#
#  header sender and masquerading header recipient rewriting
#
S31
R$+			$: $>51 $1			sender/recipient common
R:; <@>			$@				list:; special case

# do special header rewriting
R$* <@> $*		$@ $1 <@> $2			pass null host through
R< @ $* > $*		$@ < @ $1 > $2			pass route-addr through
R$*			$: $>61 $1			qualify unqual'ed names
R$+			$: $>93 $1			do masquerading


#
#  convert pseudo-domain addresses to real domain addresses
#
S51

# pass <route-addr>s through
R< @ $+ > $*		$@ < @ $1 > $2			resolve <route-addr>

# output fake domains as user%fake@relay


#
#  common sender and masquerading recipient rewriting
#
S61

R$* < @ $* > $*		$@ $1 < @ $2 > $3		already fully qualified
R$+			$@ $1 < @ *LOCAL* >		add local qualification


#
#  relay mailer header masquerading recipient rewriting
#
S71

R$+			$: $>61 $1
R$+			$: $>93 $1


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic