Skip to content

Marge #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 41 commits into
base: master
Choose a base branch
from
Open

Marge #1

wants to merge 41 commits into from

Conversation

lcges
Copy link
Owner

@lcges lcges commented Apr 1, 2019

No description provided.

flashmob and others added 30 commits March 9, 2018 00:04
* Fixes issue #101 - Gateway Timeout deadlock.

* update tests
* Disable empty MAIL FROM check after DATA

According to rfc2821, all undeliverable mail notification messages use a
null return path and will otherwise be rejected by the server.

* Fix tests so they work without the MAIL FROM check
* backends: Replace MySQL backend with generic SQL backend

This replaces the `mysql` backend with an `sql` backend to avoid a
direct dependency for clients that don't need this plugin and to allow
alternative SQL drivers to be used instead.

* backends: Extend MySQL/Redis backend to support any SQL database

This decouples the `GuerrillaRedisDB` backend from MySQL to avoid a
direct dependency for clients that don't need this plugin and to allow
alternative SQL drivers to be used instead.

* backends: Add a test suite for the SQL backend

This provides some more confidence in the behaviour of the SQL
test. By default, it is skipped, but can be enabled by providing
appropriate configuration.

For example:

	go test -run SQL -sql-dsn="test:secret@(127.0.0.1:3306)/guerrilla_test"

The test itself does no setup, so a database, user, and table must be
created in advance:

	CREATE DATABASE IF NOT EXISTS `guerrilla_test`;
        USE `guerrilla_test`;
	CREATE TABLE IF NOT EXISTS `test` (
	  `mail_id` BIGINT(20) unsigned NOT NULL AUTO_INCREMENT,
	  `message_id` varchar(256) character set latin1 NOT NULL COMMENT 'value of [Message-ID] from headers',
	  `date` datetime NOT NULL,
	  `from` varchar(256) character set latin1 NOT NULL COMMENT 'value of [From] from headers or return_path (MAIL FROM) if no header present',
	  `to` varchar(256) character set latin1 NOT NULL COMMENT 'value of [To] from headers or recipient (RCPT TO) if no header present',
	  `reply_to` varchar(256) NULL COMMENT 'value of [Reply-To] from headers if present',
	  `sender` varchar(256) NULL COMMENT 'value of [Sender] from headers of present',
	  `subject` varchar(255) NOT NULL,
	  `body` varchar(16) NOT NULL,
	  `mail` longblob NOT NULL,
	  `spam_score` float NOT NULL,
	  `hash` char(32) character set latin1 NOT NULL,
	  `content_type` varchar(64) character set latin1 NOT NULL,
	  `recipient` varchar(255) character set latin1 NOT NULL COMMENT 'set by the RCPT TO command.',
	  `has_attach` int(11) NOT NULL,
	  `ip_addr` varbinary(16) NOT NULL,
	  `return_path` VARCHAR(255) NOT NULL COMMENT 'set by the MAIL FROM command. Can be empty to indicate a bounce, i.e <>',
	  `is_tls` BIT(1) DEFAULT b'0' NOT NULL,
	  PRIMARY KEY  (`mail_id`),
            KEY `to` (`to`),
	  KEY `hash` (`hash`),
	  KEY `date` (`date`)
        ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

	GRANT SELECT ON guerrilla_test.* TO 'test'@'localhost' IDENTIFIED BY 'secret';
	GRANT INSERT ON guerrilla_test.* TO 'test'@'localhost' IDENTIFIED BY 'secret';
* Fixed case issue with logrus (GH Bug #87)
Issue #103
* Iconv is now a soft dependency
* Adds a new mail/iconv package and setup an init hook to use iconv whenever it's imported
* Adds a new mail/encoding using same pattern as above (decoder from golang.org/x/text package)
* update envelope.go to use the default charset converter in golang
* update serve.go so that it uses mail/encoding
* update tests

* update glide lock
* redigo has changed repo

* Update glide.lock
* Issue #28 - add new TLS configuration options 

Adds ability to select ciphers, protocols, curves, client auth policy and set a custom certificate authority pool

Note: This change breaks existing TLS configurations, please see docs for the new TLS options https://github.com/flashmob/go-guerrilla/wiki/Configuration
Wildcards will also allow to use subdomains, eliminating the need for PR #81
add ability for backends to specify a custom return code, fixes #78
recommenced > recommended
* More strict MAIL and RCPT command parsing. Addresses issue #120

* optimize command parsing: use a bytes slice instead of allocating strings or copying buffers

With the following loosening to allow for more email to get through:

- tolerate space before opening <
- local part may be 128 characters, rather than the 64 limit
* Codebase: fix code style issues, error checking where possible, fix #96 
* Tests: fix race conditions in tests, which caused random failures in the past, fix #96 
* Cross-platform compatibility: Open-file-limit test, capture os.kill signal for maximal compatibility
* Header parsing: increase max header size to 4kb
* Header parsing: avoid extra copy when parsing headers
Fix EOF when parsing the envelope headers
lord-alfred and others added 11 commits August 20, 2019 07:47
* add go modules cache directive in .travis.yml

* add go version 1.12 in .travis.yml

* remove outdated exports from .travis.yml
* add able to configure DB connection limits in sql backend

* fix formatting in changed code

* improve MaxConnLifetime configuration parameter

* hotfix config option in comment
…180)

- bug fix: server-log was incorrectly pointing to the main-log, resulting in a blank server log (reported in issue #179)
- update Logrus to v1.4.2
- small code clean-ups
- add `dep ensure` to tarvis.yml file
- Parser captures quoted local-parts without the escape characters
- mail.Address.String() know when to quote local-part, 
- server's `allowsHost` function is ipv6 address aware (addresses specified in the config will get normalized to their ipv6 simplest form, addresses parsed from RCPT and MAIL commands will have ipv6 normalized)
- if `<postmaster>` is used in the RCPT TO (without a host), then new functionality was added to assume that the host is assumed to be the Hostname setting for the Server
- HELO/EHLO argument validation. #200
- The “header” processor populates “Received:” headers wrongly. #198
-  tiny bug in “p_redis.go”. #196
- “MimeHeaderDecode” (envelope.go) returns an incorrectly-spaced string. #195
- go-guerrilla cannot properly handle some valid addresses. #199
- adds TLS 1.3 and new cipher-suites as config options
- remove SSLv3 and the TLS_FALLBACK_SCSV ciphersuite from the sample configuration
- removes SSLv3 and the TLS_FALLBACK_SCSV ciphersuite when building with Go 1.14 or above
- remove Go 1.10 and Go 1.9 from Travis CI tests, add Go 1.13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.