Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
80 commits
Select commit Hold shift + click to select a range
3d9aa88
[ADD] make retrieval configurable per folder; use msgid to exclude
hbrunn Mar 26, 2013
a8df45d
[MRG] lp:~therp-nl/therp-addons/fetchmail_attach_from_folder rev 89
hbrunn Mar 26, 2013
f65cd0c
[IMP] - convert mailadresses to lowercase to increase change for match
NL66278 Apr 4, 2013
2a723f3
[IMP] autopep8
hbrunn Apr 5, 2013
8bb3958
[ADD] msg_state field for folders - set the state of messages fetched
hbrunn Apr 15, 2013
86db0b1
[IMP] refactored fetch_mail
hbrunn Apr 15, 2013
9eca001
[FIX] attach mail attachments to matched object in non-OpenERP case
hbrunn Apr 15, 2013
5981f06
[IMP] make fetch_mail's refactoring more useful by returning the ids of
hbrunn Apr 16, 2013
d959077
[FIX] don't rollback() transation, use savepoint. This fixes concurrency
hbrunn Apr 18, 2013
08b5795
[REVERT] merged and pushed on 7.0 instead of 6.1 branch...
gurneyalex Apr 26, 2013
6ad5812
[ADD] port fetchmail_attach_from_folder to 7.0
hbrunn Jan 16, 2014
0187c17
[IMP] remove deprecated type field for views
hbrunn Jan 27, 2014
7dda4ed
[IMP] adjust view definitions to 7.0
hbrunn Feb 3, 2014
bdb2537
move all modules to __unported__ on master branch and set installable…
sbidoul Jul 12, 2014
93dd6bb
[REN] preliminary migration of fetchmail_attach_from_folder
hbrunn Jan 27, 2015
d53e153
[IMP] make manual attach wizard usable again
hbrunn Jan 27, 2015
43dd541
[ADD] placeholders
hbrunn Jan 27, 2015
418605e
[FIX] rename OpenERP->Odoo
hbrunn Jan 27, 2015
6c11bcf
[IMP] readme
hbrunn Jan 27, 2015
4636ceb
[IMP] use a dedicated logger
hbrunn Jan 31, 2015
485b684
[FIX] we want object_id not to be required
hbrunn Jan 31, 2015
1eb57b4
[ADD] test matching algorithms
hbrunn Jan 31, 2015
23a9c4d
Add license key in __openerp__.py
yvaucher Feb 6, 2015
f31d802
Add OCA as author of OCA addons
gurneyalex Mar 2, 2015
96eb70b
Remove auto_install on fetchmail_attach_from_folder
Apr 27, 2015
3b73be8
Add bug tracker link on README.rst
yvaucher May 22, 2015
03abf70
[FIX] honor sequence
hbrunn Jul 16, 2015
3ef5d00
[ADD] allow to deactivate folders
hbrunn Jul 16, 2015
cf65313
[UPD] prefix versions with 8.0
sbidoul Oct 9, 2015
cd5b2b3
[MIG] Make modules uninstallable
pedrobaeza Oct 14, 2015
c0e53bb
[SEC] fetchmail_attach_from_folder: fix unsafe eval
gurneyalex Feb 15, 2016
27110d8
[MIG] Rename manifest files
pedrobaeza Oct 6, 2016
a094b6b
[MIG] fetchmail_attach_from_folder. Migration to 10.0.
NL66278 Mar 1, 2018
38028fd
[FIX] fetchmail_attach_from_folder. Refactor for more testing.
NL66278 Mar 26, 2018
bda5d82
[FIX] fetchnail_attach_from_folder. Can not pass object to action con…
NL66278 Apr 10, 2018
fa38901
[IMP] fetchmail_attach_from_folder. Separate confirm for folder.
NL66278 Jun 6, 2018
62e37e6
[IMP] fetchmail_attach_from_folder. Show available folders.
NL66278 Jun 6, 2018
de02a89
[IMP] fetchmail_attach_from_folder. Button to retrieve single folder.
NL66278 Jun 7, 2018
d70a09f
[RFR] Override hook
StefanRijnhart Oct 29, 2015
5b82d99
[IMP] Full email preview when attaching manually
StefanRijnhart Oct 29, 2015
4d08c0d
[FIX] Some fields are not there if the client asks for a search form
StefanRijnhart Oct 29, 2015
8b8d400
[FIX] replace simplejson dependency with json
ntsirintanis Jul 10, 2019
3d8a0c0
[IMP] fetchmail_attach_from_folder: pre-commit stuff
NL66278 Jan 8, 2024
270cf25
[MIG] fetchmail_attach_from_folder: Migration to 16.0
NL66278 Jan 8, 2024
13d1803
[MIG] fetchmail_*: adapt tests
NL66278 Jan 9, 2024
23bcaa0
[FIX] fetchmail_*: adapt to Odoo 16.0 and python 3.x
NL66278 Jan 10, 2024
97fe72a
[IMP] fetchmail_.._folder: optionally archive messages automatically
NL66278 Apr 25, 2024
2b227e0
[IMP] fetch..._folder: Add contributor and maintainer
NL66278 May 11, 2024
1d7dd75
[FIX] fetchmaeil..folder: adapt test to current demo data
NL66278 May 11, 2024
1d24cfc
[FIX] fetchmail..folder: handle non standard matching
NL66278 May 13, 2024
fd25cd9
[IMP] outlook as server_type
Jul 23, 2024
0dc1a60
[IMP] Added the possibility to indicate a server action to be executed
zamberjo Jul 23, 2024
d7e63dc
[IMP] Add option to read e-mails unseen
Jul 24, 2024
7d4c198
[MIG] fetchmail_attach_from_folder: Migration to 17.0
Oct 14, 2024
9d9da8d
[UPD] Update fetchmail_attach_from_folder.pot
Mar 12, 2025
4d3456c
[BOT] post-merge updates
OCA-git-bot Mar 12, 2025
5bbead9
[IMP] fetchmail_attach_from_folder: pre-commit auto fixes
Alexgars73 Jul 17, 2025
5897593
[MIG] fetchmail_attach_from_folder: Migration to 18.0
Alexgars73 Jul 17, 2025
8f96888
[UPD] Update fetchmail_attach_from_folder.pot
Aug 25, 2025
fa713fe
[BOT] post-merge updates
OCA-git-bot Aug 25, 2025
8201c69
Translated using Weblate (Italian)
mymage Sep 18, 2025
e56e0a0
Translated using Weblate (Italian)
mymage Oct 16, 2025
8c7113b
[FIX] fetchmail_attach_from_folder tests: mock expunge()
thomaspaulb Jan 25, 2026
367527c
[FIX] fetchmail_attach_from_folder: be able to open form view even wh…
thomaspaulb Jan 9, 2025
7f7ebbb
[FIX] fetch...folder: use message uid's not sequence
NL66278 Aug 22, 2024
59a84de
[FIX] fetch...folder: test message archiving
NL66278 Aug 23, 2024
ef2ad4c
[FIX] fetch..folder: adapt manual wizard to message_uids
NL66278 Jan 26, 2026
0e9d6cf
[UPD] Update fetchmail_attach_from_folder.pot
Jan 28, 2026
13c689c
[BOT] post-merge updates
OCA-git-bot Jan 28, 2026
c91205c
Update translation files
weblate Jan 28, 2026
afe1074
Translated using Weblate (Italian)
mymage Jan 29, 2026
a10e004
[18.0][FIX] fetchmail_attach_from_folder: add missing keyword argument
adrip-s73 Dec 10, 2025
747a942
[BOT] post-merge updates
OCA-git-bot Feb 9, 2026
80439ce
Update fetchmail_server_folder
ikus060 Mar 6, 2025
b993c65
[RFR] fetch..folder: put each test class in own file
NL66278 Feb 9, 2026
4b074f7
[TST] fetch..folder: Add tests for criteria and no match
NL66278 Feb 9, 2026
17e46d5
[MIG] fetchmail_attach_from_folder: migrate to 19.0
NL66278 Mar 19, 2026
f5b3c44
Migrate, move and rename fetchmail_attach_from_folder
NL66278 Jul 13, 2026
322b16e
[IMP] ..._imap_folder: do not hide connection error
NL66278 Jul 14, 2026
fe49e30
[TST] fetchmail_from_imap_folder: more tests
NL66278 Jul 13, 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
151 changes: 151 additions & 0 deletions fetchmail_from_imap_folder/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,151 @@
.. 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:6b1b3b898180928b195027fc3ce46158e8409c987d40d1ecb2cd6cca648c75f9
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. |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%2Fmail-lightgray.png?logo=github
:target: https://github.com/OCA/mail/tree/19.0/fetchmail_from_imap_folder
:alt: OCA/mail
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/mail-19-0/mail-19-0-fetchmail_from_imap_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/mail&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/mail/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/mail/issues/new?body=module:%20fetchmail_from_imap_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
* Open Eye Development

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

- Holger Brunn hbrunn@therp.nl
- Ronald Portier ronald@openeyedev.eu
- 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/mail <https://github.com/OCA/mail/tree/19.0/fetchmail_from_imap_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_from_imap_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
21 changes: 21 additions & 0 deletions fetchmail_from_imap_folder/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Copyright - 2013-2026 Therp BV <https://therp.nl>.
# Copyright - 2026 Open Eye Development <https://openeyedev.eu>.
# 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,Open Eye Development,Odoo Community Association (OCA)",
"maintainers": ["NL66278"],
"website": "https://github.com/OCA/mail",
"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