There's no special significance to "$SENDER" with sendmail. If you
specify it in an alias, it will be treated as a shell variable and
probably equate to a null argument.
You're confusing sendmail with Majordomo. The example you're using
doesn't use any Majordomo commands. You're not using Majordomo
here, and Majordomo wasn't written to be able to do what you want.
What you want to do is not provided by any program supplied with
sendmail or Majordomo, though you could probably hack a one-page
perl script to do it. Auto-replying with a canned message is an
absolutely trivial thing -- you don't have to "switch" to another
package. Just use the right tools for what they were designed for.
If it means using multiple tools, fine.
The persons who said they used $SENDER in this example were either
lying or didn't understand the question.
In message <firstname.lastname@example.org>, Don Gray writes:
>I would sure appreciate some help with the following problem... I don't
>think it should be very hard since it seems that everyone on the 'Net is
>I am trying to set up the "info" alias on my Unix (SunOS) machine so it
>automatically returns the contents of a text file to the sender.
>When I send a message to "info", the Sendmail command that is listed in the
>/etc/aliases file is executed, which looks like this:
>># the following "sendmail" command returns the text file
>># "/home/mdomo/lists/info.info" to the original sender
>>info: "|/usr/lib/sendmail -f info-owner $SENDER < /home/mdomo/lists/info.info
> ^^^^^^^^ ^^^^^^^
>What happens at this point (according to the verbose output from sendmail)
>is that the sender's actual address does not replace $SENDER, so it
>produces this error:
>> ----- Transcript of session follows -----
>>501 info-owner... Recipient names must be specified
>I have been told by several people on the 'Net that they use this Sendmail
>command (just as I have it here) very successfully. I am using Sendmail V8
>(just like them).
>However, I haven't been able to find *any* references to $SENDER in the
>O'Reilly Sendmail documentation book. I am now thinking that perhaps
>$SENDER is some sort of add-on script or macro that may not be defined on
>my system. Is this possible? If so, can someone send it to me or tell me
>where I can get it? If this isn't the problem, does anyone have any
>Is there a more efficient way of achieving my goal while still using
>Majordomo? (someone said that Procmail does this, but I think Procmail is
>a Majordomo competitor and I'd rather not switch since I know and like
>Majordomo, and since I finally got it installed successfully...).
>Thanks in advance,
>International Sales Director Talarian Corporation
> 444 Castro Street, Suite 140
>e-mail (preferred): email@example.com Mountain View, CA 94041
>Tel: +1-415-965-9066 x138 (direct) U.S.A.