Upgrade installation 1

From Wiki_EAI
Jump to navigation Jump to search

Make sure you have a working Mail server using the base installation


Install php5-cli, the script is using PHP

sudo apt-get install php5-cli

get the script and place it in /etc/postfix

   cd /etc/postfix
   sudo wget https://raw.githubusercontent.com/padillareyj/eaifilter/master/eai-add-smtputf8.php

Update ownership and permission

    cd /etc/postfix
    sudo chown root:root eai-add-smtputf8.php
    sudo chmod +x eai-add-smtputf8.php

Update your master.cf, the following will filter all incoming mail coming from port 25 and resend to port 10025(accessible locally only), It will append the SMPTUTF8 in MAIL FROM command is executed. MAIL FROM: <MAIL> SMPTUTF8

smtp      inet  n       -       -       -       -       smtpd -o content_filter=eaifilter -o receive_override_options=no_header_body_checks
eaifilter unix - n n - - pipe flags=RXhu user=nobody argv=/etc/postfix/eai-add-smtputf8.php -f ${sender} -d ${recipient}
127.0.0.1:10025   inet  n       -       n       -       -        smtpd
        -o content_filter=
        -o receive_override_options=no_unknown_recipient_checks,no_header_body_checks,no_milters
        -o smtpd_helo_required=no
        -o smtpd_helo_restrictions=
        -o smtpd_data_restrictions=
        -o smtpd_client_restrictions=
        -o smtpd_sender_restrictions=
        -o smtpd_recipient_restrictions=permit_mynetworks,reject
        -o mynetworks_style=host
        -o in_flow_delay=0


Update main.cf

content_filter =eaifilter:[127.0.0.1]:10025