• Introducing WebPros Cloud - a fully managed infrastructure platform purpose-built to simplify the deployment of WebPros products !  WebPros Cloud enables you to easily deliver WebPros solutions — without the complexity of managing the infrastructure.
    Join the pilot program today!
  • Support for BIND DNS has been removed from Plesk for Windows due to security and maintenance risks.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS.

custom lines in /var/qmail/users/assign

T

tyler

Guest
I'm trying to set up a particular e-mail address to deliver mail to a ruby script. I've found several threads that explain how this can be done by setting up a mailname with no delivery options, and then editing the .qmail file for that mailname, but there are two problems with they way they're implemented, from my point of view:

1. When the delivery script is executed, it has the permissions of "popuser". I need it to have the permissions of a virtual host. (We've moved completely away from all the mod_php safe_mode stuff, and are using fastcgi/suexec to run all scripts with real user permissions. This policy needs to extend to mail scripts, as well)

2. There isn't any way to use qmail's wildcard addressing with this method. (e.g. I couldn't pipe [email protected], [email protected], and [email protected] to the same script without setting up seperate mailnames for each.)

The solution, it seems, is to add custom lines directly into /var/qmail/users/assign. Unfortunately, whenever I do this, qmail overwrites my changes the next time I run mchk (and possibly at other times, as well; I haven't tested thoroughly).

Is there any way to specify custom lines that should be included in /var/qmail/users/assign?
 
nevermind :p

Nevermind -- found my own solution. If you're curious:

I setup a [email protected] address, and made that the catchall for the domain. (the script will have to filter out stuff that's not directed to it, but hey, that's doable.) Then I made the [email protected] .qmail file look like this:

| /home/httpd/vhosts/domain/mail/deliver

qmail lets you use the suexec bit to execute scripts as other users, so chmod u+s /home/httpd/vhosts/domain/mail/deliver, and voila!

Tyler
 
Back
Top