procmail
[Top] [All Lists]

Re: Make procmail write to /tmp on home machine?

1997-12-03 07:40:23
Wed 97-12-03 Fritz W Feuerbacher 
<fwf27775(_at_)pegasus(_dot_)cc(_dot_)ucf(_dot_)edu> list.procmail
| On Mon, 10 Nov 1997, Andrew Kelley wrote:
| 
| > Hello All,
| > 
| > to /tmp on the mail host which I cannot access. (spam.box doesn't appear
| > How can I force procmail to deliver to the /tmp directory of the shell
| > machine?

Did you ad for this? 

[From pm-tips.txt, see X-info]

    9.5 Storing UBE mboxes outside of quota

          I want to store spam outside disk space. Problem: if I tell
          procmail to deliver to, say, /tmp/spam.box, it does so just fine
          (according to the log). Unfortunately, it delivers to /tmp on the
          mail host which I cannot access. spam.box doesn't appear in the
          /tmp directory of the shell machine when procmail is invoked for
          incoming mail.

        [phil] Under the most likely configuration of sendmail in
        this situation, it is impossible to have procmail invoked by
        sendmail on the shell machine: sendmail is probably set to just
        forward all mail to the designated mail delivery machine.

        There are other options: you could temporarily store the mail in
        your account, then have a cronjob on the shell machine that
        reprocesses the message. That would probably be more efficient than
        having each message trigger an rsh to the shell machine. If you
        actually get enough spam that it's pushing against your quota, then
        the rsh is too expensive -- use a cronjob that invokes something
        like:

            cd your-maildir     &&
            lockfile spam.lock  &&
            test -s spam        &&
            {
                cat spam >> /tmp/spam.box && rm -f spam spam.lock || \
                rm -f spam.lock;
            }

        WARNING: the above assumes the following:

        o   everything in your-maildir/spam is spam and belongs in
            /tmp/spam.box
        o   no further filtering of the messages is necessary: they just need
            to be moved (it actually treats everything in the
            your-maildir/spam as a single message and uses procmail as a
            reliable copy command, thus the DEFAULT assignment as the use
            of /dev/null as a empty procmailrc)
        o   /tmp/spam.box is a not a directory

        If the latter two of those conditions isn't true OR IF THEY MIGHT
        CHANGE then you should use formail -s to break the message apart
        and invoke procmail on each one separately.

        [era] Many sites cross-mount directories for various reasons. /tmp
        is always local but /var/tmp might be cross-mounted between the
        login host and the mail host; another one to try is /scratch -- and
        if all else fails, ask your admin to set up an NFS share for this
        purpose.


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