procmail
[Top] [All Lists]

Re: diskquota auto-responder?

2001-05-13 21:52:19
Dave Robbins wrote:
"Mr. Wade" <wadem(_at_)suwanneevalley(_dot_)net> wrote:
It's certainly a security risk, though, since I it will 
respond with the "quota -v" output to anyone who requests it

If jack(_at_)nowhere(_dot_)com emails me with a subject line of 'show 
diskquota'
and I have the diskquota autoresponder in place, I want it to email
only me -- thus no security risk.  Why would I want it to go
anywhere else? (rhetorical question)

I didn't realize that the users would be emailing themselves from
the same account.  That simplifies matters.  Maybe something like
the following would work for you:

SHELL=/bin/sh                # whatever shell you want it to use
SENDMAIL=/usr/sbin/sendmail  # where to look for the MTA
SELF="user(_at_)host"             # the user's email address
:0 iW
* $ !^x-loop: $SELF
* $ ^from:.*\<$SELF
* ^subject:.*\<show diskquota
| ( formail -r -X "" -A "X-Loop: $SELF"; \
    echo ""; echo "quota -v" | $SHELL ) \
  | $SENDMAIL -oi -f $SELF -- $SELF


I hope this helps.

-- 
Linux: The Choice of the GNU Generation


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