• Halloween is coming! To celebrate the occasion, we dusted off a couple of old skins, and even created a brand new one (Pixel).
    To get into the festive spirit, install the Skins extension.
  • The new Python extension is now available. It allows customers to deploy and manage WSGI-based Python applications on their websites directly from Plesk.
  • The Plesk Mobile apps for iOS and Android and the Plesk Mobile Center extension have been deprecated, and are no longer available for new installations. In Plesk Obsidian 18.0.84, the Plesk Mobile Center extension will be removed from servers during the upgrade, and the Plesk Mobile apps will lose their server management features.
  • The Social Login extension has been deprecated and will be removed in Plesk Obsidian 18.0.84. After that, it will no longer be possible to log in to Plesk with a Google, Facebook, GitHub account, or with a passkey. Plesk usernames and passwords, as well as logging in with a WebPros Account, are not affected.

Redirect email alias to local script for handling.

J

JZMatrix

Guest
I'm trying to find a semi-easy way to create a mail alias via Plesk and then configure qmail to direct any mail destined for that alias/mailbox to a script (that I'm writing) on the local server to be processed accordingly.

On postfix/sendmail systems with /etc/aliases this is a trivial configuration item, but I'm not sure of how to accomplish this with qmail. I'm also worried that Plesk will decide to overwrite any manually edited config file on a whim and cripple my email processing system once it's gone production.

Any ideas?
 
I'm trying to do somethign similar I tried creating an alias in /var/qmail/alias

file called .qmail-somealias

with 1 line in the file like:

|/path/to/my/script.sh

but its not working. Running the script.sh with terminal works fine.

any thoughts?
 
as far as I understand qmail/alias/.qmail-somename will work only if message recipient is somename@hostname

if you need alias be used for some specific domain, you need to handle it through file qmail/mailnames/domain.com/.qmail-somename, i.e. the same way as plesk configures mailman mail lists addresses..
 
thanks for the reply.. I made a little progress with this last night before reading your post.

I was messing with
qmail/mailnames/mydomain.com/test/.qmail

It is closer to working but I think there is a permission issue (I guess with my script). Even set at 777 it still fails.

I get the following error returned via email:

preline: fatal: unable to run /var/www/vhosts/mydomain.com/httpdocs/test/test.php: access denied

test.php is set to:
777
myusr/psacln

my .qmail file looks like this:

| preline /var/www/vhosts/mydomain.com/httpdocs/test/test.php
| true
&[email protected]

Should the user/group be set to something else? Should I not be using preline? anyone know whats up?

Thanks
 
Back
Top