procmail
[Top] [All Lists]

Re: diskquota auto-responder?

2001-05-15 10:25:47
"Mr. Wade" <wadem(_at_)suwanneevalley(_dot_)net> writes:
...
This is a little better, but still not right.  :(  The recipe can
still be "tricked" into responding to a different address with:

       From: "nice_user(_at_)your-host(_dot_)org" 
<nosey-fool(_at_)somewhere-else(_dot_)com>
       To: nice_user(_at_)your-host(_dot_)org
       Subject: show diskquota

*sigh*  Maybe someone else has a better idea or a fix for this.
It's late where I am; I'm going to bed!  =)  I hope I have at
least helped get you going in the right direction.


Forget extracting anything from the header: procmail is running as
the target user, just rewrite the message to contain the quota info:

        :0
        * ^Subject:(.*\<)?show diskquota
        {
                # Make sure we're running as the user
                DROPPRIVS = yes

                # replace the body of the message with the quota info
                :0 bfiw
                | quota -v

                # Optional: give up on the /etc/procmailrc now.  Only
                # works with 3.14 and later, and maybe only 3.15.1, I
                # can't remember.  Uncomment if desired.
                #SWITCHRC = /dev/null
        }

Since you're not resending anything, there are no looping problems.


Philip Guenther
Procmail Maintainer
_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

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