[comp.mail.sendmail] frozen $s in 5.65 + ida-1.4.2

wolfgang@wsrcc.com (Wolfgang S. Rupprecht) (02/25/91)

version: sendmail-5.65-ida-1.4.2  on a 
	 sun sparc SLC, SunOS 4.1, Sun cc -O

I am having problems with using $s in ruleset S0.  It is failing only
*only* if sendmail is run from a frozen config file.  It appears that
the $s macro is still frozen when S0 is run.  If I freeze in a value
with 'sendmail -bz -oMsFuNkYsTuFf' then I will still see that frozen
value at S0 time.  Is this a problem with a known solution?

-wolfgang


-- 
Wolfgang Rupprecht    wolfgang@wsrcc.com (or) uunet!wsrcc!wolfgang
Snail Mail Address:   Box 6524, Alexandria, VA 22306-0524

calhoun@usaos.uucp (Warren D. Calhoun) (02/25/91)

In <1991Feb25.090701.25065@wsrcc.com> wolfgang@wsrcc.com (Wolfgang S. Rupprecht) writes:

>version: sendmail-5.65-ida-1.4.2  on a 
>	 sun sparc SLC, SunOS 4.1, Sun cc -O

>I am having problems with using $s in ruleset S0.  It is failing only
>*only* if sendmail is run from a frozen config file.  It appears that
>the $s macro is still frozen when S0 is run.  If I freeze in a value
>with 'sendmail -bz -oMsFuNkYsTuFf' then I will still see that frozen
>value at S0 time.  Is this a problem with a known solution?

Yes...  Use smail 3.1.18... ;-)

-- 
| SSG W.D. Calhoun                  |       UUCP: ...!uunet!usaos!calhoun    |
| Gas Turbine Engine (52F) Branch   |   INTERNET: calhoun%usaos@uunet.uu.net |
| The U.S. Army Ordnance School     | CompUServe: 76336.2212@compuserve.com  |
| Fort Belvoir, Virginia  22060     |      Voice: (703) 664-3396/3595        | 

rickert@mp.cs.niu.edu (Neil Rickert) (02/25/91)

In article <1991Feb25.090701.25065@wsrcc.com> wolfgang@wsrcc.com (Wolfgang S. Rupprecht) writes:
>
>I am having problems with using $s in ruleset S0.  It is failing only
>*only* if sendmail is run from a frozen config file.  It appears that
>the $s macro is still frozen when S0 is run.  If I freeze in a value
>with 'sendmail -bz -oMsFuNkYsTuFf' then I will still see that frozen
>value at S0 time.  Is this a problem with a known solution?

 "That's not a bug, that's a feature."

 It is part of the definition of freezing a configuration that all macro
values are frozen.

 Why on earth would you be putting '-oMsFuNkYsTuFf' on the command line
for freezing?  It is supposed to be that $s is defined dynamically as
the invoking host name.  If you receive mail from an SMTP client you should
find that $s is redefined.  If you have an 'rmail' which includes the
'-oMshost' flag this will also happen to mail received via UUCP.  Mail from
any other source is unlikely to redefine $s, so the value that you defined
stays.

 This treatment - freezing macro values - is no different for $s than for
any other macro.  If it didn't work that way your configuration file would
not be able to define $j which is used in the SMTP protocol to identify the
host name.

-- 
=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=
  Neil W. Rickert, Computer Science               <rickert@cs.niu.edu>
  Northern Illinois Univ.
  DeKalb, IL 60115                                   +1-815-753-6940

wolfgang@wsrcc.com (Wolfgang S. Rupprecht) (02/26/91)

>In article <1991Feb25.090701.25065@wsrcc.com> wolfgang@wsrcc.com (Wolfgang S. Rupprecht) writes:
>>I am having problems with using $s in ruleset S0.  It is failing only
>>*only* if sendmail is run from a frozen config file.  It appears that
>>the $s macro is still frozen when S0 is run.  If I freeze in a value
>>with 'sendmail -bz -oMsFuNkYsTuFf' then I will still see that frozen
>>value at S0 time.  Is this a problem with a known solution?

rickert@mp.cs.niu.edu (Neil Rickert) writes:
> "That's not a bug, that's a feature."
> It is part of the definition of freezing a configuration that all macro
>values are frozen.

*sigh* I guess my posting wasn't clear enough.  The frozen value of $s
is not being "thawed'.  The value of the command line argument
-oMsXXXXXX is not making it into sendmail's runtime $s variable.

For example the following invocation would return "FuNkYsTuFf" instead
of the correct string 'uucphost' for $s during rule #0.  This is most
certainly NOT a useful feature!

/usr/lib/sendmail -ee -i -oMrUUCP -oMsuucphost -fFromhost!fromuser 'touser@tohost.com'

> Why on earth would you be putting '-oMsFuNkYsTuFf' on the command line
>for freezing? 

To illustrate the problem.

-wolfgang
-- 
Wolfgang Rupprecht    wolfgang@wsrcc.com (or) uunet!wsrcc!wolfgang
Snail Mail Address:   Box 6524, Alexandria, VA 22306-0524

rickert@mp.cs.niu.edu (Neil Rickert) (02/27/91)

In article <1991Feb26.153340.2167@wsrcc.com> wolfgang@wsrcc.com (Wolfgang S. Rupprecht) writes:
>>>I am having problems with using $s in ruleset S0.  It is failing only
>>>*only* if sendmail is run from a frozen config file.  It appears that

>rickert@mp.cs.niu.edu (Neil Rickert) writes:
>> "That's not a bug, that's a feature."
>
>*sigh* I guess my posting wasn't clear enough.  The frozen value of $s

 The problem appears to be a confusion about the '$x' macros in sendmail.cf.
The macros that appear in the rulesets are always expanded when the rulesets
are initially read from 'sendmail.cf'.  They should be treated more as
preprocessor constants than as variables.  The macros in header and mailer
definitions, however, are expanded when as needed, so the values there
can change.

 In spite of the suggestion in the subject line, this SHOULD NOT cause problems
with the distributed IDA-1.4.x rulesets, for they make use of the IDA
extension $&x (for example $&s is used in ruleset 8) which is evaluated at
runtime.

-- 
=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=
  Neil W. Rickert, Computer Science               <rickert@cs.niu.edu>
  Northern Illinois Univ.
  DeKalb, IL 60115                                   +1-815-753-6940