E-mail Procmail


#1

Is there a way that I can copy the procmail filters from one user and apply them to a another user? or even apply the same filter for all domain e-mail addresses?

Thanks.


#2

If it’s a real (FTP/Shell) user, then it’s just the .forward.postfix and .procmailrc files you need to copy over, plus any other mail tools you’re using for filtering.

It may be possible to share a single filter file via a symbolic link, or even a cronjob that copies a single source on a regular basis.

-Scott


#3

It is a user that I defined in the “mail” tab, so I don’t think that they have an FTP/Shell account.

I have tried to “find” their procmail file and I can not seem to locate it (I am an admin in the dreamhost control panel). So if the symbolic link thing would work, how would I go about doing that?

David


#4

You need to create an FTP/Shell user to be able to use Procmail.

-Scott


#5

OK, maybe I misunderstood.

I am using the “keyword filter” section of the menu to manage someone that has webmail access to e-mail on my domain.

Right now I am managin a single mail user in this manner (using about 16 filters). I will soon need to manage about 80 users in this way. Is there a simple way to copy/link to these filters?

If not, do I understand that I might be able to implement these capabilities if I give these users shell access?

Thanks for your help.

David


#6

No easy way to copy another user’s mail settings. And you can’t “convert” a mail-only user into a shell user. You’d have first delete that mail address (user) and then create a shell user with that email address.

Maybe someone super-creative can come up with a workaround, but nothing comes to mind.

-Scott


#7

Hmm, DH setup is OK for a few users but I don’t really think I’d like to handle filters for 80 users their way!

As has been intimated, you HAVE to set up a user as an FTP/SSH user in order to be able to see their filters. Also, if you have that number of filters set up, you could probably do it a lot more efficiently using a hand-written procmail script - there’s plenty of instruction on the web.

If you do go this way, remember NOT to set the additional security flag when setting up the users (Oh, BTW, you have to delete your existing email only users and then re-create them). That way, you default user (the one that manages the account) will be able to access the files of ALL of the users in your account (this itself could be a problem, of course, since it means that you will be able to read all of their email - you could lock yourself out of their email folders by doing a “chmod :adm” command on the maildir folder, this is what the extra security flag does to ALL folders). As suggested by someone else, you could then use links if you really wanted to so as to only have to maintain one filter file though personally I wouldn’t recommend that has it would be very easy to mess up everyones email.

I am not aware of any scripts you could use to set up your 80 users so that would be a real chore.

I really can’t think of much that would improve your lot - the only thing that might help would be to have a single catch-all account which uses procmail to move the different real email addresses into folders and then have a custom PHP, PERL or Python web front end.

Let us know how you get on.

Regards,


Julian Knight


#8

OK, I think I need to create a test account, figure out the procmailrc stuff and then worry about replicating it later.

Thanks for the help/advice.

David