Commit graph

39 commits

Author SHA1 Message Date
86cc27e918 lacre.repositories: Configure SQLAlchemy connection pooling
Provide 3 new configuration parameters in database section:

- max_connection_age --- number of seconds before an idle connection is
  "recycled", i.e. replaced with a new one;

- pool_size --- number of simultaneous connections kept in the pool;

- max_overflow --- maximum number of simultaneous connections we could make to
  the database.

Update sample config, including links to documentation.
2023-12-16 23:32:27 +01:00
8cc1136a90 lacre.daemon: When keys can't be loaded, fail gracefully
- Introduce '[daemon]bounce_on_keys_missing' option to let the admin decide if
  they want Lacre to deliver cleartext message when identity database is
  unreachable or throws exceptions.  It defaults to 'no'.

- In IdentityRepository, use option mentioned above to decide what to do when
  an exception is caught.
2023-12-10 21:27:05 +01:00
4da4019321 Log message defects and optionally some non-PII headers 2023-05-08 22:14:24 +02:00
5eb687f0cd Add config parameter to set DATA size limit
Expose a new parameter: [daemon]max_data_bytes, to limit Lacre's memory
usage and allow processing of messages larger than 32MB (which is the
default limit).
2023-05-08 22:14:24 +02:00
37335de329 Remove documentation and sample config for decryption
We no longer support decrypting emails, so:

- Remove parameters from exmaple configuration file.
- Remove relevant section from installation instructions (INSTALL.md).
2023-03-11 12:30:24 +01:00
641253b3ec Make key-loading async, remove unused parameter 2022-10-19 18:36:23 +00:00
d7e4947afd Add cache validity configuration parameter
Also, log basic information in KeyCache and provide load() and reload()
operations to make daemon's code cleaner.
2022-10-19 18:36:23 +00:00
6455c1a280 [daemon] Add configuration, implement no-op filter
- Add a "mailop" module to define mail operations.  Each should inherit from
MailOperation class (which just defines the contract).

- Make lacre.mailgate.delivery_plan always return KeepIntact strategy to have
a daemon that just forwards messages without modifying them.

- Add sample configuration.

- Include daemon configuration in mandatory parameter check.
2022-10-19 18:36:23 +00:00
d27eef911a Update sample config
- Include helpful information about webpanel_url.
- Remove unused database settings.
- Add a hint about MySQL url to the database section.
2022-05-14 11:40:20 +02:00
7a8720c142 Update installation instructions, add sample logging config 2022-05-11 19:15:59 +02:00
75ccfb0850 Use logging module
- Replace custom logging code with calls to logging module.
- Use logging.config to provide configuration parameters.

To make Lacre's logging more flexible, use fileConfig from logging.config to
set up all parameters.  If the configuration file is missing, use dictConfig
with hardcoded reasonable defaults.
2022-05-06 19:39:56 +02:00
7aff414fb7 Use SQLAlchemy to access database
- Replace hardcoded MySQLdb package with sqlalchemy to support other RDBMS
backends.

- Provide a script that could eventually replace schema.sql (schema.py).

- Update sample configuration.
2022-04-23 09:39:20 +02:00
86b725349f
added smtp auth to cron.py 2022-04-20 13:01:58 +02:00
Mukesh Sai Kumar
0b92307b23
Added starttls support for SMTP 2019-05-24 23:20:34 +05:30
fkrone
9cfbd24bdc All mails from cron script are now passed through the GPG-Mailgate so they are encrypted if possible. 2015-06-04 20:13:04 +02:00
fkrone
11f70fb241 Added possibility to define a regex for finding recipients to decrypt for and also adding possibility to use default keys for domain ranges 2015-05-29 23:13:05 +02:00
fkrone
5fdbabc3b3 Disable PGP/INLINE decryption by default. It does work, however, it has some drawbacks (e.g. content type for files getting lost). 2015-05-25 22:49:42 +02:00
fkrone
2c0e342e5e Support for decrypting PGP encrypted mails. However, it has some drawbacks and might cause some security issues. So before using it please read carefully through the installation instructions. 2015-05-25 20:24:37 +02:00
fkrone
49e0068f04 Bugfix: Typo in config file 2015-03-16 13:55:11 +01:00
fkrone
a766a9bd4a Refactored code (and also optimizing code).
Changes while refactoring: The gateway now handles mail addresses case sensitivity compitable to RFC 2821 as default.
2015-03-02 13:13:30 +01:00
fkrone
60356f3a22 Fix: It does work for S/MIME. Forgot to remove this line. 2015-02-27 16:33:49 +01:00
fkrone
c022a2fe9d Added option to overwrite default PGP style (inline or PGP/MIME) for defined recipients (useful if you have some recipients which can't handle one style). 2015-02-19 16:40:48 +01:00
fkrone
228d43e936 Making GPG-Mailgate compatible with RFC 2821 (Simple Mail Transfer Protocol). The previous reverted commits made the gateway incompatible with the RFC. However, compatibility has to be activated in the settings. Most mail servers ignore the case sensitivity of the mail addresses, so this should not be a big issue.
A quick solution to make the S/MIME functionality compatible with the RFC was not found so this needs to be fixed later.
2015-02-14 19:34:26 +01:00
fkrone
c059cfe63b Merged change:
62f60f0592
( Added option to convert text/plain source email into MIME/PGP attachment style during encryption.

Useful if sending to recipient that can't handle the PGP-inline style. )
2015-02-14 17:07:02 +01:00
fkrone
f7e3b16069 Changes to cron, register-handler, settings and templates:
- Cron now notifies user what happened (key successfully added/deleted or error)
- More options to customize templates
- Separating concepts in settings (S/MIME, templates)
- Register-handler now only informs on failed PGP submissions (reduce mails to user and false positive mails)
2015-01-31 16:08:12 +01:00
kflux
9ce5878e78 Update gpg-mailgate.conf.sample 2014-03-02 14:09:19 +01:00
kflux
19e89ad032 Update gpg-mailgate.conf.sample 2014-03-02 14:07:08 +01:00
kflux
155ac099bc added S/MIME configs 2014-02-26 01:54:24 +01:00
perennate
9ac151f438 Merge https://github.com/ajgon/gpg-mailgate
Conflicts:
	INSTALL
	README.md
	gpg-mailgate.conf.sample
	gpg-mailgate.py
2013-11-03 10:38:04 -05:00
perennate
b6e4a321e6 Add keymap_only configuration, to ignore public_keys list.
This means the keymap will be exclusively used to determine which email addresses to sign with which keys.
2013-11-03 15:14:17 +01:00
perennate
cfeaa79c2a Add description in configuration file of each setting. 2013-11-03 15:14:11 +01:00
perennate
f8711583a3 Remove useless domains configuration setting. 2013-11-03 15:13:34 +01:00
uragit
42caa47f5b Added syslog and verbose options for config file. 2013-10-12 01:26:55 -07:00
perennate
98b4e341cf Initial commit for gpg-mailgate-web addition. 2013-09-26 19:40:27 -04:00
perennate
a035df85be Add keymap_only configuration, to ignore public_keys list.
This means the keymap will be exclusively used to determine which email addresses to sign with which keys.
2013-09-23 23:28:35 -04:00
perennate
cf79838484 Add description in configuration file of each setting. 2013-09-22 15:40:33 -04:00
perennate
003c7fe62b Remove useless domains configuration setting. 2013-09-22 15:13:15 -04:00
Igor Rzegocki
a87ab9582e Fixed config example 2013-04-02 21:38:07 +02:00
mcmaster
782cda3639 GPG Mailgate 0.1 2010-01-20 15:53:25 -05:00