Cannot send mail with line containing a single dot
Bug Summary
Sending a message can fail if a line contains a single dot. The SMTP protocol specifies that such line (\r\n.\r\n
) terminates the DATA
command (RFC2821 section 4.1.1.4). Conforming servers would then expect an SMTP command in the next line, but Geary sends the rest of the message.
Geary should conform to RFC2821 section 4.5.2 and prepend lines starting with a dot with an additional dot.
Your installation
- Geary version: 3.38.1
- Geary revision: tags/gnome-3.38.1-0-g6067adc4
- GTK version: 3.24.24
- GLib version: 2.66.4
- WebKitGTK version: 2.30.4
- Desktop environment: GNOME
- Distribution name: Arch Linux
- Distribution release:
- Installation prefix: /usr
- Installation method: package
- Email provider: self-hosted opensmtpd
Steps to reproduce
- Compose a new message to some recipient.
- Enter a single dot (
.
) as message body. - Press "Send".
What happened?
Depending on the server's configuration (mine is very strict concerning pipelining), the "Account Problem" banner is shown saying "Geary encountered a problem sending email for (redacted)".
What did you expect to happen?
Geary should conform to RFC2821 section 4.5.2 so that message delivery succeeds.
Relevant logs and/or screenshots
Account identifier: (redacted)
Account provider: GEARY_SERVICE_PROVIDER_OTHER
Service type: GEARY_PROTOCOL_SMTP
Service host: (redacted)
Error type: GearySmtpError 6
Message: Unable to send message: 500 5.5.1 Invalid command: Pipelining not supported
Back trace:
* geary_problem_report_construct
* geary_account_problem_report_construct
* geary_service_problem_report_construct
* application_main_window_update_account_status
* application_controller_expunge_accounts
* g_closure_invoke
* g_strdup_value_contents
* g_signal_emit_valist
* g_signal_emit
* g_flags_to_string
* g_object_notify_by_pspec
* g_closure_invoke
* g_strdup_value_contents
* g_signal_emit_valist
* g_signal_emit
* g_flags_to_string
* g_object_notify_by_pspec
* geary_client_service_notify_unrecoverable_error
* turkish_UTF_8_create_env
* g_socket_client_connect_to_uri_async
* g_task_had_error
* turkish_UTF_8_create_env
* g_socket_client_connect_to_uri_async
* g_task_had_error
* turkish_UTF_8_create_env
* g_socket_client_connect_to_uri_async
* g_task_had_error
* turkish_UTF_8_create_env
* g_socket_client_connect_to_uri_async
* g_task_had_error
* turkish_UTF_8_create_env
* g_socket_client_connect_to_uri_async
* g_task_had_error
* g_input_stream_close_async
* g_socket_client_connect_to_uri_async
* g_socket_client_connect_to_uri_async
* g_main_context_dispatch
* g_io_channel_new_file
* g_main_context_iteration
* g_application_run
* _vala_main
* __libc_start_main
* _start