]> git.ipfire.org Git - thirdparty/dovecot/core.git/log
thirdparty/dovecot/core.git
7 years agolib-mail: Change rfc822_parser_context.nul_replacement_char to string
Timo Sirainen [Wed, 25 Apr 2018 11:11:43 +0000 (14:11 +0300)] 
lib-mail: Change rfc822_parser_context.nul_replacement_char to string

7 years agolib: Call module's preinit function, when loading
Sergey Kitov [Wed, 18 Apr 2018 10:30:50 +0000 (13:30 +0300)] 
lib: Call module's preinit function, when loading

7 years agoplugins/old-stats: Add old-stats preinit() which opens mail stats io.
Sergey Kitov [Fri, 9 Mar 2018 13:17:29 +0000 (15:17 +0200)] 
plugins/old-stats: Add old-stats preinit() which opens mail stats io.

7 years agodoveadm: Add rebuild attachments command
Aki Tuomi [Thu, 12 Apr 2018 11:09:10 +0000 (14:09 +0300)] 
doveadm: Add rebuild attachments command

Goes thru given mails and resets the attachment indicator.

7 years agolib-storage: Parse mail parts in mail_set_attachment_keywords if not present
Aki Tuomi [Thu, 12 Apr 2018 11:07:54 +0000 (14:07 +0300)] 
lib-storage: Parse mail parts in mail_set_attachment_keywords if not present

7 years agolib-storage: Add error reporting to mail_set_attachment_keywords
Aki Tuomi [Thu, 19 Apr 2018 07:19:15 +0000 (10:19 +0300)] 
lib-storage: Add error reporting to mail_set_attachment_keywords

7 years agodoveadm: mailbox cache decisions - Fatally fail if fields are missing
Aki Tuomi [Wed, 25 Apr 2018 08:04:08 +0000 (11:04 +0300)] 
doveadm: mailbox cache decisions - Fatally fail if fields are missing

7 years agodoveadm stats dump: Add stddev field
Timo Sirainen [Tue, 24 Apr 2018 14:22:00 +0000 (17:22 +0300)] 
doveadm stats dump: Add stddev field

Include it in default output as well.

7 years agodoveadm stats dump: Add -f <fields> parameter
Timo Sirainen [Tue, 24 Apr 2018 13:29:49 +0000 (16:29 +0300)] 
doveadm stats dump: Add -f <fields> parameter

This allows specifying which fields are wanted to be dumped.

7 years agostats: Support dumping any given percentile
Timo Sirainen [Tue, 24 Apr 2018 14:32:21 +0000 (17:32 +0300)] 
stats: Support dumping any given percentile

7 years agostats: Support dumping variance
Timo Sirainen [Tue, 24 Apr 2018 06:52:32 +0000 (09:52 +0300)] 
stats: Support dumping variance

7 years agolib-mail: message_part_*_parse_from_header() - Replace NULs with 0x80
Timo Sirainen [Tue, 24 Apr 2018 15:01:03 +0000 (18:01 +0300)] 
lib-mail: message_part_*_parse_from_header() - Replace NULs with 0x80

This avoids truncation of Content-*, Subject, Message-ID, In-Reply-To and
Date headers in IMAP ENVELOPE, BODY and BODYSTRUCTURE replies. Of course,
NULs in headers are violating RFCs already, so the previous behavior wasn't
really wrong either.

7 years agodsync: If lock file can't be created because home is missing, mkdir the home
Timo Sirainen [Tue, 24 Apr 2018 15:50:38 +0000 (18:50 +0300)] 
dsync: If lock file can't be created because home is missing, mkdir the home

7 years agolib-storage: Add mail_user_home_mkdir()
Timo Sirainen [Tue, 24 Apr 2018 15:47:28 +0000 (18:47 +0300)] 
lib-storage: Add mail_user_home_mkdir()

7 years agodoveadm: Add mailbox cache manipulation commands
Aki Tuomi [Fri, 13 Apr 2018 10:28:47 +0000 (13:28 +0300)] 
doveadm: Add mailbox cache manipulation commands

This allows changing cache decisions and dropping cache pointer
for wanted mails.

7 years agodoveadm-mail: Handle field conversion to short opt better
Aki Tuomi [Sat, 14 Apr 2018 11:31:44 +0000 (14:31 +0300)] 
doveadm-mail: Handle field conversion to short opt better

Convert non-string types as well

7 years agodoveadm save: Fix using <file without panic
Timo Sirainen [Mon, 23 Apr 2018 12:05:06 +0000 (15:05 +0300)] 
doveadm save: Fix using <file without panic

When getting input with <file with Linux/epoll, it crashed with:

Panic: epoll_ctl(add, 0) failed: Operation not permitted (fd doesn't support epoll - instead of '<file', try 'cat file|')

7 years agolib: Add test for rng
Aki Tuomi [Sun, 25 Mar 2018 16:54:48 +0000 (19:54 +0300)] 
lib: Add test for rng

7 years agolib: stats-dist - Add accessor for samples
Aki Tuomi [Sun, 25 Mar 2018 18:04:49 +0000 (21:04 +0300)] 
lib: stats-dist - Add accessor for samples

7 years agolib: stats-dist - Add variance
Aki Tuomi [Sun, 25 Mar 2018 16:59:15 +0000 (19:59 +0300)] 
lib: stats-dist - Add variance

7 years agolib: rand - Fix potential modulo bias
Aki Tuomi [Sun, 25 Mar 2018 16:49:13 +0000 (19:49 +0300)] 
lib: rand - Fix potential modulo bias

7 years agoimap-hibernate: Log error when connect(imap-master) fails
Timo Sirainen [Sun, 22 Apr 2018 10:11:16 +0000 (13:11 +0300)] 
imap-hibernate: Log error when connect(imap-master) fails

It was previously logged only with info-level.

7 years agolib-storage: Don't add trailing NUL to strings in dovecot.index.cache
Timo Sirainen [Mon, 23 Apr 2018 10:39:13 +0000 (13:39 +0300)] 
lib-storage: Don't add trailing NUL to strings in dovecot.index.cache

They are unnecessary and just unnecessarily consume disk space. The
existing reading code works even if they don't exist, so this change won't
break backwards compatibility.

7 years agolib: Mark str_append_n() deprecated
Timo Sirainen [Sat, 21 Apr 2018 13:21:33 +0000 (16:21 +0300)] 
lib: Mark str_append_n() deprecated

It was almost always used wrongly. Most of the time str_append_data()
should have been used instead. str_append_max() has the old functionality.

7 years agolib: Add ATTR_DEPRECATED macro
Timo Sirainen [Sat, 21 Apr 2018 13:19:43 +0000 (16:19 +0300)] 
lib: Add ATTR_DEPRECATED macro

7 years agoglobal: Replace str_append_n() with str_append_max()
Timo Sirainen [Sat, 21 Apr 2018 13:17:03 +0000 (16:17 +0300)] 
global: Replace str_append_n() with str_append_max()

7 years agolib-fts: fts-tokenizer-address - Cleanup NUL handling in parent_data
Timo Sirainen [Sat, 21 Apr 2018 13:07:21 +0000 (16:07 +0300)] 
lib-fts: fts-tokenizer-address - Cleanup NUL handling in parent_data

The end result is anyway that the token will be truncated at the first NUL.
This change just makes the code a bit more understandable on where the
truncation will happen.

7 years agolib: str_append_[tab]unescaped(): Don't truncate input at NULs
Timo Sirainen [Sat, 21 Apr 2018 12:44:11 +0000 (15:44 +0300)] 
lib: str_append_[tab]unescaped(): Don't truncate input at NULs

For str_append_tabunescaped() the input is supposed to have NULs already
escaped though, so it was truncating only with invalid input.

7 years agoglobal: Replace str_append_n() with str_append_data() wherever possible
Timo Sirainen [Sat, 21 Apr 2018 12:24:28 +0000 (15:24 +0300)] 
global: Replace str_append_n() with str_append_data() wherever possible

It shouldn't be possible for input to have NULs in any of these places.
This makes the extra NUL-check in str_append_n() unnecessary.

7 years agolib: Add str_append_max()
Timo Sirainen [Sat, 21 Apr 2018 13:11:48 +0000 (16:11 +0300)] 
lib: Add str_append_max()

It's otherwise the same as str_append_n(), except it takes const char* as
input instead of const void*. This, as well as its name, should make it
less likely to be used wrong when the input may legitimately have NULs.

The unit test is changed from str_append_n() to str_append_max(), because
str_append_n() will be deprecated.

7 years agolib: Improve str_append_n() comment
Timo Sirainen [Sat, 21 Apr 2018 13:10:03 +0000 (16:10 +0300)] 
lib: Improve str_append_n() comment

7 years agolib-mail: Add MESSAGE_HEADER_REPLACE_NULS_WITH_0x80 flag
Sergey Kitov [Wed, 11 Apr 2018 11:41:45 +0000 (14:41 +0300)] 
lib-mail: Add MESSAGE_HEADER_REPLACE_NULS_WITH_0x80 flag

The flag signals that input stream for message_parse_header() should replace
0x0 symbols with 0x80.

7 years agolib-mail: rfc2231_parse() - Replace NULs with 0x80
Timo Sirainen [Sat, 21 Apr 2018 13:47:16 +0000 (16:47 +0300)] 
lib-mail: rfc2231_parse() - Replace NULs with 0x80

Instead of truncating the strings at NULs.

7 years agolib-mail: message_address_parse*() - Replace NULs with 0x80
Timo Sirainen [Sat, 21 Apr 2018 13:34:05 +0000 (16:34 +0300)] 
lib-mail: message_address_parse*() - Replace NULs with 0x80

Instead of truncating the strings at NULs.

7 years agolib-mail: rfc822-parser: Add nul_replacement_char
Timo Sirainen [Sat, 21 Apr 2018 13:27:21 +0000 (16:27 +0300)] 
lib-mail: rfc822-parser: Add nul_replacement_char

7 years agolib-mail: rfc822-parser: Strip away folding whitespace from comments
Timo Sirainen [Sat, 21 Apr 2018 10:46:21 +0000 (13:46 +0300)] 
lib-mail: rfc822-parser: Strip away folding whitespace from comments

7 years agolib-mail: rfc822-parser: Improve domain-literal parsing
Timo Sirainen [Sat, 21 Apr 2018 10:28:34 +0000 (13:28 +0300)] 
lib-mail: rfc822-parser: Improve domain-literal parsing

Strip away folding whitespace. Treat any extra '[' as an error.

7 years agolib-mail: rfc822-parser: Don't allow preserving escaped [CR]LF
Timo Sirainen [Sat, 21 Apr 2018 10:05:49 +0000 (13:05 +0300)] 
lib-mail: rfc822-parser: Don't allow preserving escaped [CR]LF

It's not valid to have "\<CR>" or "\<LF>", so the old behavior isn't really
wrong either. However, rfc822_parse_quoted_string() callers are more likely
to expect that the output won't contain any [CR]LF so this new behavior is
a bit better.

7 years agolib-mail: Change rfc822_parse_content_param() API to allow NULs in value
Timo Sirainen [Sat, 21 Apr 2018 09:47:22 +0000 (12:47 +0300)] 
lib-mail: Change rfc822_parse_content_param() API to allow NULs in value

This was the only function in rfc822-parser.h that wasn't NUL-safe.
This won't fix anything, but it makes the rfc822-parser.h API fully
consistent with the NUL handling.

Normally rfc2231_parse() should be called instead of calling
rfc822_parse_content_param() directly, so this shouldn't break any plugins.

7 years agofts-squat: Fix truncating headers at NULs while indexing
Timo Sirainen [Sat, 21 Apr 2018 13:05:16 +0000 (16:05 +0300)] 
fts-squat: Fix truncating headers at NULs while indexing

7 years agologin-common: Consistently truncate client SASL input at first NUL
Timo Sirainen [Sat, 21 Apr 2018 13:03:42 +0000 (16:03 +0300)] 
login-common: Consistently truncate client SASL input at first NUL

The input is supposed to be base64-encoded, so there's no need to support
actual NUL characters. The previous code truncated at NULs, but could have
kept appending more data to the value. This could have produced somewhat
random results.

7 years agolib-master, util: Consistently truncate tabescaped input at the first NUL
Timo Sirainen [Sat, 21 Apr 2018 12:58:15 +0000 (15:58 +0300)] 
lib-master, util: Consistently truncate tabescaped input at the first NUL

The NULs are supposed to come tab-escaped, so there's no need to support
actual NUL characters. The previous code truncated at NULs, but could
have kept appending more data to the value. This could have produced
somewhat random results.

7 years agoconfig: Consistently truncate value at the first NUL in value input file
Timo Sirainen [Sat, 21 Apr 2018 12:53:42 +0000 (15:53 +0300)] 
config: Consistently truncate value at the first NUL in value input file

When value contained "<file", the file was added as a value. The setting
values don't currently support NULs, so the value gets truncated at the
first NUL. However, the previous code could have appended more data to
the value. This could have produced somewhat confusing results.

7 years agodict-fs/memcached-ascii/redis: Consistently truncate value at NULs
Timo Sirainen [Sat, 21 Apr 2018 12:50:08 +0000 (15:50 +0300)] 
dict-fs/memcached-ascii/redis: Consistently truncate value at NULs

The dict API currently doesn't support NULs in values, so they have to be
truncated. However, previously they were truncated at NULs, but more data
may have still been appended to the value. This could have produced
somewhat random results.

7 years agoauth: checkpassword - Fail if input from script contains NULs
Timo Sirainen [Sat, 21 Apr 2018 12:47:23 +0000 (15:47 +0300)] 
auth: checkpassword - Fail if input from script contains NULs

Previously the input was just silently truncated at NULs.

7 years agodoveadm: Fix table printer to not truncate output at NULs
Timo Sirainen [Sat, 21 Apr 2018 12:42:53 +0000 (15:42 +0300)] 
doveadm: Fix table printer to not truncate output at NULs

7 years agodoveadm dump: Don't truncate dovecot.index.cache values at NULs
Timo Sirainen [Sat, 21 Apr 2018 12:41:44 +0000 (15:41 +0300)] 
doveadm dump: Don't truncate dovecot.index.cache values at NULs

7 years agolib-mail: rfc822-parser: Don't truncate comment/quoted-string/domain-literal at NUL
Timo Sirainen [Sat, 21 Apr 2018 11:56:43 +0000 (14:56 +0300)] 
lib-mail: rfc822-parser: Don't truncate comment/quoted-string/domain-literal at NUL

The other tokens couldn't have contained NULs in the first place.

7 years agolib-mail: message_snippet_generate() - Ignore NULs without shrinking snippet size
Timo Sirainen [Sat, 21 Apr 2018 11:53:25 +0000 (14:53 +0300)] 
lib-mail: message_snippet_generate() - Ignore NULs without shrinking snippet size

Previously the NULs also weren't in the snippet content, but they were
included in the snippet size.

7 years agolib-storage: Fix truncating header values at NUL when adding to cache
Timo Sirainen [Sat, 21 Apr 2018 11:31:08 +0000 (14:31 +0300)] 
lib-storage: Fix truncating header values at NUL when adding to cache

For example FETCH BODY.PEEK[HEADER.FIELDS (Subject)] could have returned
the NUL on the first fetch when the mail wasn't in dovecot.index.cache,
but the second FETCH would have returned it truncated at the NUL.

7 years agolib-mail: message-address: Make the parser allow paths that omit `<' and `>'.
Stephan Bosch [Thu, 12 Apr 2018 14:13:08 +0000 (16:13 +0200)] 
lib-mail: message-address: Make the parser allow paths that omit `<' and `>'.

This is a syntax violation, but we allow it to account for a rather wide
selection of software that does not follow the standards.

7 years agolib-mail: message-address: Make parser properly reject paths with spurious trailing...
Stephan Bosch [Thu, 12 Apr 2018 19:27:32 +0000 (21:27 +0200)] 
lib-mail: message-address: Make parser properly reject paths with spurious trailing characters.

7 years agolib-mail: message-address: Make sure incomplete paths are rejected by parser.
Stephan Bosch [Thu, 12 Apr 2018 20:16:54 +0000 (22:16 +0200)] 
lib-mail: message-address: Make sure incomplete paths are rejected by parser.

7 years agolib-mail: message-address: Require paths with an invalid source route to have at...
Stephan Bosch [Thu, 12 Apr 2018 19:59:40 +0000 (21:59 +0200)] 
lib-mail: message-address: Require paths with an invalid source route to have at least a proper `:'.

Otherwise, the parser would allow a bare domain.

7 years agolib-mail: message-address: Properly deinit RFC822 parser in message_address_parse_path().
Stephan Bosch [Thu, 12 Apr 2018 18:29:36 +0000 (20:29 +0200)] 
lib-mail: message-address: Properly deinit RFC822 parser in message_address_parse_path().

7 years agolib-mail: test-message-address: Add test for parsing empty path.
Stephan Bosch [Thu, 12 Apr 2018 18:54:50 +0000 (20:54 +0200)] 
lib-mail: test-message-address: Add test for parsing empty path.

7 years agolib-mail: test-message-address: Use i_memdup() rather than explicit malloc(), memcpy().
Stephan Bosch [Thu, 12 Apr 2018 21:01:03 +0000 (23:01 +0200)] 
lib-mail: test-message-address: Use i_memdup() rather than explicit malloc(), memcpy().

7 years agolib: Added i_memdup().
Stephan Bosch [Thu, 12 Apr 2018 20:58:16 +0000 (22:58 +0200)] 
lib: Added i_memdup().

7 years agolib-ssl-iostream: Fix boolean misuse in SSL_CTX_set_ecdh_auto usage
Aki Tuomi [Tue, 17 Apr 2018 09:20:26 +0000 (12:20 +0300)] 
lib-ssl-iostream: Fix boolean misuse in SSL_CTX_set_ecdh_auto usage

f8aaa6e63a56085f61f128838ad7a3aa080d9d5b introduced warnings on gcc

7 years agolib-ssl-iostream: Do not handshake further if we are destroying
Aki Tuomi [Tue, 17 Apr 2018 12:58:58 +0000 (15:58 +0300)] 
lib-ssl-iostream: Do not handshake further if we are destroying

7 years agolib: Implement str_sanitize_utf8(). 79/head
Stephan Bosch [Sat, 14 Apr 2018 00:05:51 +0000 (02:05 +0200)] 
lib: Implement str_sanitize_utf8().

Unlike str_sanitize(), this function truncates strings based on a UTF8 code point
limit rather than a maximum size in bytes. Also, the Unicode replacement
character is used to mark invalid/control characters and an ellipsis character
is used to indicate the string truncation. For the normal str_sanitize() this is
done using a question mark and triple dots respectively.

7 years agolib: unichar: Add Horizontal Ellipsis character.
Stephan Bosch [Tue, 17 Apr 2018 19:31:38 +0000 (21:31 +0200)] 
lib: unichar: Add Horizontal Ellipsis character.

7 years agoimapc: Fix expunges+appends in same session with imapc_features=no-msn-updates
Timo Sirainen [Tue, 17 Apr 2018 12:46:41 +0000 (15:46 +0300)] 
imapc: Fix expunges+appends in same session with imapc_features=no-msn-updates

Since the EXPUNGEs were ignored, the sequence numbers weren't updated.
When a new mail arrived, the sequence number sent by the remote IMAP server
pointed to existing mails in imapc's mapping. Fix this by changing the
sequence number if the returned UID is >= next_uid.

Fixes "FETCH UID mismatch" errors.

7 years agolib-ssl-iostream: Make ssl_iostream_unref() private
Timo Sirainen [Mon, 16 Apr 2018 13:29:38 +0000 (16:29 +0300)] 
lib-ssl-iostream: Make ssl_iostream_unref() private

7 years agoglobal: Replace ssl_iostream_unref() with ssl_iostream_destroy()
Timo Sirainen [Mon, 16 Apr 2018 13:28:24 +0000 (16:28 +0300)] 
global: Replace ssl_iostream_unref() with ssl_iostream_destroy()

Destroying performs cleanups correctly.

7 years agolib-master: Add log_core_filter setting to core dump on matching filter
Timo Sirainen [Mon, 16 Apr 2018 11:01:37 +0000 (14:01 +0300)] 
lib-master: Add log_core_filter setting to core dump on matching filter

7 years agolib: Add global core filter, which allows core dumping on matching events
Timo Sirainen [Mon, 16 Apr 2018 11:00:51 +0000 (14:00 +0300)] 
lib: Add global core filter, which allows core dumping on matching events

7 years agolib: Add log types as event categories
Timo Sirainen [Mon, 16 Apr 2018 10:48:38 +0000 (13:48 +0300)] 
lib: Add log types as event categories

This allows using debug, info, warning, error, fatal and panic as
categories.

7 years agolib-master, stats: Send event's log_type to stats process
Timo Sirainen [Mon, 16 Apr 2018 10:39:17 +0000 (13:39 +0300)] 
lib-master, stats: Send event's log_type to stats process

This makes the internal stats protocol incompatible with the previous
version, so major protocol version is increased.

7 years agolib-master: If log_debug is empty, don't set global debug log filter at all
Timo Sirainen [Mon, 16 Apr 2018 10:32:47 +0000 (13:32 +0300)] 
lib-master: If log_debug is empty, don't set global debug log filter at all

global_debug_log_filter==NULL check is a bit faster.

7 years agolib-master: Cleanup - Add new helper function for parsing log filter settings
Timo Sirainen [Mon, 16 Apr 2018 10:32:15 +0000 (13:32 +0300)] 
lib-master: Cleanup - Add new helper function for parsing log filter settings

7 years agolib-master: Rename master_service_log_debug_parse() to master_service_log_filter_parse()
Timo Sirainen [Mon, 16 Apr 2018 10:31:03 +0000 (13:31 +0300)] 
lib-master: Rename master_service_log_debug_parse() to master_service_log_filter_parse()

This function will be used for parsing other settings besides just
log_debug.

7 years agolib-master: If connect() to backend UNIX socket is retried, log a warning
Timo Sirainen [Fri, 13 Apr 2018 13:14:18 +0000 (16:14 +0300)] 
lib-master: If connect() to backend UNIX socket is retried, log a warning

For example if imap-login process needs to retry before it successfully
connects to imap process's socket, a warning is logged. This warning is
important because it means that the imap-login process may have been
sleeping up to 0.5 seconds and causing all the other connections to hang
during it.

It would be better to make this retrying asynchronous, but before spending
time on doing that, lets see if this warning is ever even being logged.

7 years agolib-master: Add how long request took for "Internal auth failure" errors
Timo Sirainen [Fri, 13 Apr 2018 13:12:27 +0000 (16:12 +0300)] 
lib-master: Add how long request took for "Internal auth failure" errors

7 years agolib-storage: Add cydir/mdbox/sdbox/imapc/maildir/mbox/pop3c event categories
Timo Sirainen [Mon, 16 Apr 2018 12:27:49 +0000 (15:27 +0300)] 
lib-storage: Add cydir/mdbox/sdbox/imapc/maildir/mbox/pop3c event categories

7 years agolib-storage: Add mail_storage.event_category
Timo Sirainen [Mon, 16 Apr 2018 12:27:18 +0000 (15:27 +0300)] 
lib-storage: Add mail_storage.event_category

If set, this category is added to mail_storage.event.

7 years agolib-storage: Add mail_storage.event and use it wherever possible
Timo Sirainen [Mon, 16 Apr 2018 12:22:41 +0000 (15:22 +0300)] 
lib-storage: Add mail_storage.event and use it wherever possible

7 years agolib-ssl-iostream: Fix boolean misuse in SSL_CTX_set_ecdh_auto usage
Aki Tuomi [Thu, 12 Apr 2018 10:19:02 +0000 (13:19 +0300)] 
lib-ssl-iostream: Fix boolean misuse in SSL_CTX_set_ecdh_auto usage

Fixes compiler nit on clang

7 years agolib-ssl-iostream: Fix openssl compatibility issue introduced in OpenSSL 1.0.2f
Kadlecsik József [Tue, 20 Mar 2018 10:21:33 +0000 (12:21 +0200)] 
lib-ssl-iostream: Fix openssl compatibility issue introduced in OpenSSL 1.0.2f

Fixes dovecot: imap-login: Debug: SSL error: SSL_read() failed: error:140E0197:SSL routines:SSL_shutdown:shutdown while in init

7 years agopo3pc: Handle unexpected server disconnections without assert-crash
Timo Sirainen [Fri, 13 Apr 2018 10:33:56 +0000 (13:33 +0300)] 
po3pc: Handle unexpected server disconnections without assert-crash

Fixes: Panic: file pop3c-client.c: line 308 (pop3c_client_wait_one): assertion failed: (client->fd != -1 || client->state == POP3C_CLIENT_STATE_CONNECTING)
7 years agodoveconf: Fix infinite loop when hiding sensitive information
Timo Sirainen [Thu, 12 Apr 2018 13:07:31 +0000 (16:07 +0300)] 
doveconf: Fix infinite loop when hiding sensitive information

For example with "nopassword=y". Broken in
fc02343fd81a6fab272ac0366b15fc60ec44a8b6

7 years agolib-smtp: Fix empty address parsing
Timo Sirainen [Thu, 12 Apr 2018 11:27:50 +0000 (14:27 +0300)] 
lib-smtp: Fix empty address parsing

sret wasn't initialized, which could have randomly caused "Path only
consists of source route" error with empty addresses. Broken by
81c8955e3d1475c6ab1892b1d3edf91126683fda

7 years agosubmission: Add workarounds for well-known MAIL and RCPT command syntax deviations.
Stephan Bosch [Sun, 8 Apr 2018 13:53:37 +0000 (15:53 +0200)] 
submission: Add workarounds for well-known MAIL and RCPT command syntax deviations.

This adds a new `submission_client_workarounds' setting that works analogous to
the `imap_client_workarounds' setting.

Workarounds:

- whitespace-before-path: Allow one or more spaces or tabs between `MAIL FROM:'
                          and path and between `RCPT TO:' and path.
- mailbox-for-path:       Allow using bare Mailbox syntax (i.e., without <...>)
                          instead of full path syntax.

7 years agolib-smtp: test-smtp-server-errors: Add tests for RCPT command workarounds.
Stephan Bosch [Sun, 8 Apr 2018 13:03:00 +0000 (15:03 +0200)] 
lib-smtp: test-smtp-server-errors: Add tests for RCPT command workarounds.

7 years agolib-smtp: test-smtp-server-errors: Add tests for MAIL command workarounds.
Stephan Bosch [Sun, 8 Apr 2018 12:59:17 +0000 (14:59 +0200)] 
lib-smtp: test-smtp-server-errors: Add tests for MAIL command workarounds.

7 years agolib-smtp: test-smtp-server-errors: Add tests for bad RCPT command syntax.
Stephan Bosch [Sun, 8 Apr 2018 12:40:12 +0000 (14:40 +0200)] 
lib-smtp: test-smtp-server-errors: Add tests for bad RCPT command syntax.

7 years agolib-smtp: test-smtp-server-errors: Add tests for bad MAIL command syntax.
Stephan Bosch [Sun, 8 Apr 2018 12:07:50 +0000 (14:07 +0200)] 
lib-smtp: test-smtp-server-errors: Add tests for bad MAIL command syntax.

7 years agolib-smtp: test-smtp-server-errors: Implicitly stop server when all expected client...
Stephan Bosch [Sun, 8 Apr 2018 13:31:37 +0000 (15:31 +0200)] 
lib-smtp: test-smtp-server-errors: Implicitly stop server when all expected client connections are closed.

7 years agolib-smtp: test-smtp-server-errors: Add more debug messages for the server.
Stephan Bosch [Sun, 8 Apr 2018 13:28:59 +0000 (15:28 +0200)] 
lib-smtp: test-smtp-server-errors: Add more debug messages for the server.

7 years agolib-smtp: test-smtp-server-errors: Make detection of early termination of child proce...
Stephan Bosch [Sun, 8 Apr 2018 13:20:22 +0000 (15:20 +0200)] 
lib-smtp: test-smtp-server-errors: Make detection of early termination of child processes part of each test.

7 years agolib-smtp: test-smtp-server-errors: Add log prefixes for client and server.
Stephan Bosch [Sun, 8 Apr 2018 13:24:02 +0000 (15:24 +0200)] 
lib-smtp: test-smtp-server-errors: Add log prefixes for client and server.

Makes it easier to distinguish which process is sending a log message while
debugging.

7 years agolib-smtp: test-smtp-server-errors: Add support for client-side connection context...
Stephan Bosch [Sun, 8 Apr 2018 13:16:05 +0000 (15:16 +0200)] 
lib-smtp: test-smtp-server-errors: Add support for client-side connection context data.

7 years agolib-smtp: test-smtp-server-errors: Use o_stream_nsend*() rather than o_stream_send*().
Stephan Bosch [Tue, 10 Apr 2018 01:12:41 +0000 (03:12 +0200)] 
lib-smtp: test-smtp-server-errors: Use o_stream_nsend*() rather than o_stream_send*().

The result is not checked anyway.

7 years agolib-smtp: server: Add workarounds for well-known MAIL and RCPT command syntax deviations.
Stephan Bosch [Sun, 8 Apr 2018 10:25:49 +0000 (12:25 +0200)] 
lib-smtp: server: Add workarounds for well-known MAIL and RCPT command syntax deviations.

7 years agolib-smtp: address parser: Do not allow source route for path with omitted brackets.
Stephan Bosch [Sun, 8 Apr 2018 10:13:16 +0000 (12:13 +0200)] 
lib-smtp: address parser: Do not allow source route for path with omitted brackets.

Parse it strictly as a Mailbox, which makes more sense.

7 years agolib-storage: mail-storage-settings: Pre-parse postmaster_address as an SMTP address.
Stephan Bosch [Tue, 6 Mar 2018 22:11:32 +0000 (23:11 +0100)] 
lib-storage: mail-storage-settings: Pre-parse postmaster_address as an SMTP address.

The pre-parsed address is not currently used anywhere, but this does check that
the postmaster address can successfully be converted to an SMTP address, which
is important for Pigeonhole.

7 years agolib-smtp: address: Add source syntax check for conversion from RFC5322 addresses.
Stephan Bosch [Tue, 6 Mar 2018 20:43:22 +0000 (21:43 +0100)] 
lib-smtp: address: Add source syntax check for conversion from RFC5322 addresses.

The message-address parser (for RFC 5322) allows UTF-8 characters in the
localpart, which is not acceptable for SMTP addresses. This change adds a check
that determines whether the source RFC5222 address can be converted into a
SMTP address.

7 years agolib-master: Add own boolean for SSL module loading
Aki Tuomi [Wed, 11 Apr 2018 12:27:42 +0000 (15:27 +0300)] 
lib-master: Add own boolean for SSL module loading

want_ssl_settings isn't reliable enough.

7 years agolib-master: Do not attempt to load SSL module if no SSL support is compiled in
Aki Tuomi [Tue, 10 Apr 2018 13:00:38 +0000 (16:00 +0300)] 
lib-master: Do not attempt to load SSL module if no SSL support is compiled in

Fixes imap-login: Error: imap-login(init): Fatal: Cannot load SSL module: SSL support not compiled in

Broken in 754896551f0422cda5d78500b26700eec5343c5b

Found by bjornar

7 years agolib-program-client: Wait longer in test-program-client-local
Aki Tuomi [Wed, 11 Apr 2018 12:11:23 +0000 (15:11 +0300)] 
lib-program-client: Wait longer in test-program-client-local

Sometiems it can take longer than 1 second to execute, if the test
environment is loaded.