| REPOSITORY | |
|---|---|
| REPOSITORY | OCA/server-tools |
| GIT | |
| GIT | https://github.com/OCA/server-tools.git |
| GIT FOLDER | |
| GIT FOLDER | https://github.com/OCA/server-tools/tree/18.0/mail_cleanup |
| VERSION | |
| VERSION | 1.0.2 |
| CATEGORY | |
| CATEGORY | Tools |
| LICENSE | |
| LICENSE | AGPL-3 |
| APPLICATION | |
| APPLICATION | No |
| AUTO-INSTALLABLE | |
| AUTO-INSTALLABLE | No |
| AUTHORS | |
| AUTHORS | Odoo Community Association (OCA), Camptocamp |
| MAINTAINERS | |
| MAINTAINERS | Odoo Community Association (OCA), Camptocamp |
| COMMITTERS | |
| COMMITTERS | Denis Leemann, Weblate, OCA-git-bot, oca-ci, Ricardoalso |
| WEBSITE | |
| WEBSITE | https://github.com/OCA/server-tools |
| LAST TRACKING UPDATE | |
| LAST TRACKING UPDATE | 2026-07-06 19:30:07 |
| ODOO DEPENDENCIES | |
| ODOO DEPENDENCIES |
OCA/server-env: - mail_environment - server_environment odoo/odoo: - base - base_setup - web - bus - web_tour - html_editor - base_sparse_field |
| PYTHON DEPENDENCIES | |
| PYTHON DEPENDENCIES | Not have |
| SYSTEM DEPENDENCIES | |
| SYSTEM DEPENDENCIES | Not have |
| DESCRIPTION | |
| DESCRIPTION | ## This module allows to: - mark e-mails older than x days as read, - move those messages in a specific folder, - remove messages older than x days on IMAP servers, just before fetching them. Since the main "mail" module does not mark unroutable e-mails as read, this means that if junk mail arrives in the catch-all address without any default route, fetching newer e-mails will happen after re-parsing those unroutable e-mails. |
| XML ID | Name | Model | Type | Status |
|---|---|---|---|---|
inherit_fetchmail_cleanup |
inherit_fetchmail_for cleanup | fetchmail.server | field | Inherits mail.view_email_server_form |
cleanup_days
Integer
help='Number of days before marking an e-mail as read'
string='Expiration days'
cleanup_folder
Char
help='Folder where an e-mail marked as read will be moved.'
string='Expiration folder'
purge_days
Integer
help='Number of days before removing an e-mail'
string='Deletion days'
fetch_mail(self, raise_exception=True)
| REPOSITORY | |
|---|---|
| REPOSITORY | OCA/server-tools |
| GIT | |
| GIT | https://github.com/OCA/server-tools.git |
| GIT FOLDER | |
| GIT FOLDER | https://github.com/OCA/server-tools/tree/16.0/mail_cleanup |
| VERSION | |
| VERSION | 1.0.0 |
| CATEGORY | |
| CATEGORY | Tools |
| LICENSE | |
| LICENSE | AGPL-3 |
| APPLICATION | |
| APPLICATION | No |
| AUTO-INSTALLABLE | |
| AUTO-INSTALLABLE | No |
| AUTHORS | |
| AUTHORS | Odoo Community Association (OCA), Camptocamp |
| MAINTAINERS | |
| MAINTAINERS | Odoo Community Association (OCA), Camptocamp |
| COMMITTERS | |
| COMMITTERS | Weblate, OCA-git-bot, oca-ci, ntsirintanis |
| WEBSITE | |
| WEBSITE | https://github.com/OCA/server-tools |
| LAST TRACKING UPDATE | |
| LAST TRACKING UPDATE | 2026-07-06 00:53:53 |
| ODOO DEPENDENCIES | |
| ODOO DEPENDENCIES |
OCA/server-env: - mail_environment - server_environment odoo/odoo: - base - base_setup - web - bus - web_tour - base_sparse_field |
| PYTHON DEPENDENCIES | |
| PYTHON DEPENDENCIES | Not have |
| SYSTEM DEPENDENCIES | |
| SYSTEM DEPENDENCIES | Not have |
| DESCRIPTION | |
| DESCRIPTION | |
| XML ID | Name | Model | Type | Status |
|---|---|---|---|---|
inherit_fetchmail_cleanup |
inherit_fetchmail_for cleanup | fetchmail.server | field | Inherits mail.view_email_server_form |
cleanup_days
Integer
help='Number of days before marking an e-mail as read'
string='Expiration days'
cleanup_folder
Char
help='Folder where an e-mail marked as read will be moved.'
string='Expiration folder'
purge_days
Integer
help='Number of days before removing an e-mail'
string='Deletion days'
fetch_mail(self)
| REPOSITORY | |
|---|---|
| REPOSITORY | OCA/server-tools |
| GIT | |
| GIT | https://github.com/OCA/server-tools.git |
| GIT FOLDER | |
| GIT FOLDER | https://github.com/OCA/server-tools/tree/14.0/mail_cleanup |
| VERSION | |
| VERSION | 1.0.0 |
| CATEGORY | |
| CATEGORY | Tools |
| LICENSE | |
| LICENSE | AGPL-3 |
| APPLICATION | |
| APPLICATION | No |
| AUTO-INSTALLABLE | |
| AUTO-INSTALLABLE | No |
| AUTHORS | |
| AUTHORS | Odoo Community Association (OCA), Camptocamp |
| MAINTAINERS | |
| MAINTAINERS | Odoo Community Association (OCA), Camptocamp |
| COMMITTERS | |
| COMMITTERS | Weblate, OCA-git-bot, oca-ci, HoDacSon |
| WEBSITE | |
| WEBSITE | https://github.com/OCA/server-tools |
| LAST TRACKING UPDATE | |
| LAST TRACKING UPDATE | 2026-07-06 00:41:05 |
| ODOO DEPENDENCIES | |
| ODOO DEPENDENCIES |
OCA/server-env: - mail_environment - server_environment odoo/odoo: - fetchmail - base - base_setup - web - bus - web_tour - base_sparse_field |
| PYTHON DEPENDENCIES | |
| PYTHON DEPENDENCIES | Not have |
| SYSTEM DEPENDENCIES | |
| SYSTEM DEPENDENCIES | Not have |
| DESCRIPTION | |
| DESCRIPTION | |
| XML ID | Name | Model | Type | Status |
|---|---|---|---|---|
inherit_fetchmail_cleanup |
inherit_fetchmail_for cleanup | fetchmail.server | field | Inherits fetchmail.view_email_server_form |
cleanup_days
Integer
help='Number of days before marking an e-mail as read'
string='Expiration days'
cleanup_folder
Char
help='Folder where an e-mail marked as read will be moved.'
string='Expiration folder'
purge_days
Integer
help='Number of days before removing an e-mail'
string='Deletion days'
fetch_mail(self)
| REPOSITORY | |
|---|---|
| REPOSITORY | OCA/server-tools |
| GIT | |
| GIT | https://github.com/OCA/server-tools.git |
| GIT FOLDER | |
| GIT FOLDER | https://github.com/OCA/server-tools/tree/12.0/mail_cleanup |
| VERSION | |
| VERSION | 1.0.0 |
| CATEGORY | |
| CATEGORY | Tools |
| LICENSE | |
| LICENSE | AGPL-3 |
| APPLICATION | |
| APPLICATION | No |
| AUTO-INSTALLABLE | |
| AUTO-INSTALLABLE | No |
| AUTHORS | |
| AUTHORS | Odoo Community Association (OCA), Camptocamp |
| MAINTAINERS | |
| MAINTAINERS | Odoo Community Association (OCA), Camptocamp |
| COMMITTERS | |
| COMMITTERS | jcoux, oca-travis, Weblate, OCA-git-bot |
| WEBSITE | |
| WEBSITE | https://github.com/OCA/server-tools |
| LAST TRACKING UPDATE | |
| LAST TRACKING UPDATE | 2026-07-06 00:29:22 |
| ODOO DEPENDENCIES | |
| ODOO DEPENDENCIES |
OCA/server-env: - mail_environment - server_environment odoo/odoo: - fetchmail - base - base_setup - web - bus - web_tour - base_sparse_field |
| PYTHON DEPENDENCIES | |
| PYTHON DEPENDENCIES | Not have |
| SYSTEM DEPENDENCIES | |
| SYSTEM DEPENDENCIES | Not have |
| DESCRIPTION | |
| DESCRIPTION | |
| XML ID | Name | Model | Type | Status |
|---|---|---|---|---|
inherit_fetchmail_cleanup |
inherit_fetchmail_for cleanup | fetchmail.server | field | Inherits fetchmail.view_email_server_form |
cleanup_days
Integer
help='Number of days before marking an e-mail as read'
string='Expiration days'
cleanup_folder
Char
help='Folder where an e-mail marked as read will be moved.'
string='Expiration folder'
purge_days
Integer
help='Number of days before removing an e-mail'
string='Deletion days'
fetch_mail(self)
| REPOSITORY | |
|---|---|
| REPOSITORY | OCA/server-tools |
| GIT | |
| GIT | https://github.com/OCA/server-tools.git |
| GIT FOLDER | |
| GIT FOLDER | https://github.com/OCA/server-tools/tree/11.0/mail_cleanup |
| VERSION | |
| VERSION | 1.0.0 |
| CATEGORY | |
| CATEGORY | Tools |
| LICENSE | |
| LICENSE | AGPL-3 |
| APPLICATION | |
| APPLICATION | No |
| AUTO-INSTALLABLE | |
| AUTO-INSTALLABLE | No |
| AUTHORS | |
| AUTHORS | Odoo Community Association (OCA), Camptocamp |
| MAINTAINERS | |
| MAINTAINERS | Odoo Community Association (OCA), Camptocamp |
| COMMITTERS | |
| COMMITTERS | Akim Juillerat, OCA Transbot, oca-travis, Weblate, OCA-git-bot, Artem Kostyuk, oca-ci |
| WEBSITE | |
| WEBSITE | https://github.com/OCA/server-tools |
| LAST TRACKING UPDATE | |
| LAST TRACKING UPDATE | 2026-07-06 00:24:00 |
| ODOO DEPENDENCIES | |
| ODOO DEPENDENCIES |
OCA/server-env: - mail_environment - server_environment odoo/odoo: - fetchmail - base - base_setup - web - bus - web_tour - base_sparse_field |
| PYTHON DEPENDENCIES | |
| PYTHON DEPENDENCIES | Not have |
| SYSTEM DEPENDENCIES | |
| SYSTEM DEPENDENCIES | Not have |
| DESCRIPTION | |
| DESCRIPTION | |
| XML ID | Name | Model | Type | Status |
|---|---|---|---|---|
inherit_fetchmail_cleanup |
inherit_fetchmail_for cleanup | fetchmail.server | field | Inherits fetchmail.view_email_server_form |
cleanup_days
Integer
help='Number of days before marking an e-mail as read'
string='Expiration days'
cleanup_folder
Char
help='Folder where an e-mail marked as read will be moved.'
string='Expiration folder'
purge_days
Integer
help='Number of days before removing an e-mail'
string='Deletion days'
fetch_mail(self)
| REPOSITORY | |
|---|---|
| REPOSITORY | OCA/server-tools |
| GIT | |
| GIT | https://github.com/OCA/server-tools.git |
| GIT FOLDER | |
| GIT FOLDER | https://github.com/OCA/server-tools/tree/9.0/mail_cleanup |
| VERSION | |
| VERSION | 1.0.0 |
| CATEGORY | |
| CATEGORY | Tools |
| LICENSE | |
| LICENSE | AGPL-3 |
| APPLICATION | |
| APPLICATION | No |
| AUTO-INSTALLABLE | |
| AUTO-INSTALLABLE | No |
| AUTHORS | |
| AUTHORS | Odoo Community Association (OCA), Camptocamp |
| MAINTAINERS | |
| MAINTAINERS | Odoo Community Association (OCA), Camptocamp |
| COMMITTERS | |
| COMMITTERS | Stéphane Bidoul (ACSONE), OCA Transbot, Dave Lasley, oca-travis, OCA-git-bot |
| WEBSITE | |
| WEBSITE | https://odoo-community.org |
| LAST TRACKING UPDATE | |
| LAST TRACKING UPDATE | 2026-07-06 00:15:22 |
| ODOO DEPENDENCIES | |
| ODOO DEPENDENCIES |
OCA/server-tools: - mail_environment - server_environment odoo/odoo: - fetchmail - base - base_setup - web_kanban - web - bus |
| PYTHON DEPENDENCIES | |
| PYTHON DEPENDENCIES | Not have |
| SYSTEM DEPENDENCIES | |
| SYSTEM DEPENDENCIES | Not have |
| DESCRIPTION | |
| DESCRIPTION | |
| XML ID | Name | Model | Type | Status |
|---|---|---|---|---|
inherit_fetchmail_cleanup |
inherit_fetchmail_for cleanup | fetchmail.server | field | Inherits mail_environment.inherit_fetchmail |
cleanup_days
Integer
compute='_get_cleanup_conf'
help='Number of days before marking an e-mail as read'
string='Expiration days'
cleanup_folder
Char
compute='_get_cleanup_conf'
help='Folder where an e-mail marked as read will be moved.'
string='Expiration folder'
purge_days
Integer
compute='_get_cleanup_conf'
help='Number of days before removing an e-mail'
string='Deletion days'
fetch_mail(self)
| REPOSITORY | |
|---|---|
| REPOSITORY | OCA/server-tools |
| GIT | |
| GIT | https://github.com/OCA/server-tools.git |
| GIT FOLDER | |
| GIT FOLDER | https://github.com/OCA/server-tools/tree/7.0/mail_cleanup |
| VERSION | |
| VERSION | 0.1 |
| CATEGORY | |
| CATEGORY | Tools |
| LICENSE | |
| LICENSE | AGPL-3 |
| APPLICATION | |
| APPLICATION | No |
| AUTO-INSTALLABLE | |
| AUTO-INSTALLABLE | No |
| AUTHORS | |
| AUTHORS | Odoo Community Association (OCA), Camptocamp |
| MAINTAINERS | |
| MAINTAINERS | Odoo Community Association (OCA), Camptocamp |
| COMMITTERS | |
| COMMITTERS | Matthieu Dietrich |
| WEBSITE | |
| WEBSITE | http://openerp.camptocamp.com |
| LAST TRACKING UPDATE | |
| LAST TRACKING UPDATE | 2026-07-06 00:07:15 |
| ODOO DEPENDENCIES | |
| ODOO DEPENDENCIES |
OCA/server-tools: - mail_environment - server_environment odoo/odoo: - base - base_setup - web_kanban - web - fetchmail - crm - base_action_rule - base_status - process - email_template - base_calendar - resource - board |
| PYTHON DEPENDENCIES | |
| PYTHON DEPENDENCIES | Not have |
| SYSTEM DEPENDENCIES | |
| SYSTEM DEPENDENCIES | Not have |
| DESCRIPTION | |
| DESCRIPTION |
.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg
:alt: License: AGPL-3
Mail cleanup
===========
This module allows to mark e-mails older than x days as read
and optionally move them on IMAP servers, just before fetching them.
Since the main "mail" module does not mark unroutable e-mails as read,
this means that if junk mail arrives in the catch-all address without
any default route, fetching newer e-mails will happen after re-parsing
those unroutable e-mails.
Configuration
=============
This module depends on ``mail_environment`` in order to add "expiration dates"
per server.
Example of a configuration file (add those values to your server)::
[incoming_mail.openerp_pop_mail1]
cleanup_days = 30 # default value
cleanup_folder = NotParsed # optional parameter
Known issues / Roadmap
======================
* None
Credits
=======
Contributors
------------
* Matthieu Dietrich <matthieu.dietrich@camptocamp.com>
Maintainer
----------
.. image:: https://odoo-community.org/logo.png
:alt: Odoo Community Association
:target: https://odoo-community.org
This module is maintained by the OCA.
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.
To contribute to this module, please visit http://odoo-community.org.
|
| XML ID | Name | Model | Type | Status |
|---|---|---|---|---|
inherit_fetchmail_cleanup |
inherit_fetchmail_for cleanup | fetchmail.server | field | Inherits mail_environment.inherit_fetchmail |
No new fields.
Public methods (1)fetch_mail(self, cr, uid, ids, context=None)
| STATUS | |
|---|---|
| STATUS | Open migration PR - not merged yet for this version |
| REPOSITORY | |
| REPOSITORY | OCA/server-tools |
| PULL REQUEST | |
| PULL REQUEST | [19.0][MIG] mail_cleanup: Migration to 19.0 (#3618) |