Bug 4048 - "--offline" command line switch has no effect
Summary: "--offline" command line switch has no effect
Status: RESOLVED DUPLICATE of bug 3993
Alias: None
Product: Claws Mail
Classification: Unclassified
Component: Other (show other bugs)
Version: 3.16.0
Hardware: PC Linux
: P3 normal
Assignee: users
URL:
Depends on:
Blocks:
 
Reported: 2018-07-11 23:32 CEST by George
Modified: 2018-07-14 12:55 CEST (History)
0 users

See Also:


Attachments
command line output (9.80 KB, text/plain)
2018-07-13 18:59 CEST, George
no flags Details
output (5.02 KB, text/plain)
2018-07-13 19:50 CEST, George
no flags Details
console output (36.12 KB, text/plain)
2018-07-13 21:46 CEST, George
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description George 2018-07-11 23:32:39 CEST
STR:

1. Have one or more IMAP accounts

2. Run:
claws-mail --offline

3. Watch network log

EXPECTED:
No connections.

ACTUAL:
CM connects to the IMAP server(s).
Comment 1 George 2018-07-11 23:35:36 CEST
ETA:

This happens only when CM has been shut down in "online" mode. If it has been shut down in "offline" mode there are no connections. So the actual bug is that the command line option simply has no effect.
Comment 2 Paul 2018-07-12 21:49:41 CEST
do you have the option 'check for new mail on start-up' set?
(/Configuration/Preferences/Mail Handling/Receiving)
Comment 3 Paul 2018-07-12 21:53:11 CEST
I cannot reproduce this.
Do you have Network Manager support built in?
Comment 4 George 2018-07-12 23:22:17 CEST
> do you have the option 'check for new mail on start-up' set?

No.

> Do you have Network Manager support built in?

Help -> About -> Features shows:

[checked] NetworkManager adds support for detection of network connection changes

However on my system I am using wicked, not NetworkManager.


FWIW I am running the version from this repo:

http://download.opensuse.org/repositories/server:/mail/openSUSE_Leap_42.3/
Comment 5 Paul 2018-07-13 09:25:33 CEST
Even if you start claws-mail in online mode it will not immediately fetch email or connect to remote servers unless you have configured it to do so. Perhaps you have the option to 'open last opened folder on start-up' set, and your last folder was within your IMAP mailbox. But even if this is the case, when you are in offline mode and a fetch is attempted you will see a dialogue asking whether you want to override offline mode.
Comment 6 George 2018-07-13 10:32:53 CEST
> Even if you start claws-mail in online mode it will
> not immediately fetch email or connect to remote
> servers unless you have configured it to do so.

I wonder if bug#3993 may be related to this one. Of
course that other bug has been fixed which is great
but I am mentioning it because the fix has still not
propagated to the repo I use.

> Perhaps you have the option to 'open last opened
> folder on start-up' set, 

That option doesn't seem to affect the bug.

> and your last folder was within your IMAP mailbox.

No, that is not the case. I exit CM either having
selected an RSS folder or when a locally fetched
folder (#mh/Mailbox/...).

> But even if this is the case, when you are in
> offline mode and a fetch is attempted you will see a
> dialogue asking whether you want to override offline
> mode.

That dialog appears only if I have exited CM in
offline mode. If I have exited while in online mode
the dialog does not appear.
Comment 7 Paul 2018-07-13 10:51:59 CEST
If it is bug 3993 then its already fixed and this is a duplicate, otherwise it could be that there are patches applied by suse and you should report the bug there.

*** This bug has been marked as a duplicate of bug 3993 ***
Comment 8 George 2018-07-13 12:30:35 CEST
> If it is bug 3993 then its already fixed and this is a duplicate

"may be related" != "it is a duplicate". The later implies it is identical and I definitely don't think it is because if it was it would happen always, regardless of the command line switch. The fact is: it does not happen always but only when I quit CM in online mode. Nothing in the other bug (including the committed code) implies a relation to the command line options. So marking this as duplicate is incorrect.

> otherwise it could be that there are patches applied by suse and you should report the bug there.

This is not an official repo by SUSE, so there is no possibility to report. In the official repo they still have version 3.13. I have reported that and refuse to update it. That's why I use the mentioned other repo.

If you doubt the culprit is the distributed binary, I would be happy to compile CM from source. Then we can be sure we are testing the same thing.

Could you please provide a link with instructions how to do that?
Comment 9 Ralf Mardorf 2018-07-13 13:03:14 CEST
I'm not using Suse, but building a non-split package should work using checkinstall. Suse might split software from upstream into several packages, so first you need to get all build dependencies, IOW the tools to build Claws as well as packages containing header files of the run time dependencies. Then deinstall all Claws packages, just keep the dependencies and after that run

  git clone git://git.claws-mail.org/claws.git

  cd claws/

Either run

  git checkout foo_bar

to get a specific commit or to get the master branch run

  git pull --all

  make clean

  ./autogen.sh

./configure is one line

  ./configure --build=$(uname -m)-suse-linux-gnu --prefix=/usr --disable-jpilot --disable-maintainer-mode --disable-manual --disable-static --enable-bogofilter-plugin --enable-crash-dialog --enable-enchant --enable-gnutls --enable-ldap --enable-pgpmime-plugin --enable-silent-rules --enable-spamassassin-plugin

  sh version

  make

  sudo checkinstall

Follow checkinstall and edit:

0 -  Maintainer: [ Me <myself.and@i.com> ]
1 -  Summary: [ A GTK+ based e-mail client - git checkout ]
2 -  Name:    [ claws-mail-git ]
3 -  Version: [ output of sh version ]
4 -  Release: [ 1 ]
5 -  License: [ GPL3 ]
6 -  Group:   [ checkinstall ]
7 -  Architecture: [ amd64 or what ever architecture you are using ]
8 -  Source location: [ claws ]
9 -  Alternate source location: [  ]
10 - Requires: [  ]
11 - Provides: [ claws-mail ]
12 - Conflicts: [  ]
13 - Replaces: [  ]
Comment 10 George 2018-07-13 18:59:05 CEST
Created attachment 1887 [details]
command line output

After uninstalling the existing binaries I installed all these which were indicated as required:

automake
bison
flex
libtool

However I am getting an error.
Could you please check attachment?
Comment 11 George 2018-07-13 19:50:42 CEST
Created attachment 1888 [details]
output

Based on this info:

https://www.claws-mail.org/faq/index.php/Installation_and_Configuration

I also installed:

compface-devel
gtk3-devel
libgpgme-devel
libgnutls-devel
libetpan-devel
openldap2-devel
enchant-devel
NetworkManager-devel

And copied all .m4 files which 'locate m4 | less' finds to the m4 folder, in particular those found in:


/usr/share/aclocal/
/usr/share/autoconf/autoconf/
/usr/share/autoconf/m4sugar/
/usr/share/bison/
/usr/share/bison/m4sugar/

autogen still complains about a syntax error. (attaching output)
Comment 12 Ralf Mardorf 2018-07-13 20:20:50 CEST
Perhaps the package https://software.opensuse.org/package/autoconf-archive is missing.
Comment 13 Andrej Kacian 2018-07-13 20:51:50 CEST
Based on the first few lines of the autogen.sh output, I'd say you're missing gettext-devel, or whatever your distro calls it. Install that and rerun autogen.sh.

There's no need to copy any m4 files anywhere, the autotools scripts will find all of them in their proper locations. :)
Comment 14 Ralf Mardorf 2018-07-13 21:03:15 CEST
autoconf-archive might not be needed, but perhaps something https://software.opensuse.org/package/autoconf related is missing? gettext?

Is there no Suse website showing how the claws-mail package is build for the  distro? Something comparable to e.g. Debian tracker for Debian and Ubuntu, see https://tracker.debian.org/media/packages/c/claws-mail/control-3.16.0-2 for their build dependencies? There seems to be an autotools development package. Note, I'm an Arch Linux user. Arch doesn't split software from upstream into packages, there usually is nothing like a development package.

However, I've got an Ubuntu install, there I've got installed

[weremouse@moonstudio ~]$ dpkg -l *autoconf* | grep ii
ii  autoconf           2.69-9       all          automatic configure script builder
ii  autoconf-archive   20150925-1   all          Autoconf Macro Archive
[weremouse@moonstudio ~]$ dpkg -l *gettext* | grep ii
ii  gettext                0.19.7-2ubuntu3 amd64        GNU Internationalization utilities
ii  gettext-base           0.19.7-2ubuntu3 amd64        GNU Internationalization utilities for the base system
ii  libgettextpo-dev:amd64 0.19.7-2ubuntu3 amd64        GNU Internationalization library development files
ii  libgettextpo0:amd64    0.19.7-2ubuntu3 amd64        GNU Internationalization library
ii  liblocale-gettext-perl 1.07-1build1    amd64        module using libc functions for internationalization in Perl
[weremouse@moonstudio ~]$ dpkg -l *autotool* | grep ii
ii  autotools-dev  20150820.1   all          Update infrastructure for config.{guess,sub} files
Comment 15 George 2018-07-13 21:46:48 CEST
Created attachment 1889 [details]
console output

> I'd say you're missing gettext-devel, or whatever your distro calls it.

That seems to be correct. I installed gettext-tools which helped autogen.sh to progress further.

> There's no need to copy any m4 files anywhere, the autotools scripts will find all of them in their proper locations. :)

Looks like it. Perhaps the documentation in the link I shared needs update as it suggest copying of files.

> Is there no Suse website showing how the claws-mail package is build for the  distro?

I am not a C developer (at least not during the last 15 years), so I haven't been digging into that. What I know is that they use https://build.opensuse.org/ and that software can also be searched for in https://software.opensuse.org/. For the official package (in the distro):

https://build.opensuse.org/package/show/openSUSE:Leap:42.3/claws-mail

and the 3.16 version which I normally use:

https://build.opensuse.org/package/show/server:mail/claws-mail

I don't know anything more.

So... I have started from scratch and autogen.sh completed. However it shows quite a few warnings + disabled features due to missing dependencies. In order not to proceed with something wrong/incomplete - how do I fix those, so I can finish the compilation without issues? (and then test the bug)
Comment 16 Paul 2018-07-13 23:49:28 CEST
Guys, this is a bug tracker not a forum, please keep comments on topic and take other queries elsewhere.
Comment 17 George 2018-07-14 00:19:37 CEST
Paul, sorry about that. It would have been much easier and shorter if there was clear documentation about the build process. (I asked for a link, remember?)

I was able to take everything to the point where only fancy, tnef_parse and vcalendar are disabled due to missing dependencies (which I assume is OK).

So following the instructions further:

[/tmp/download/claws]: sh version
3.16.0-234-g4188d8
[/tmp/download/claws]: make
...
[/tmp/download/claws]: sudo checkinstall
[sudo] password for root: 
sudo: checkinstall: command not found

I have no idea what this checkinstall is. There is no such package on openSUSE at all.

If anyone could provide info how to proceed, I would be able to test with a recent version.
Comment 18 Ralf Mardorf 2018-07-14 04:51:33 CEST
Please open a thread at https://lists.claws-mail.org/cgi-bin/mailman/listinfo/users, if https://software.opensuse.org/package/checkinstall shouldn't solve the issue.
Comment 19 Paul 2018-07-14 10:17:04 CEST
(In reply to comment #17)
> Paul, sorry about that. It would have been much easier and shorter if there
> was clear documentation about the build process. (I asked for a link,
> remember?)

There is, of course, in the standard place: the INSTALL file included with the code.
Comment 20 George 2018-07-14 12:55:27 CEST
Thanks to everyone who helped me complete the compilation and installation in the mailing list.

I confirm that version 3.16.0git235 works as expected, i.e. neither of the two bugs appear. Obviously openSUSE's build is dated.