On Thu, Sep 25, 2003 at 11:46:10AM +0200, Jan Ulrich Hasecke wrote: > <[EMAIL PROTECTED]> writes: > > > preconnect "mailfilter --mailfilterrc=/home/kevin/.mailfilterrc" > > did the trick. > > Mine keeps saying: > > Sep 25 11:44:34 molly fetchmail[2072]: Vor-Verbindungs-Befehl > scheiterte mit Status 65280 > > preconnect-command failed with status 65280 > > juh > I think the problem with the above approach is that the user mailfilter runs as must have read permission for the filter file. It must also be able to write to the log file.
There are various ways around this, and who the preconnect runs as depends on your configuration. In mine, which I think is the debian default, it runs as fetchmail. It can also run as root, or, as someone else mentioned, any user as a cron job. (Preconnect appears to run as the same user fetchmail is running as). I finally got things working by moving .mailfilterrc to /var/run/fetchmail, and logging to that same directory (after changing ownership of files to fetchmail:nogroup). I use just preconnect "mailfilter" under those conditions. This is not entirely optimal; in particular I'd like the log to get a more conventional treatment in terms of location, ownership, and automatic cleanup (haven't looked into the latter, though I know it's configurable somewhere). But at least it works. My method of launching fetchmail is via the ppp/ip-up scripts, so I want to trigger it automatically before every fetchmail poll. The preconnect works well for that. Two other problems: I already deleted my first non-virus email using my simple size filter. And swen is arriving at such a prodigious rate that some arrive between the start of the mailfilter run and the start of the fetchmail retrieval, so they get retrieved anyway. This is a known limitation of mailfilter, mentioned in its FAQ. -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]