Skip to content

Instantly share code, notes, and snippets.

@mvaled
Last active August 29, 2015 14:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save mvaled/80f1f5e52e5ff5315da8 to your computer and use it in GitHub Desktop.
Save mvaled/80f1f5e52e5ff5315da8 to your computer and use it in GitHub Desktop.
Postfix configuration for delivering to OpenERP that may lead to double processing of emails.
# many options here
mydestination = localhost.localdomain, localhost
recipient_delimiter = +
transport_maps = hash:/etc/postfix/transport
virtual_mailbox_domains = example.com
virtual_mailbox_maps = pgsql:/etc/postfix/pg-aliases.cf
virtual_transport = dovecot
dovecot_destination_recipient_limit = 1
xoeuf_destination_recipient_limit = 1
#... more standard stuff here
# service type private unpriv chroot wakeup maxproc command + args
# (yes) (yes) (yes) (never) (100)
xoeuf unix - n n - - pipe
flags=DFR user=manu argv=/home/manu/src/pgi/xhg/bin/xoeuf_mailgate
-d mercurio -c /home/manu/src/pgi/xhg/openerp.conf.py
--log-host localhost --log-from admin@example.com
--log-to manu@localhost
# !! Notice we are using the xoeuf_mailgate script in https://github.com/merchise-autrement/xoeuf/
openerp unix - n n - - pipe
flags=DRF user=manu argv=/home/manu/src/pgi/xhg/bin/ipython
/home/manu/src/pgi/xhg/parts/omelette/openerp/addons/mail/static/scripts/openerp_mailgate.py
-- -d mercurio -u 1 -p admin --host localhost --port 8069
dovecot unix - n n - - pipe
flags=DRhu user=vmail:vmail argv=/usr/lib/dovecot/deliver
-f ${sender} -d ${recipient}
# So @example.com will be delivered to the xoeuf_mailgate transport
example.com xoeuf
# The original mailgate script that actually sends an XMLRPC call.
example2.com openerp
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment