balsa issueshttps://gitlab.gnome.org/GNOME/balsa/-/issues2023-02-18T21:15:05Zhttps://gitlab.gnome.org/GNOME/balsa/-/issues/71Automatically retrieve OpenPGP-keys via WKD2023-02-18T21:15:05ZChristoph KlassenAutomatically retrieve OpenPGP-keys via WKDIt would be great if Balsa would retrieve OpenPGP-keys automatically because it would create a better usability for encryption in Balsa. There is a method called Web Key Directories (WKD) to retrieve keys on an easy way. Because the sour...It would be great if Balsa would retrieve OpenPGP-keys automatically because it would create a better usability for encryption in Balsa. There is a method called Web Key Directories (WKD) to retrieve keys on an easy way. Because the source of these keys are server from email provider the keys also have a basic trust which is also an advantage for users. GnuPG does support that method.
[Here](https://datatracker.ietf.org/doc/draft-koch-openpgp-webkey-service/13/) you can read more about WKD.Albrecht DreßAlbrecht Dreßhttps://gitlab.gnome.org/GNOME/balsa/-/issues/70LibBalsaMessage structure2022-10-10T02:14:50ZPeter BloomfieldLibBalsaMessage structureA recent [mailing list thread](https://mail.gnome.org/archives/balsa-list/2022-March/msg00011.html) raised a question about the `LibBalsaMessage` structure, namely why the `msgno` member is declared `glong`, when `guint` seems more natur...A recent [mailing list thread](https://mail.gnome.org/archives/balsa-list/2022-March/msg00011.html) raised a question about the `LibBalsaMessage` structure, namely why the `msgno` member is declared `glong`, when `guint` seems more natural. The value is in fact always cast to `guint`, mostly silently, when it is used.
The structure also has two `gboolean` members, while a third member that also represents a Boolean state is a single-bit `unsigned`. The structure could be compressed a little by making all three members single-bit fields.
A [branch](https://gitlab.gnome.org/GNOME/balsa/-/tree/70-libbalsa-message-structure) has been added to explore changes to the structure.https://gitlab.gnome.org/GNOME/balsa/-/issues/69Request: ability to resend email (redirect / bounce)2023-03-24T19:07:23ZDanManRequest: ability to resend email (redirect / bounce)I'm talking about the feature where you resend (not forward) an email that you've received in a way that the new recipient will not see you as sender but the one who originally sent it. I know Thunderbird, Apple Mail and Evolution implem...I'm talking about the feature where you resend (not forward) an email that you've received in a way that the new recipient will not see you as sender but the one who originally sent it. I know Thunderbird, Apple Mail and Evolution implement it. It's basically about implementing the `RESENT-*` headers.
Use case: clients often send emails which I want to resend into our bug tracker. But if I "forward" them the usual way, my email address will be shown as the sender and the text quoted inside a new body. I'd like to resend those mails unmodified, so the sender's email address will still be the customer's.
Mozilla ticket where it was implemented: https://bugzilla.mozilla.org/show_bug.cgi?id=12916
P.S.: It's called "umleiten" in German.Albrecht DreßAlbrecht Dreßhttps://gitlab.gnome.org/GNOME/balsa/-/issues/68Move "Thread messages" option from "View" to "Mailbox" menu2022-01-26T20:47:26ZAlbrecht DreßMove "Thread messages" option from "View" to "Mailbox" menuQuoting @peterb from https://gitlab.gnome.org/GNOME/balsa/-/issues/63#note_1343687:
>The "Thread messages" option is on the "View" menu, but is mailbox-specific (and so perhaps belongs on the "Mailbox" menu, as the other "View" menu opt...Quoting @peterb from https://gitlab.gnome.org/GNOME/balsa/-/issues/63#note_1343687:
>The "Thread messages" option is on the "View" menu, but is mailbox-specific (and so perhaps belongs on the "Mailbox" menu, as the other "View" menu options are all global). So when it is not hidden, "... not supported" is popped up in response to a request to thread a particular mailbox.https://gitlab.gnome.org/GNOME/balsa/-/issues/67GtkFileChooser supports overwrite-confirm2022-04-16T23:19:16ZPeter BloomfieldGtkFileChooser supports overwrite-confirmSince GTK version 2.8 (in 2005), `GtkFileChooser` has had a method `gtk_file_chooser_set_do_overwrite_confirmation()`. If set, when the user chooses to save to an existing file name, it alerts the user with the options of overwriting or ...Since GTK version 2.8 (in 2005), `GtkFileChooser` has had a method `gtk_file_chooser_set_do_overwrite_confirmation()`. If set, when the user chooses to save to an existing file name, it alerts the user with the options of overwriting or canceling.
Shortly before the release of GTK 2.8.0, `Balsa` implemented its own functionally equivalent version. I feel that the GTK implementation has now proved its stability, and that `Balsa` should be ported to it.
Opinions?https://gitlab.gnome.org/GNOME/balsa/-/issues/66Ability to open download location after download2022-03-05T22:14:04ZDanManAbility to open download location after downloadIf you download a file with a browser, they usually give you the option to open the download location in a file manager.
I'd like to have that ability in Balsa for attachments, too. Right now you have to manually open the file manager a...If you download a file with a browser, they usually give you the option to open the download location in a file manager.
I'd like to have that ability in Balsa for attachments, too. Right now you have to manually open the file manager and browse to the folder you just told Balsa to store the file in: inconvenient.
In Gnome, you get a notification at the top once the file has been stored. An option would be that clicking on that notification does just what I've described. But since notifications disappear after a bit, it may not be the ideal solution.Albrecht DreßAlbrecht Dreßhttps://gitlab.gnome.org/GNOME/balsa/-/issues/65Can't copy and paste hyperlinks2022-01-27T19:42:51ZDanManCan't copy and paste hyperlinksWhen right clicking (auto-generated) hyperlinks in plain text messages, copying them doesn't work. If you try to paste the link somewhere, nothing happens.
When viewing HTML message previews, there isn't even an option to copy a link, i...When right clicking (auto-generated) hyperlinks in plain text messages, copying them doesn't work. If you try to paste the link somewhere, nothing happens.
When viewing HTML message previews, there isn't even an option to copy a link, if you right click them.
Balsa 2.6.3 on Fedora 35, installed from default repository.Albrecht DreßAlbrecht Dreßhttps://gitlab.gnome.org/GNOME/balsa/-/issues/64Can't store certain attachments2023-03-21T23:07:14ZDanManCan't store certain attachmentsI have an email here with an Excel spreadsheet attached inside a mixed-content (? I'm not using the English version) area. If I right-click that in the message parts tab (?) and try to "save as…", it doesn't store the file. No error mess...I have an email here with an Excel spreadsheet attached inside a mixed-content (? I'm not using the English version) area. If I right-click that in the message parts tab (?) and try to "save as…", it doesn't store the file. No error messages. Mail was sent by Apple Mail. I can store other parts like the text or HTML messages.
That's with Balsa 2.6.3 on Fedora 35, installed from default repository.https://gitlab.gnome.org/GNOME/balsa/-/issues/63Confusing wrong Autocrypt error message2022-01-26T16:24:34ZAlbrecht DreßConfusing wrong Autocrypt error messageUnder the following conditions
* Balsa is compiled with Autocrypt support,
* _no_ identity has Autocrypt enabled,
* a new GnuPG signed message for which the public key is not present in the key ring is received, and
* the message include...Under the following conditions
* Balsa is compiled with Autocrypt support,
* _no_ identity has Autocrypt enabled,
* a new GnuPG signed message for which the public key is not present in the key ring is received, and
* the message includes a valid *Autocrypt:* header
Balsa emits the (wrong) message
```
The message contains an Autocrypt header, but it is either broken
or the signature has been created using a different key.
```
In detail, the following happens:
1. `libbalsa_message_headers_from_gmime()` remembers that the message includes a valid *Autocrypt:* header;
2. `balsa_message_set()` calls `autocrypt_from_message()` iff the message is new and at least _one_ identity has Autocrypt support enabled. This function imports the information from the *Autocrypt:* header into the Autocrypt database;
3. `balsa_mime_widget_signature_widget()` tries to read Autocrypt information from the database which is not present as `autocrypt_from_message()` has not been called in the previous step. But as in step 1 the header has been detected, it emits the confusing error message.
IMHO, we have two options:
* either we just remove the check in step 2., i.e. we *always* import Autocrypt data into the database, even if no identity is configured to use it, or
* in step 3. we simply suppress the message if no identity uses Autocrypt.
I am inclined to implement the first solution, as this would still offer to import the key extracted from the *Autocrypt:* header into the database and would warn if the header is really broken (and it's easier – just remove a few lines of code…).
Opinions?Albrecht DreßAlbrecht Dreßhttps://gitlab.gnome.org/GNOME/balsa/-/issues/62Improve external HTML content filtering2021-12-17T19:52:50ZAlbrecht DreßImprove external HTML content filteringBalsa's HTML message display has the option to suppress loading images by using Webkit's `auto-load-images` property, basically for protecting the user's privacy. This property is disabled whenever a regexp search of the HTML body indic...Balsa's HTML message display has the option to suppress loading images by using Webkit's `auto-load-images` property, basically for protecting the user's privacy. This property is disabled whenever a regexp search of the HTML body indicates that images shall be loaded from a remote server. The user may select (or configure for a particular sender) to load the external images. If a message contains embedded images *only*, they are always displayed.
This approach has two disadvantages:
1. if the message contains a mixture of embedded and external images, the embedded ones are not displayed, although this would be completely safe, and
2. *other* external resources like fonts or style sheets which may also be used to track the recipient's activity are always loaded.
IMHO, a better solution is to catch the `WebKitWebPage::send-request` signal and to decide whether an external resource shall be loaded or blocked. However, to this end a webkit web extension must be used, which is loaded from from a shared object in a specific folder (see [this discussion thread](https://lists.webkit.org/pipermail/webkit-gtk/2021-May/003703.html)).
I created a new branch [html-filter](https://gitlab.gnome.org/GNOME/balsa/-/tree/html-filter) which implements this approach. Some remarks:
* Webkit provides some methods for the communication between the main process (balsa) and the web page rendering process, but unfortunately no means for synchronisation. Therefore, when balsa's `WebKitWebContext` is initialised, a dummy `WebKitWebView` is created as to trigger loading the filter extension, and the main process is delayed until this has been finished. If this fails for some reason, balsa falls back to the current filtering method.
* balsa sends a `WebKitUserMessage` to the WebKitWebPage process when a new `WebKitWebView` is created, and then simply sleeps for 1 millisecond. This *seems* to work for me, but it might be necessary to be extended.
* Unfortunately, Webkit loads extensions from a single folder only. In order to enable testing it, I added the `#define WEB_EXT_CHECK_BUILDDIR` to libbalsa/html.c, line 54. Iff this define is set, balsa sets the extension folder to the build folder (tested with both autoconf and meson), falling back the the regular installation folder if the extension is not there. This, for a release build or packaging, this symbol should be undef'ed as to avoid leaking the build folder. I have no idea how this could be automated, though.
* Filtered (missing) images are displayed as empty frame with a broken image icon in it. However, the size and/or aspect ratio of the frame may or may not be correct, no idea how I could fix that.
As always, any feedback will be highly appreciated!Albrecht DreßAlbrecht Dreßhttps://gitlab.gnome.org/GNOME/balsa/-/issues/61Citation bars broken2021-10-19T23:57:08ZPeter BloomfieldCitation bars brokenI recently noticed that citation bars (the colored bars prefixing quoted text in text/plain message parts) are currently broken. Their tops are about one line too low, and:
* if the next line is quoted, they also end about a line too low...I recently noticed that citation bars (the colored bars prefixing quoted text in text/plain message parts) are currently broken. Their tops are about one line too low, and:
* if the next line is quoted, they also end about a line too low; or
* if it is not quoted, they end at about the correct place, making a very short bar.
They are also raising messages like
```
(balsa:390013): Gtk-CRITICAL **: 14:48:28.381: gtk_widget_get_preferred_width_for_height: assertion 'height >= 0' failed
(balsa:390013): Gtk-WARNING **: 14:48:28.381: gtk_widget_size_allocate(): attempt to allocate widget with width 7 and height -11
```
I'm not sure that those two issues arose at the same time, but it seems likely. The warnings are caused by transient issues when the message part is rendered, and are easy to fix. The misplacement is tougher!
I rebuilt `Balsa` versions 2.6.1 and 2.6.2, and they show the same behavior. Looks like something changed in Gtk :frowning2: I'm at 2.24.30, from Fedora 35 beta.
Does anyone else see this issue?https://gitlab.gnome.org/GNOME/balsa/-/issues/60Add i18n context for translators2022-06-26T08:06:05ZBalázs Meskómesko.balazs@fsf.huAdd i18n context for translatorsThis is a good advice in general, but especially for `libbalsa/rfc2445.c`, we translators would like to know what variables mean. For this we need to use the `pgettext` family of gettext functions. I would set these informational message...This is a good advice in general, but especially for `libbalsa/rfc2445.c`, we translators would like to know what variables mean. For this we need to use the `pgettext` family of gettext functions. I would set these informational messages where they are needed, if I could get a hint how to do it properly.https://gitlab.gnome.org/GNOME/balsa/-/issues/59Minor issue with highlighting URLs in plain text e-mail2021-08-23T18:15:44ZPeter BloomfieldMinor issue with highlighting URLs in plain text e-mailA [thread](https://mail.gnome.org/archives/balsa-list/2018-July/msg00000.html) in the `Balsa` mailing list discussed the question of how to "linkify" a URL in a plain text e-mail part; specifically, how to handle trailing punctuation. A ...A [thread](https://mail.gnome.org/archives/balsa-list/2018-July/msg00000.html) in the `Balsa` mailing list discussed the question of how to "linkify" a URL in a plain text e-mail part; specifically, how to handle trailing punctuation. A trailing period ('.'), for example, could be the last character of a valid URL, but more often marks the end of a sentence. Since 57c474ee0e04830920bed4725a65017ecb8c6e1e, `Balsa` excludes a trailing period from the matched URL.
Recently, a user of a different mail client [noticed](https://lists.webkit.org/pipermail/webkit-gtk/2021-July/003735.html) that an announcement contained URLs followed by commas as well as periods, which that client incorrectly included as parts of the corresponding URLs. `Balsa` correctly highlights the one with a period, but not the one with a comma. In _only_ excluding periods, `Balsa` took a conservative step, which incidentally has never been reported as causing a problem by misidentifying a URL. This example suggests that we should go further, and also exclude trailing commas.
I have seen no instance in the wild where a trailing comma is actually part of the URL, Does anyone see a problem with excluding them?https://gitlab.gnome.org/GNOME/balsa/-/issues/58Improve message filtering on reception2023-04-15T22:49:55ZPeter BloomfieldImprove message filtering on receptionAn [e-mail to the balsa list](https://mail.gnome.org/archives/balsa-list/2021-May/msg00000.html) describes inordinate delays when downloading a large number of messages from `gmail` using the `POP3` protocol. This issue can be used to di...An [e-mail to the balsa list](https://mail.gnome.org/archives/balsa-list/2021-May/msg00000.html) describes inordinate delays when downloading a large number of messages from `gmail` using the `POP3` protocol. This issue can be used to discuss possible strategies for fixes.https://gitlab.gnome.org/GNOME/balsa/-/issues/57gcc 11 and strlen2021-05-02T16:39:01ZPeter Bloomfieldgcc 11 and strlenFedora 34 uses GCC version 11.0.0, and it introduces a new error (most likely, among others!):
```
../balsa/libbalsa/imap/imap-handle.c: In function ‘imap_message_deserialize’:
../balsa/libbalsa/imap/imap-handle.c:1726:10: error: ‘strlen...Fedora 34 uses GCC version 11.0.0, and it introduces a new error (most likely, among others!):
```
../balsa/libbalsa/imap/imap-handle.c: In function ‘imap_message_deserialize’:
../balsa/libbalsa/imap/imap-handle.c:1726:10: error: ‘strlen’ reading 1 or more bytes from a region of size 0 [-Werror=stringop-overread]
1726 | ptr += strlen(ptr) + 1;
| ^~~~~~~~~~~
../balsa/libbalsa/imap/imap-handle.c:1661:9: note: at offset 1 into source object ‘fetched_headers_first_char’ of size 1
1661 | gchar fetched_headers_first_char;
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
ninja: build stopped: subcommand failed.
```
`fetched_headers_first_char` is a single `char` at the tail of `struct ImapMsgSerialized`, and is used to access data allocated after the `struct`:
```
struct ImapMsgSerialized *imes = (struct ImapMsgSerialized*)data;
…
ptr = &imes->fetched_headers_first_char;
```
Storing data at `ptr` and beyond using `strcpy()` raises no error, but perhaps will in future versions.https://gitlab.gnome.org/GNOME/balsa/-/issues/56Balsa hangs when expunging multiple erased IMAP messages2021-03-23T19:50:09ZAlbrecht DreßBalsa hangs when expunging multiple erased IMAP messagesI noticed a reproducible hang when I delete multiple messages on a IMAP account, and then try to expunge them. Expunging typically works when I erase less than ~10 messages, but occurs always (afaict) when more shall be deleted.
I `gdb...I noticed a reproducible hang when I delete multiple messages on a IMAP account, and then try to expunge them. Expunging typically works when I erase less than ~10 messages, but occurs always (afaict) when more shall be deleted.
I `gdb`, Balsa hangs in `libbalsa/imap/imap-commands.c`, line 1043, function `imap_mbox_handle_fetch_range()`, whilst trying to lock the handle mutex (see the backtrace [balsa-imap-hang.bt.gz](/uploads/f78bc9439206768ee228f97670f29806/balsa-imap-hang.bt.gz)):
```
g_mutex_lock(&handle->mutex);
```
It *seems* that the mutex has been locked in frame 33, function `imap_mbox_expunge()`. This function, after a few steps, calls `ir_expunge()` which in line 2635 fires the signal
```
g_signal_emit(h, imap_mbox_handle_signals[EXPUNGE_NOTIFY],
0, seqno);
```
which, through the signal handler, ultimately calls `imap_mbox_handle_fetch_range()`.
Unfortunately, I'm not familiar with the IMAP state machine… @peterb or @pawels, do you have an idea how to resolve the issue?
BTW, there *might* to be more locking issues – e.g. the function
```
ImapResponse
imap_mbox_handle_fetch_set(ImapMboxHandle* handle,
unsigned *set, unsigned cnt, ImapFetchType ift)
{
ImapResponse rc;
g_mutex_lock(&handle->mutex);
rc = imap_mbox_handle_fetch_set_unlocked(handle, set, cnt, ift);
g_mutex_unlock(&handle->mutex);
return rc;
}
```
will unlock the mutex *twice* if the macro in `imap_mbox_handle_fetch_set_unlocked()`, line 1075 fails:
```
IMAP_REQUIRED_STATE1(handle, IMHS_SELECTED, IMR_BAD);
```
expands to
```
do{if(!(handle) || handle->state != (IMHS_SELECTED)) \
{g_mutex_unlock(&handle->mutex); return (IMR_BAD);}}while(0);
```https://gitlab.gnome.org/GNOME/balsa/-/issues/55Use implicit TLS as default for every protocol.2023-03-09T17:12:45ZDamian PoddebniakUse implicit TLS as default for every protocol.Implicit TLS is more secure and more performant than STARTTLS. Thus, Balsa should use implicit TLS as the default for SMTP (port 465), POP3 (port 995), and IMAP (port 993).
Currently, it uses STARTTLS for POP3 and IMAP. On my NixOS mach...Implicit TLS is more secure and more performant than STARTTLS. Thus, Balsa should use implicit TLS as the default for SMTP (port 465), POP3 (port 995), and IMAP (port 993).
Currently, it uses STARTTLS for POP3 and IMAP. On my NixOS machine, SMTP is not automatically configured, which could also be an unrelated (?) bug. Still, I think SMTP should also default to implicit TLS on port 465.https://gitlab.gnome.org/GNOME/balsa/-/issues/54Crash, when server answers with `EXPUNGE 1` directly after greeting.2021-08-21T08:01:49ZDamian PoddebniakCrash, when server answers with `EXPUNGE 1` directly after greeting.This is the trace, which leads to a crash:
```
S: * OK [CAPABILITY IMAP4REV1 STARTTLS LOGINDISABLED] IMAP server ready.\r\n
S: * 1 EXPUNGE\r\n
* 2 EXPUNGE\r\n
* 3 EXPUNGE\r\n
C: 5 StartTLS\r\n
S: 5 OK begin TLS now.\r\n
```
I am very s...This is the trace, which leads to a crash:
```
S: * OK [CAPABILITY IMAP4REV1 STARTTLS LOGINDISABLED] IMAP server ready.\r\n
S: * 1 EXPUNGE\r\n
* 2 EXPUNGE\r\n
* 3 EXPUNGE\r\n
C: 5 StartTLS\r\n
S: 5 OK begin TLS now.\r\n
```
I am very sorry, that I didn't provide more information. I can take a closer look in a week or so. However, I guess this should be very easy for you to reproduce and find the cause of it.
I havn't looked into the source of balsa, but I strongly recommend, that all untagged responses are just discarded before STARTTLS.https://gitlab.gnome.org/GNOME/balsa/-/issues/53Description of forwarded messages is missing2021-02-05T00:20:27ZAlbrecht DreßDescription of forwarded messages is missingWhen a message is forwarded as attachment, or any other message is attached, the description of the message in the list of attachments in the composer dialogue is always *forwarded message*, although Balsa includes code to extract the se...When a message is forwarded as attachment, or any other message is attached, the description of the message in the list of attachments in the composer dialogue is always *forwarded message*, although Balsa includes code to extract the sender and subject from these attached messages.
However, the function (`get_fwd_mail_headers()`) is called with an URI, but tries to open it as file, which will of course always fail.Albrecht DreßAlbrecht Dreßhttps://gitlab.gnome.org/GNOME/balsa/-/issues/52[Bug]: Balsa fails to remember account password, even if it's set to remember it2024-03-16T19:08:26ZMarek Ľach[Bug]: Balsa fails to remember account password, even if it's set to remember itThis causes an issue to authenticate an account, and load the server's emails. Tested with IMAP settings on outlook.com, (outlook.office365.com), the same issue versified on both Debian x64 and Arch.This causes an issue to authenticate an account, and load the server's emails. Tested with IMAP settings on outlook.com, (outlook.office365.com), the same issue versified on both Debian x64 and Arch.