1. Please take a little time for this simple survey! Thank you for participating!
    Dismiss Notice
  2. Dear Pleskians, please read this carefully! New attachments and other rules Thank you!
    Dismiss Notice
  3. Dear Pleskians, I really hope that you will share your opinion in this Special topic for chatter about Plesk in the Clouds. Thank you!
    Dismiss Notice

Redirect email alias to local script for handling.

Discussion in 'Plesk for Linux - 8.x and Older' started by JZMatrix, Feb 2, 2007.

  1. JZMatrix

    JZMatrix Guest

    0
     
    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?
     
  2. fishnyc22

    fishnyc22 Guest

    0
     
    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?
     
  3. fishnyc22

    fishnyc22 Guest

    0
     
  4. dirty@

    dirty@ Guest

    0
     
    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..
     
  5. fishnyc22

    fishnyc22 Guest

    0
     
    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
    &myname@mydomain.com

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

    Thanks
     
Loading...