email piping

Is there a way within interworks to set up an email alias that pipes to a .cgi?


is an alias which points to:


Can this be done?

If not, can outside interworx a .qmail-support file be created within a directory that will redirect?



Currently there isn’t support for this in the InterWorx web interface, but there’s nothing to stop you from creating a dot-qmail file to do what you want. For example:



Thx for the quick response, do you think it will be in a future update?

I’ve had issues with the mail bouncing back to me when I use the dot-qmail file to redirect to a .cgi.

Does the following look correct to you as a substitue for Interworx being able to handle it?




Do I need the piping character? A different command? You’d just be doing me a favor to answer this, lots of searching is running me in circles.


What does the bounced message say the problem was?

Also, try watching the mail log like this while sending the message to see what’s happening:

tail -f /var/log/send/current

Also may want to check the ownership and permissions of the dot-qmail file, and the cgi.


To answer your question, yes, that general setup looks correct, and you do need the piping character, etc.


Haha, thx.

My stumbling block may very well be permissions, or rather, ownership. I’m not sure who should ‘own’ the .qmail file, I’m guessing permissions should be 600.


If you’re going to make the permissions 600, you’ll want the owner of the dot-qmail file to be the vpopmail user. Also, the vpopmail user should be able to read and execute the cgi. It would probably be easiest to make the cgi world read and executable.

I should also mention that the CGI will have to “work” via the command line, since that’s how it gets called.


Does it make sense to think that the vpopmail user is simply “mail?”

I’m sorry, I should have been more clear.

The user name is actually “vpopmail”


Thx for all your help so far, I may as well be IMing you … :slight_smile:

When I set this ownership:
chown vpopmail.vpopmail .qmail-support

I get this response:
chown: `vpopmail.vpopmail’: invalid group

However, when I use mail.mail, I don’t.


There is a vpopmail user, but there isn’t a vpopmail group.

So you’ll just want to do:

chown vpopmail .qmail-support

The group should be whatever the group is for the other files in this directory, although it shouldn’t have an effect on functionality.


Thanks so much for your help. You’ve gone well beyond the call of duty.

It seems as if I have everything set correctly from a .qmail perspective (thx to you). I’m just waiting for mail to bounce back.

When I don’t have this .qmail-support alias file, I get the bounced mail immediately. With the file, it takes quite a while (almost an hour), but then eventually the mail bounces back – almost as if the alias is set up correctly, but the .cgi file just isn’t working right.

I’ve posted on the forums of the company who’s .cgi file it is (which DOES run from command line) to see if they have any thoughts. They aren’t nearly as snappy as you on the responses, however … :wink:

I’ll post the final results here as soon as I know, so that others needing this functionality will at least know whether or not we achieved the desired results from this thread.



That did the trick. I had a few perl modules to get installed first for the .cgi to function, after which the piping worked exactly as expected.

Thx much.


Great, glad it’s working.

Do you mind saying where you found the script, and who made it?


Not at all,

It’s part of the PerlBill ( suite, made by LogicNow (they also make PerlDesk … which you’re probably aware of :slight_smile: )

They have an option of automatically logging incoming email to the helpdesk system, if you can pipe it correctly.


How much has changed since this thread died? I cant seem to get EZMLM to work properly. I need to have list files and .qmail files world readable to get qmail to even get to EZMLM. Then, EZMLM sends back out errors because it can’t write anything to disk. All the files are owned by vpopmail and I see a few qmail users… I’m probably missing something simple going 2 weeks without proper sleep will do that to you :wink:

Nevermind I slept in today and got everything to work first shot. That’s pretty sad I think.