Odoo Help


This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.


incoming e-mail to postfix

on 2/27/14, 5:57 PM 3,936 views

Hi all,

I have search like crazy but not found any real answare how to use local (ubuntu) postfix server as incoming email server and how to link e-mail alias to openerp mail addresses.

Thanks in advance


Liso Gallo
On 3/7/14, 12:53 PM

Hi Lennart,

Try the following:

Create a /etc/postfix/virtual_aliases file with the following content:

@sub.domain.com your_local_alias@localhost

Add the following lines to /etc/postfix/main.cf file:

# Virtual user mappings
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
virtual_alias_maps = hash:/etc/postfix/virtual_aliases

Add this line to /etc/aliases file:

your_local_alias: "| openerp_mailgate.py --host=localhost --port=8069 -u 1 -p XXXXX -d database"

Finally, run the following commands as sudo:

sudo postmap /etc/postfix/virtual_aliases
sudo newaliases
sudo service postfix restart

Hope it helps.



Excellent assistance Liso! Very pleased to get this working in my implementation, thanks to your posting here.

Ankur Shah
on 3/27/14, 8:18 AM

Is the postfix running then as a normal mailserver? There are many opinions not recommending this on your odoo instance for performance reasons...

David Arnold
on 8/5/14, 11:50 PM
On 9/4/14, 3:28 AM

fellow the guide ,i got the error,why,>.<!!!

Sep  4 15:20:32 ubuntu postfix/local[29525]: DBA1862151: to=<openerp_mailgate@lo
calhost>, orig_to=<admin@wocai.org>, relay=local, delay=3.9, delays=0.06/0/0/3.8
, dsn=5.3.0, status=bounced (Command died with status 1: "/opt/openerp/openerp_m
ailgate.py --host=localhost -u 1 -p PASSWORD -d DATABASE". Command output: Traceback
 (most recent call last):   File "/opt/openerp/openerp_mailgate.py", line 199, i
n <module>     main()   File "/opt/openerp/openerp_mailgate.py", line 169, in ma
in     email_default= options.default)   File "/opt/openerp/openerp_mailgate.py"
, line 104, in __init__     self.model_id = self.rpc('ir.model', 'search', [('mo
del', '=', model)])[0]   File "/opt/openerp/openerp_mailgate.py", line 94, in __
call__     return self.rpc.execute(self.dbname, self.user_id, self.passwd, *requ
est, **kwargs)   File "/usr/lib/python2.7/xmlrpclib.py", line 1224, in __call__
    return self.__send(self.__name, args)   File "/usr/lib/python2.7/xmlrpclib.p
y", line 1578, in __request     verbose=self.__verbose   File "/usr/lib/python2.
7/xmlrpclib.py", line 1264, in request     return self.single_request(host, hand
ler, request_body, verbose)   File "/usr/lib/python2.7/xmlrpclib.py", line 1297,
 in single_request     return self.parse_response(response)   File "/usr/lib/pyt
hon2.7/xmlrpclib.py", line 1473, in parse_response     return u.close()   File "
/usr/lib/python2.7/xmlrpclib.py", line 793, in close     raise Fault(**self._sta
ck[0]) xmlrpclib.Fault: <Fault AccessDenied: 'Access denied.'> )



AccessDenied: 'Access denied.': Seems your credentials are incorrect.

Mario Gielissen | Openworx
on 9/4/14, 3:42 AM

yeah,it should be the the passwd of postgres ?

on 9/4/14, 4:16 AM

Sep 5 13:43:23 ubuntu postfix/local[29234]: 7AD4E60D0E: to=<openerp_mailgate@lo calhost>, orig_to=<gr@wocai.org>, relay=local, delay=0.14, delays=0.03/0/0/0.12, dsn=5.3.0, status=bounced (Command died with status 1: "/opt/openerp/openerp_ma ilgate.py --host=localhost --port=8069 -u 1 -p 081202 -d www". Command output: T raceback (most recent call last): File "/opt/openerp/openerp_mailgate.py", lin e 200, in main() File "/opt/openerp/openerp_mailgate.py", line 17 0, in main email_default= options.default) File "/opt/openerp/openerp_mail gate.py", line 105, in __init__ self.model_id = self.rpc('ir.model', 'search ', [('model', '=', model)])[0] IndexError: list index out of range ) Sep 5 13:43:23 ubuntu postfix/qmgr[32720]: 7AD4E60D0E: removed

on 9/5/14, 1:52 AM

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

4 follower(s)


Asked: 2/27/14, 5:57 PM
Seen: 3936 times
Last updated: 3/16/15, 8:10 AM