More Powerful and/or Manual Editing of .procmailrc files in Usermin

The current interface provides a rather meager offering of Procmail’s possibilities and no option to manually edit a file. In addition, the File Manager apparently doesn’t allow dotfiles to be created (or at least .procmailrc files).

Consequently, the sequence to get a more complex .procmailrc file is something like this:

  • SSH as root or sudo
  • CD to the domain and user’s directory
  • touch .procmailrc
  • chown .procmailrc user:group
  • Paste the recipe in the file and save

This could all be done in a manual editing window in Usermin (or Virtualmin) if one existed; but as far as I can tell, it doesn’t.

I have an account with about 20 or 30 users that I want to migrate from cPanel to Virtualmin. Every user needs a filter to send mail from a certain domain to their SMS, and then to their email, changing the sender address to one on the server because VZW (the mobile phone carrier) hates the actual sending domain. It’s actually easy enough to do:

:0c
* !^FROM_MAILER
* ^From: *.*hateddomain.com*

:0fhw
| formail -i "From: someuser@loveddomain.com"

:0c
! 5551234567@vtext.net,theactualuser@loveddomaincom

But it’s tedious to do repeatedly with the present filter UI.

I’ll probably wind up scripting it because it’s something that has to be created repeatedly every time he hires someone; but a manual edit box would still be nice.

Thanks,

Richard

There is a Usermin Procmail module (Webmin->Webmin->Usermin Configuration->Available Modules, check the box by Procmail Mail Filter), though I’m not confident about how it behaves together with the Virtualmin rules.

But, I believe it’d get you where you want to be. It’s been a while since I looked at it (like years), but I think it’s pretty comprehensive, and I think it has a config file edit feature, too, so you can fall back to editing directly.

1 Like

Thank, Joe. That will do just fine.

Richard

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.