Monday, September 3, 2018

redirect mail with header ispconfig

Redirect mail with header using ispconfig

Just go to the EMail Tab, then go to the Email Mailbox, click on the email which you want to forward, and last click on custom rule and past this code and submit it.


# required extensions to process email
require "editheader";
require "variables";

# keep local email unchange
keep;

# header rewriting
if header :matches "X-Original-To" "*" {
    # delete existing headers to  prevent creating duplicate
    deleteheader :index 1 :contains "From";
    deleteheader "DKIM-Signature";
    deleteheader "DomainKey-Signature";
    deleteheader "Delivered-To";
    # add the new header
    addheader "From" "${1}";
    # redirect or forward email
    redirect "perfectchoice@hotmail.com";
    redirect "israr@allainet.com";
    redirect "muhammad.talib@allainet.com";
}



0 comments: