mailgate installation how?

Asked by ciprian

I have openerp installed on linux debian 5. I wish to install crm module with mailgate. i have intalled openerp 5.0.1. I found openerp-mailgate.py script. I have installed fetchmail but i don't know how to configure.
I can't find any tips anywere, pls help.
Thanks!

Question information

Language:
English Edit question
Status:
Answered
For:
Odoo Addons (MOVED TO GITHUB) Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
ciprian (ciprian-parfon) said :
#1

I've managed to find and configure fetchmail. Now I've configured fetchmailrc to work with my mail server but i don't realy understand all parameters. The fetchmailrc looks like this:

poll mail.mydomain.ro proto pop3:

username john password mypasswd mda "/etc/openerp-mailgate.py -u3 -padmin
-ssupport -<email address hidden>";

I get this two errors:

fetchmail: couldn't find canonical DNS name of fetchmailrc (fetchmailrc): Name or service not known
fetchmail: Query status=11 (DNS)

Can anyone explain "-padmin -ssuport -e " ? I realy don't know if this parameters are correct.

Thanks!

Revision history for this message
Husen Daudi (husendaudi) said :
#2

username john password mypasswd mda "/etc/openerp-mailgate.py -u3 -padmin
-ssupport -<email address hidden>";

username john : Username of your mail Id from where you want to fetch mails.
password mypasswd : Password of your mail id username john
mda "/etc/openerp-mailgate.py : mail gate script which will parse your fetched mail. It exist in addons/crm/script/ directory.
-u3 : user id of openerp user
-padmin : password of that user
-ssupport : code or name of section in crm on which you want to create case.
-<email address hidden> : Your full mail id

You forgot one argument.
-ddb_name : database name in which case will be created.

for more details check this link.
http://doc.openerp.com/book/2/2_5_CRM/2_5_CRM_case.html#using-the-email-gateway

Revision history for this message
ciprian (ciprian-parfon) said :
#3

Thanks for helping hda. I'ts more clear for me now.

I have one more question. Do I need to install smtp_client module for sending mail messages from ERP ? I know that fetchmail is only for getting mails for users.

Revision history for this message
ciprian (ciprian-parfon) said :
#4

I've managed to make the fetchmairc script. At execute is says: "fetchmail: WARNING: Running as root is discouraged.
fetchmail: No mail for userX at mail.mydomain.ro"
I understand that userX has no mail. This fechmailrc script must be mannualy runned or I have to do something to automate this action?
I found that I need to make a schedule in "Scheduled Actions" in Administration->Configuration Menu in web interface of OpenErp. So, I went to "Scheduler" section to make OpenErp check on mails on 5 min but i get stuck. I don't know what to write in Technical Data -> Action to trigger -> Object = ? Function = ?

Please help.

Thanks!

Revision history for this message
Husen Daudi (husendaudi) said :
#5

You can run fetchmail with -d 300 option
It means it will run fetchmail as a daemon and after every 300 seconds it will run fetch mail script automatically.
Yes, For sending mail you can use smtp_client module.

Revision history for this message
Vermont (gnzoudja) said :
#6

I have a concern with fetchmail

afetr editing the containof fetchmailrc
I lunch it using the command fetchmail -f fetchmailrc

I have an error that says
fetchmailrc file must have at least -rwx - - x - - - (0710) authorization
(translating french)

Please can someone help with this?

Regards

Revision history for this message
Husen Daudi (husendaudi) said :
#7

Yoy have to give full rights to your fetchmail script file at.
addons//crm/scripts/openerp-mailgate/openerp-mailgate.py

chmod 777 addons//crm/scripts/openerp-mailgate/openerp-mailgate.py

Revision history for this message
Vermont (gnzoudja) said :
#8

Thanks, but the problem is not yet solved
I did locate my file and got this: "/usr/lib/openerp-serve/addons/crm/scripts/openerp-mailgate/openerp-mailgate.py

I entered the command chmod 777 "/usr/lib/openerp-serve/addons/crm/scripts/openerp-mailgate/openerp-mailgate.py
 Yet still I have the sae error.

Please kindly chech the content of my fetchmailrc file:

poll pop.mycompany.net proto pop3:
username <email address hidden> password pwd mda "/usr/lib/openerp-serve/addons/crm/scripts/openerp-mailgate/openerp-mailgate.py -u 1 - p pwd -s 3 -e <email address hidden> -d ghdb"

Regards

Revision history for this message
Husen Daudi (husendaudi) said :
#9

fetchmailrc file must have at least -rwx - - x - - - (0710) authorization

It seems like your fetchmailrc configuration file has no read permission for your user.
give full rights to your fetchmailrc file too.
chmod 777 fetchmailrc

Revision history for this message
Vermont (gnzoudja) said :
#10

Yet still It's not working.
Here are the command's I did entered.
Thanks for the helping hand

ccsi@ccsi-tiny:~$ locate fetchmailrc
/home/ccsi/fetchmailrc
/home/ccsi/fetchmailrc~
/usr/share/doc/fetchmail/examples/fetchmailrc.example
/usr/share/man/man1/fetchmailrc.1.gz
ccsi@ccsi-tiny:~$ sudo -s
[sudo] password for ccsi:
bonjour, nous demarrons les services openerp pour le ghana par steve
veuillez patientez .....
Restarting openerp-server: openerp-server.
root@ccsi-tiny:~# c
root@ccsi-tiny:~# chmod 777 /usr/share/man/man1/fetchmailrc.1.gz
root@ccsi-tiny:~#
root@ccsi-tiny:~# chmod 777 /home/ccsi/fetchmailrc
root@ccsi-tiny:~#
root@ccsi-tiny:~# fetchmail -f fetchmailrc
fetchmail: Avertissement: appeler fetchmail avec privileges root est déconseille.
Le fichier fetchmailrc doit avoir au moins les permissions -rwx--x--- (0710)
root@ccsi-tiny:~#
root@ccsi-tiny:~# sudo -s
bonjour, nous demarrons les services openerp pour le ghana par steve
veuillez patientez .....
Restarting openerp-server: openerp-server.
root@ccsi-tiny:~# sudo -s
bonjour, nous demarrons les services openerp pour le ghana par steve
veuillez patientez .....
Restarting openerp-server: openerp-server.
root@ccsi-tiny:~# chmod 777 /usr/share/doc/fetchmail/examples/fetchmailrc.example
root@ccsi-tiny:~# chmod 777 fetchmailrc
root@ccsi-tiny:~# fetchmail -f fetchmailrc -v
fetchmail: Avertissement: appeler fetchmail avec privileges root est deconseille.
Le fichier fetchmailrc doit avoir au moins les permissions -rwx--x--- (0710)
root@ccsi-tiny:~#

Revision history for this message
Husen Daudi (husendaudi) said :
#11

You fetchmailrc file is located at /home/ccsi/fetchmailrc
so you should run fetchmail like this.

fetchmail -f /home/ccsi/fetchmailrc -v

If it doesn't work then run your fetchmail script as sudo.

sudo fetchmail -f fetchmailrc -v

Revision history for this message
Jay Vora (Serpent Consulting Services) (jayvora) said :
#12

Hello Ciprian,

Would you please focus here?

Kindly set this as closed or restart the discussion.

Thank you.

Can you help with this problem?

Provide an answer of your own, or ask ciprian for more information if necessary.

To post a message you must log in.