Re: [Nolug] A sendmail question

From: Mark A. Hershberger <mah_at_everybody.org>
Date: Sat, 12 Jul 2003 21:19:55 -0500
Message-ID: <878yr3goc4.fsf@everybody.org>

"Andrew S. Johnson" <andy@asjohnson.com> writes:

> On Saturday 12 July 2003 02:10 pm, Mark A. Hershberger wrote:
>> -ray <ray@ops.selu.edu> writes:
>>
>> > In /etc/mail/access, put this line
>> >
>> > goner@b.com DISCARD
>>
>> Correct me if I'm wrong, but doesn't that only work with envelope FROM
>> addresses by default?
>>
>> Mark.
>
> Apparently, because it isn't filtering out the mail I want gone.

If you can use mailertable, then set the domain up in mailertable
like this:

    # echo 'b.com local:forwarder >> /etc/mail/mailertable
    # makemap <whatever> /etc/mail/mailertable < /etc/mail/mailertable

In your aliases, do something like:

    forwarder: "|procmail /etc/mail/b-forwarder"

And in /etc/mail/b-forwarder, try something like

    SENDER = "<$1>" # fix for empty sender addresses
    SHIFT = 1 # remove it from $@

    :0:
    * ^TOgoner@b.com
    /dev/null

    :0 w # pass along all other mail
    ! -oi -f "$SENDER" "$@"

I got that last bit from the EXAMPLES section of procmail(1), so
check there, too, because it wants you to make sure your sendmail.cf
contains some things.

Also, this is untested, so be careful.

Mark.
___________________
Nolug mailing list
nolug@nolug.org
Received on 07/12/03

This archive was generated by hypermail 2.2.0 : 12/19/08 EST