Hacker News new | ask | show | jobs
by WhyNotHugo 243 days ago
IIRC gmail doesn't support any capabilities from after ~2003.

In order to synchronise with this kind of server, you need to list UIDs and Flags from all mailboxes and perform a full comparison of which items changed. There's no NOTIFY, so you need to do this periodically.

This requires substantially more network and processing, and an entirely different application design. Such a design cannot immediately synchronise new entries either.

ImapGoose doesn't cover this kind of scenario, there are plenty of existing tools that can synchronise legacy servers already.

1 comments

Here's a nix flake for v0.2.0

{ description = "IMAP to Maildir synchronization tool";

  inputs = {
    nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
    flake-utils.url = "github:numtide/flake-utils";
  };

  outputs = {
    self,
    nixpkgs,
    flake-utils,
  }:
    flake-utils.lib.eachDefaultSystem (
      system: let
        pkgs = nixpkgs.legacyPackages.${system};
      in {
        packages = {
          default = pkgs.buildGoModule {
            pname = "imapgoose";
            version = "0.2.0";

            src = pkgs.fetchFromSourcehut {
              owner = "~whynothugo";
              repo = "ImapGoose";
              rev = "v0.2.0";
              hash = "sha256-+LHj4scdMDBOJ0f04IEeVVZSLEJQSQSndbtHEjN6kLs=";
            };

            vendorHash = "sha256-nD2KgBWmzkTQZHwH/IaGVbhIC2zR4VYdoUTocL0cP+A=";

            subPackages = ["cmd/imapgoose" "cmd/capcheck"];

            ldflags = ["-s" "-w"];

            postInstall = ''
              install -Dm644 imapgoose.1 -t $out/share/man/man1/
              install -Dm644 imapgoose.conf.5 -t $out/share/man/man5/
              install -Dm644 LICENCE -t $out/share/licenses/imapgoose/
            '';

            meta = with pkgs.lib; {
              description = "IMAP to Maildir synchronization tool";
              homepage = "https://git.sr.ht/~whynothugo/ImapGoose";
              license = licenses.isc;
              mainProgram = "imapgoose";
            };
          };
        };

        devShells.default = pkgs.mkShell {
          buildInputs = with pkgs; [
            go
            gopls
            gotools
            golangci-lint
          ];
        };
      }
    );
}