[Users] X-Mailer information

Michael Schwendt bugreporter at abwesend.de
Mon Nov 3 17:31:35 CET 2014


On Mon, 3 Nov 2014 16:10:00 +0100, Ralf Mardorf wrote:

> > On Sun, 2 Nov 2014 14:43:00 +0100, Ralf Mardorf wrote:
> > 
> > > If I would overwrite it (I already was aware about this option), is
> > > there a variable or command I can use to get the current version of
> > > Claws and GTK2? I don't want to edit it each time upstream releases
> > > a new version, since my distro does follow upstream.
> > 
> > With a bit of fantasy, you could create a shell script that determines
> > the version by looking at library file names or SONAMEs. Plus, you
> > could retrieve the versions like this:
> > 
> >   $ pkg-config --modversion gtk+-2.0
> >   2.24.25
> >   $ claws-mail --version
> >   Claws Mail version 3.10.1
> 
> Sure, I also could run
> 
> $ pacman -Q gtk2 claws-mail
> gtk2 2.24.25-1
> claws-mail 3.11.0-2
> 
> ;)
> 
> but were can I set the X-Mailer info used by Claws to use a script ;).

That is not the question you've asked before (see quota above).

The manual page mentions a ~/.claws-mail/customheaderrc file, and in the
source code you could learn how that file is used. Quickstart:

$ grep customheaderrc * -R
doc/man/claws-mail.1:$HOME/.claws\-mail/customheaderrc
src/common/defs.h:#define CUSTOM_HEADER_RC	"customheaderrc"
tools/README:      		echo "0:" `cat filename.xface` > ~/.claws-mail/customheaderrc
$ grep CUSTOM_HEADER_RC * -R
src/prefs_customheader.c:			     CUSTOM_HEADER_RC, NULL);
src/prefs_customheader.c:			     CUSTOM_HEADER_RC, NULL);
src/common/defs.h:#define CUSTOM_HEADER_RC	"customheaderrc"

I haven't used that file before, so perhaps the theory is far off reality.

> I guess the correct answer already was given, it's a build option and
> JFTR the maintainer of the distro I'm using isn't interested in
> promotion for this distro. Assumed it would be important, then I could
> compile myself, but since it's not important, just a minor cosmetic
> issue, I'll live with that "cosmetic issue".
> 
> ;)

The versions don't seem to be hardcoded, though, so as a brute-force hack,
it would even be possible to "sed -i" the executable and replace the build
target string (provided that you don't mess up its length):

$ strings /usr/bin/claws-mail |grep GTK\+
X-Mailer: %s (GTK+ %d.%d.%d; %s)
X-Newsreader: %s (GTK+ %d.%d.%d; %s)
runtime GTK+ %d.%d.%d / GLib %d.%d.%d
buildtime GTK+ %d.%d.%d / GLib %d.%d.%d
GTK+ %d.%d.%d / GLib %d.%d.%d
$ strings /usr/bin/claws-mail |grep redhat
x86_64-redhat-linux-gnu



More information about the Users mailing list