djcb / mu

maildir indexer/searcher + emacs mail client + guile bindings
http://www.djcbsoftware.nl/code/mu
GNU General Public License v3.0
1.61k stars 387 forks source link

[mu4e bug] User-Agent header not set #2750

Closed manphiz closed 3 weeks ago

manphiz commented 3 weeks ago

Describe the bug

It looks like mu4e doesn't set User-Agent header anymore. It used to do that when I was using 1.8.x. I stopped using it for a while and started trying it again since 1.12.5 and I can no longer see User-Agent being set. I suspect this may be happening for earlier versions as well.

How to Reproduce

Sending a mail and show all headers, and there is no User-Agent set.

Environment

Debian Linux stable (Bookworm) Emacs 29.4 mu4e 1.12.6

Checklist

Possible Cause

'User-Agent is included in the draft header when message-newsreader is set[1]. However, the only place that it's being set is at [2] where it's let-bounded, so it has no effect on the code at [1].

[1] https://github.com/djcb/mu/blob/f101e0d4ca86b46718e0e3d46dee04a6f8b77bc4/mu4e/mu4e-draft.el#L573 [2] https://github.com/djcb/mu/blob/f101e0d4ca86b46718e0e3d46dee04a6f8b77bc4/mu4e/mu4e-draft.el#L517

manphiz commented 3 weeks ago

I have a tentative fix at https://github.com/djcb/mu/pull/2751, though I'm not sure whether this is the best way to do this. Please advice. Thanks!