Koozali.org: home of the SME Server

Obsolete Releases => SME 7.x Contribs => Topic started by: brianr on March 13, 2008, 11:42:41 AM

Title: running procmail on the admin account
Post by: brianr on March 13, 2008, 11:42:41 AM
I would like to be able to run procmail on the admin email account.

I have installed the userpanel and mailsorting contribs from dungog (thanks Stephen), but it seems to only work for the "ordinary" users (in as much as .procmailrc is only created for them).

Anyone got any thoughts on how I can enable it for the admin email?

 
Title: Re: running procmail on the admin account
Post by: brianr on March 13, 2008, 12:50:06 PM
ok, sorted it out myself

cp /etc/e-smith/templates-user/.qmail/18filter /etc/e-smith/template-user-custom/18filter

commented out the specific check for the admin user

signal-event email-update

Results in .procmailrc being created and procmail running

then edited .procmailrc to do what I want.

Note: the .procmailrc will still get overwritten on email-update, but I save it as .procmailrc.txt in the user directory, and have a small script to copy it to the .procmailrc every hour.  A real kludge,but it works ok.  Means an occasional risk of not processing emails for up to an hour.
 
If anyone has a better way of safely incorporating hand written procmail rules, I'd like to hear it!!
Title: Re: running procmail on the admin account
Post by: stephen noble on March 13, 2008, 09:09:33 PM
there are two open bugs requesting exactly those things
Title: Re: running procmail on the admin account
Post by: mdo on March 14, 2008, 09:21:26 AM
Where we have a need to process mail rules for an admin account, we forward all emails from admin to an 'ordinary' user account and set up the required rules there. That has been working for our needs so far.
Michael
Title: Re: running procmail on the admin account
Post by: stephen noble on March 14, 2008, 10:27:52 AM
forwarding to a user is probably a better idea,
on my test server it worked but it tended to spray files around where you didn't want them
/home/e-smith I think