Skip to content

Adi

My feedback

2 results found

  1. 27 votes

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)

    We’ll send you updates on this idea

    How important is this to you?

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
    Adi supported this idea  · 
  2. 180 votes

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)

    We’ll send you updates on this idea

    How important is this to you?

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
    An error occurred while saving the comment
    Adi commented  · 

    Assuming the plesk admin is running a modern MTA i.e. Postfix, not some antiquated and heavily patched qmail fork, you do not need to run the script as the virtual mail user (popuser in Plesk's case). All you have to do is to enable forwarding for an email account to some mycustomfilter@localhost.localdomain email address. Then, in Postfix you'll have to create a custom transport and a filter for that transport and that's it. Example:
    1. In /etc/postfix/mytransport enter:
    mycustomfilter@localhost.localdomain mycustomfilter:
    postmap /etc/postfix/mytransport
    2. In main.cf enable this new transport:
    transport_maps = hash:/var/spool/postfix/plesk/transport, hash:/etc/postfix/mytransport
    3. In master.cf configure the new transport:
    mycustomfilter unix - n n - - pipe flags=F user=somelocaluser argv=/var/www/vhosts/domain.com.au/bin/filter-script.php ${sender} ${size} ${recipient}
    Restart Postfix, then in Plesk pick an account, enable forwarding and enter mycustomfilter@localhost.localdomain as address in the textbox.
    Voila, it can be done, safe and secure!
    It can also be implemented in Plesk by Parallels, where the following variables will have to be entered by the user somewhere in the interface:
    ${filtername} (mycustomfilter)
    ${scriptpath} (/var/www/vhosts/domain.com.au/bin/filter-script.php)

Feedback and Knowledge Base