Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
77 commits
Select commit Hold shift + click to select a range
38c3932
[ADD] make retrieval configurable per folder; use msgid to exclude
hbrunn Mar 26, 2013
4a5cc51
[MRG] lp:~therp-nl/therp-addons/fetchmail_attach_from_folder rev 89
hbrunn Mar 26, 2013
8290f57
[IMP] - convert mailadresses to lowercase to increase change for match
NL66278 Apr 4, 2013
4fd8c5d
[IMP] autopep8
hbrunn Apr 5, 2013
d19f753
[ADD] msg_state field for folders - set the state of messages fetched
hbrunn Apr 15, 2013
5c873c9
[IMP] refactored fetch_mail
hbrunn Apr 15, 2013
84f08ab
[FIX] attach mail attachments to matched object in non-OpenERP case
hbrunn Apr 15, 2013
2e28f32
[IMP] make fetch_mail's refactoring more useful by returning the ids of
hbrunn Apr 16, 2013
85c9faa
[FIX] don't rollback() transation, use savepoint. This fixes concurrency
hbrunn Apr 18, 2013
4dd2eb6
[REVERT] merged and pushed on 7.0 instead of 6.1 branch...
gurneyalex Apr 26, 2013
700483b
[ADD] port fetchmail_attach_from_folder to 7.0
hbrunn Jan 16, 2014
f587946
[IMP] remove deprecated type field for views
hbrunn Jan 27, 2014
1933809
[IMP] adjust view definitions to 7.0
hbrunn Feb 3, 2014
7256b2c
move all modules to __unported__ on master branch and set installable…
sbidoul Jul 12, 2014
5b89245
[REN] preliminary migration of fetchmail_attach_from_folder
hbrunn Jan 27, 2015
8cb8699
[IMP] make manual attach wizard usable again
hbrunn Jan 27, 2015
366aa89
[ADD] placeholders
hbrunn Jan 27, 2015
7dd23cd
[FIX] rename OpenERP->Odoo
hbrunn Jan 27, 2015
d732d0f
[IMP] readme
hbrunn Jan 27, 2015
cafba26
[IMP] use a dedicated logger
hbrunn Jan 31, 2015
0f3f97e
[FIX] we want object_id not to be required
hbrunn Jan 31, 2015
2f185fa
[ADD] test matching algorithms
hbrunn Jan 31, 2015
5dd5ee8
Add license key in __openerp__.py
yvaucher Feb 6, 2015
69a2382
Add OCA as author of OCA addons
gurneyalex Mar 2, 2015
ea9f647
Remove auto_install on fetchmail_attach_from_folder
Apr 27, 2015
99d8f86
Add bug tracker link on README.rst
yvaucher May 22, 2015
760ad46
[FIX] honor sequence
hbrunn Jul 16, 2015
cd771ba
[ADD] allow to deactivate folders
hbrunn Jul 16, 2015
307c97e
[UPD] prefix versions with 8.0
sbidoul Oct 9, 2015
2e4e8ff
[MIG] Make modules uninstallable
pedrobaeza Oct 14, 2015
a2c3c2a
[SEC] fetchmail_attach_from_folder: fix unsafe eval
gurneyalex Feb 15, 2016
d27399c
[MIG] Rename manifest files
pedrobaeza Oct 6, 2016
55dd924
[MIG] fetchmail_attach_from_folder. Migration to 10.0.
NL66278 Mar 1, 2018
e857425
[FIX] fetchmail_attach_from_folder. Refactor for more testing.
NL66278 Mar 26, 2018
71776b2
[FIX] fetchnail_attach_from_folder. Can not pass object to action con…
NL66278 Apr 10, 2018
56fac98
[IMP] fetchmail_attach_from_folder. Separate confirm for folder.
NL66278 Jun 6, 2018
c5c27ee
[IMP] fetchmail_attach_from_folder. Show available folders.
NL66278 Jun 6, 2018
e4eb6fe
[IMP] fetchmail_attach_from_folder. Button to retrieve single folder.
NL66278 Jun 7, 2018
f14da69
[RFR] Override hook
StefanRijnhart Oct 29, 2015
fdfefc2
[IMP] Full email preview when attaching manually
StefanRijnhart Oct 29, 2015
9c2bb56
[FIX] Some fields are not there if the client asks for a search form
StefanRijnhart Oct 29, 2015
9a89b5d
[FIX] replace simplejson dependency with json
ntsirintanis Jul 10, 2019
8678bb6
[IMP] fetchmail_attach_from_folder: pre-commit stuff
NL66278 Jan 8, 2024
67c0554
[MIG] fetchmail_attach_from_folder: Migration to 16.0
NL66278 Jan 8, 2024
a600d45
[MIG] fetchmail_*: adapt tests
NL66278 Jan 9, 2024
278b089
[FIX] fetchmail_*: adapt to Odoo 16.0 and python 3.x
NL66278 Jan 10, 2024
2566dda
[IMP] fetchmail_.._folder: optionally archive messages automatically
NL66278 Apr 25, 2024
5a6f068
[IMP] fetch..._folder: Add contributor and maintainer
NL66278 May 11, 2024
edba1f9
[FIX] fetchmaeil..folder: adapt test to current demo data
NL66278 May 11, 2024
a4bcc3a
[FIX] fetchmail..folder: handle non standard matching
NL66278 May 13, 2024
e5af73e
[IMP] outlook as server_type
Jul 23, 2024
4e5bad9
[IMP] Added the possibility to indicate a server action to be executed
zamberjo Jul 23, 2024
91c4039
[IMP] Add option to read e-mails unseen
Jul 24, 2024
2e53ed4
[MIG] fetchmail_attach_from_folder: Migration to 17.0
Oct 14, 2024
f1381cd
[UPD] Update fetchmail_attach_from_folder.pot
Mar 12, 2025
97eac64
[BOT] post-merge updates
OCA-git-bot Mar 12, 2025
41ebc31
[IMP] fetchmail_attach_from_folder: pre-commit auto fixes
Alexgars73 Jul 17, 2025
2b3ceed
[MIG] fetchmail_attach_from_folder: Migration to 18.0
Alexgars73 Jul 17, 2025
26e91ae
[UPD] Update fetchmail_attach_from_folder.pot
Aug 25, 2025
8dbc8bb
[BOT] post-merge updates
OCA-git-bot Aug 25, 2025
528e9ac
Translated using Weblate (Italian)
mymage Sep 18, 2025
70c137f
Translated using Weblate (Italian)
mymage Oct 16, 2025
0a5d09e
[FIX] fetchmail_attach_from_folder tests: mock expunge()
thomaspaulb Jan 25, 2026
417ad05
[FIX] fetchmail_attach_from_folder: be able to open form view even wh…
thomaspaulb Jan 9, 2025
5a8c1d6
[FIX] fetch...folder: use message uid's not sequence
NL66278 Aug 22, 2024
98cb2b4
[FIX] fetch...folder: test message archiving
NL66278 Aug 23, 2024
e2e7de3
[FIX] fetch..folder: adapt manual wizard to message_uids
NL66278 Jan 26, 2026
ebd0899
[UPD] Update fetchmail_attach_from_folder.pot
Jan 28, 2026
8b81741
[BOT] post-merge updates
OCA-git-bot Jan 28, 2026
56d9563
Update translation files
weblate Jan 28, 2026
8557766
Translated using Weblate (Italian)
mymage Jan 29, 2026
fc7ecf7
[18.0][FIX] fetchmail_attach_from_folder: add missing keyword argument
adrip-s73 Dec 10, 2025
2b1eb3a
[BOT] post-merge updates
OCA-git-bot Feb 9, 2026
8f2bfff
Update fetchmail_server_folder
ikus060 Mar 6, 2025
f7c30ef
[RFR] fetch..folder: put each test class in own file
NL66278 Feb 9, 2026
8f4bc1e
[TST] fetch..folder: Add tests for criteria and no match
NL66278 Feb 9, 2026
14c90a9
[MIG] fetchmail_attach_from_folder: migrate to 19.0
NL66278 Mar 19, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
150 changes: 150 additions & 0 deletions fetchmail_attach_from_folder/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,150 @@
.. image:: https://odoo-community.org/readme-banner-image
:target: https://odoo-community.org/get-involved?utm_source=readme
:alt: Odoo Community Association

=======================
Email gateway - folders
=======================

..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:4af6875cf9d000c6b3091a6c84d7a730fd5065af44b37fa453267dc90f08507c
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
:target: https://odoo-community.org/page/development-status
:alt: Beta
.. |badge2| image:: https://img.shields.io/badge/license-AGPL--3-blue.png
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fserver--tools-lightgray.png?logo=github
:target: https://github.com/OCA/server-tools/tree/19.0/fetchmail_attach_from_folder
:alt: OCA/server-tools
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/server-tools-19-0/server-tools-19-0-fetchmail_attach_from_folder
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
:target: https://runboat.odoo-community.org/builds?repo=OCA/server-tools&target_branch=19.0
:alt: Try me on Runboat

|badge1| |badge2| |badge3| |badge4| |badge5|

Adds the possibility to attach emails from a certain IMAP folder to
objects, ie partners. Matching is done via several algorithms, ie email
address, email address's domain or the original Odoo algorithm.

This gives a simple possibility to archive emails in Odoo without a mail
client integration.

**Table of contents**

.. contents::
:local:

Configuration
=============

In your fetchmail configuration, you'll find a new list field
``Folders to monitor``. Add your folders here in IMAP notation (usually
something like ``INBOX.your_folder_name.your_subfolder_name``), choose a
model to attach mails to and a matching algorithm to use.

Exact mailaddress
-----------------

Fill in a field to search for the email address in ``Field (model)``.
For partners, this would be ``email``. Also fill in the header field
from the email to look at in ``Field (email)``. If you want to match
incoming mails from your customers, this would be ``from``. You can also
list header fields, so to match partners receiving this email, you might
fill in ``to,cc,bcc``.

Domain of email addresses
-------------------------

Match the domain of the email address(es) found in ``Field (email)``.
This would attach a mail to ``test1@example.com`` to a record with
``Field (model)`` set to ``test2@example.com``. Given that this is a
fuzzy match, you probably want to check ``Use 1st match``, because
otherwise nothing happens if multiple possible matches are found.

Odoo standard
-------------

This is stricly speaking no matching algorithm, but calls the model's
standard action on new incoming mail, which is usually creating a new
record.

Usage
=====

A widespread configuration is to have a shared mailbox with several
folders, i.e. one where users drop mails they want to attach to
partners. Let this folder be called ``From partners``. Then create a
folder configuration for your server with path ``"INBOX.From partners"``
(note the quotes because of the space, this is server dependent). Choose
model ``Partners``, set ``Field (model)`` to ``email`` and
``Field (email)`` to ``from``. In ``Domain``, you could fill in
``[('customer', '=', True)]`` to be sure to only match customer records.

Now when your users drop mails into this folder, they will be fetched by
Odoo and attached to the partner in question. After some testing, you
might want to check ``Delete matches`` in your folder configuration so
that this folder doesn't grow indefinitely.

Another way to prevent having to process ever more messages from the
folder to read is to automatically move all processed messages to an
archive folder that can be specified.

Bug Tracker
===========

Bugs are tracked on `GitHub Issues <https://github.com/OCA/server-tools/issues>`_.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us to smash it by providing a detailed and welcomed
`feedback <https://github.com/OCA/server-tools/issues/new?body=module:%20fetchmail_attach_from_folder%0Aversion:%2019.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.

Do not contact contributors directly about support or help with technical issues.

Credits
=======

Authors
-------

* Therp BV

Contributors
------------

- Holger Brunn hbrunn@therp.nl
- Ronald Portier ronald@therp.nl
- Alexandre Fayolle alexandre.fayolle@camptocamp.com

Maintainers
-----------

This module is maintained by the OCA.

.. image:: https://odoo-community.org/logo.png
:alt: Odoo Community Association
:target: https://odoo-community.org

OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and
promote its widespread use.

.. |maintainer-NL66278| image:: https://github.com/NL66278.png?size=40px
:target: https://github.com/NL66278
:alt: NL66278

Current `maintainer <https://odoo-community.org/page/maintainer-role>`__:

|maintainer-NL66278|

This module is part of the `OCA/server-tools <https://github.com/OCA/server-tools/tree/19.0/fetchmail_attach_from_folder>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
5 changes: 5 additions & 0 deletions fetchmail_attach_from_folder/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).

from . import match_algorithm
from . import models
from . import wizard
20 changes: 20 additions & 0 deletions fetchmail_attach_from_folder/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Copyright - 2013-2026 Therp BV <https://therp.nl>.
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
{
"name": "Email gateway - folders",
"summary": "Attach mails in an IMAP folder to existing objects",
"version": "19.0.1.0.0",
"author": "Therp BV,Odoo Community Association (OCA)",
"maintainers": ["NL66278"],
"website": "https://github.com/OCA/server-tools",
"license": "AGPL-3",
"category": "Tools",
"depends": ["mail"],
"data": [
"views/fetchmail_server.xml",
"wizard/attach_mail_manually.xml",
"security/ir.model.access.csv",
],
"installable": True,
"auto_install": False,
}
Loading
Loading