• Please be aware: Kaspersky Anti-Virus has been deprecated
    With the upgrade to Plesk Obsidian 18.0.64, "Kaspersky Anti-Virus for Servers" will be automatically removed from the servers it is installed on. We recommend that you migrate to Sophos Anti-Virus for Servers.
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

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