procmail
[Top] [All Lists]

Re: How to?

1997-05-15 17:42:00
Erdem Ozsaruhan <eozsaruh(_at_)nsf(_dot_)gov> writes:
If a condition is met I'm sending the message to a certain address,
but I want the message to be the same as the original. But the
Return-Path gets changed to <daemon(_at_)localhost> since sendmail runs as
the user "daemon". Filtering the message with:

(FROM=`formail -rt -xTo:`)

 | formail  -I "Return-Path: $FROM" | /usr/lib/sendmail $address

doesn't help. Is there any other way?

(Currently it gets:    Return-Path: <daemon(_at_)localhost>)
(I want it to be:      Return-Path: <orginal-sender(_at_)original-hostname>)

The Return-Path: header is created at the site of final delivery, and
contains the envelope sender address.  If you're forwarding messages,
the envelope address should be set to an address that can handle the
bounce messages that will come back when someone moves and an address
goes bad.  Setting the outgoing envelope sender address to be the same
as the incoming one is, IMNSHO, rude, and should be discouraged and
derided at every possible opportunity.  I'm seen only one excuse for
doing it, and that's to work around cc:mail's too-broken-for-words
behavior.  If you want to do it, despite this rant, search the archives
for my previous explanation, and read the comments there carefully.
Right now, I don't feel like making broken behavior easy to setup.


And my last question:

If I have a mailing list:

      test: :include: /home/mlist/test

And if I replace it with: 

      test: | " /usr/local/bin/procmail -m rcfile /home/mlist/test"

I can send mail to everybody in the /home/mlist/test file from within
the rcfile:

       |/usr/lib/sendmail `cat /home/mlist/test`

Is there a more efficient way? If I had 1000 users would that still
work?

You'll run into the value of LINEBUF from the expansion in procmail at
some point, but eventually you will hit the kernel imposed limit on the
size of argv.  The Right Thing to do, right now, is switch over to a
fullblown listprocessor like Smartlist or Majordomo, and get it over
with.  If it ever gets to 1000 users then you'll need one of them, and
changing then will be 1000^2 - (cur #)^2 times as hard.


Philip Guenther

<Prev in Thread] Current Thread [Next in Thread>