Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Postfix is supplied as a container in the standard setup deployed by the auto-deploy method. Below is merely for further information but may be outdated/deprecated.

 

Anchor
postfix
postfix

Info
titleImportant note

We recommend that the postfix email server configuration is planned and tested in conjunction with the Patrix Support Team.

To obtain the latest copy of the postfix email server filter, please email the Patrix support team.

The following instructions will probably need to be adjusted according to the target OS: 

1. Install python, pip and requests:

Code Block
languagebash
easy_install pip
pip install requests

2. Get the postfix filter and extract it under /var/spool/filter.

3. Execute the following:

Code Block
mkdir /var/spool/filter/incoming
chmod +x /var/spool/filter/autosave
chmod +x /var/spool/filter/email_callback.py
touch /var/spool/filter/save.log

4. Edit file /var/spool/filter/email_callback.json, change "nuxeo.server.com" to point to the Nuxeo Server, and optionally change the username / password as well.

5. Test by executing the following with a sample email in .eml format. The email should include a valid case reference and the end result should be that it is saved under the relevant Patricia case. Look into /var/spool/filter/email_callback.log if you need to debug.

Code Block
/var/spool/filter/email_callback.py email.eml

6. Decide with user will execute the filter - note that it is not allowed that this user is root. For the remaining of this section, we will use <admin> as a placeholder for the user, please replace with the actual user in all subsequent instances, whether it's command lines or configuration files.

7. Assign appropriate permissions:

Code Block
sudo chown -R <admin> /var/spool/filter/

8. Locate postfix' main.cf and edit it as follows:

Code Block
use_sacl_cache = no

9. Locate postfix' master.cf and edit it in order to include the needed filter. The needed edits will depend to the exact configuration, below we will just include two typical fragments:

Code Block
smtpd     pass  -       -       n       -       -       smtpd
  -o content_filter=pifilter:
 
submission inet n       -       n       -       -       smtpd
  -o smtpd_tls_security_level=may
  -o content_filter=pifilter:

Notes: (1) smtpd is responsible for handling port 25, submission is responsible for handling port 587. (2) Casebrowser does not support starttls, so 'smtpd_tls_security_level' needs to be set to 'may' if port 587 is configured in settings.xml.

Code Block
pifilter    unix  -       n       n       -       10      pipe
   flags=Rq user=<admin> null_sender=
   argv=/var/spool/filter/autosave -f ${sender} -- ${recipient}

You can consult postfix' documentation for more details.

10. Reload postfix' configuration and watch its log:

Code Block
postfix reload
tail -f /var/log/mail.log