procmail
[Top] [All Lists]

Re: general mailfilter - help!!!

2001-02-02 03:23:30
Marek Florianczyk <franki(_at_)mentat(_dot_)oko(_dot_)com(_dot_)pl> writes:
My big problem:
I have FreeBSD 3.4 and postfix - snapshot20001121 and procmail v3.15
Everything works fine with Maildir in user HOME directory.
I want to filter mail for all users, so mail to any user with attachments 
like file.zip should be saved without copy in one of the users Maildir.
/etc/procmailrc
LOGFILE=/var/log/procmail
:0B
* .*name="Buddylst.zip"
/home/user1/file-zip

But when mail is for some other user eg. user2 something is wrong,
probably procmail can't access file in user1 directory
/var/log/procmail
procmail: Error while writing to "/home/user1/file-zip" 
From someUser(_at_)SomeDomain(_dot_)com Tue Jan 23 06:55:47 2001
 Folder: /home/user2/Maildir/new//_POF.jzRb6.host.com    1267

Bash-2.03$ ls -la /usr/bin/procmail 
-rwsr-xr-x  1 root  mail  58472 Dec 28 03:18 /usr/bin/procmail

In postfix main.cf
mailbox command /usr/bin/procmail

HOWTO make it work? Mail to any user written in one file, one directory.


Use the HOME variable in the mailbox path.

BTW: the leading ".*" on the regexp does nothing except slow procmail
down.  Hmm, you should probably also be setting DROPPRIVS before that
recipe so that the delivered message is owned by the user instead of root.
Finally, if you want procmail to treat "file-zip" as a maildir-style
mailbox (ala qmail) then you should append a "/" to the mailbox name
in the action line (read the last paragraph of the "Recipe action line"
section of the procmailrc(5) manpage for details).

        LOGFILE = /var/log/procmail
        DROPPRIVS = yes
        :0 B
        * name="Buddylst.zip"
        $HOME/file-zip/


Philip Guenther
_______________________________________________
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>
  • Re: general mailfilter - help!!!, Philip Guenther <=