From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id gBPlHYyTcWVK0gAA9RJhRA:P1 (envelope-from ) for ; Thu, 07 Dec 2023 10:42:36 +0100 Received: from aspmx1.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id gBPlHYyTcWVK0gAA9RJhRA (envelope-from ) for ; Thu, 07 Dec 2023 10:42:36 +0100 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 21DE023C89 for ; Thu, 7 Dec 2023 10:42:36 +0100 (CET) Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=gerLoqkc; spf=pass (aspmx1.migadu.com: domain of "help-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="help-guix-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=gmail.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1701942156; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=1yet4QLTPegWYEf3yeXeg6bgmJGROHhhvR1IUA86f1E=; b=Lfn6eCDYy3YdeikfirsZFK9d3BGs6teI0LyUWdJ6lkqhOMrmlYL74HROcKTS143a19WfXG OXaOZkjv/UvvLPBz7HbqZWlKzOkPo9HML+hpA6TOD+8XsQgBXzu1kjO/NL5B6zb5IUvWCI Q+PdGE1fifkERm2Qlu4+WV8hUa6kWgS5KTXxasa2ecR3XzWR7SgaZvtDoqQjz2KpkTM5O7 NKXOSwrDeqcEwFzcSAKDmvgzqn3WDOkqODuag120rdHTVTdKZ/pBiNaBIhzPZB7/6OhZxt l6lJoogNHPw/5RiAOz6vamSSoMoe4FF3T7MVHRpaBDSzQhyU5CqYLZFfDE42PQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=gerLoqkc; spf=pass (aspmx1.migadu.com: domain of "help-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="help-guix-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=gmail.com ARC-Seal: i=1; s=key1; d=yhetil.org; t=1701942156; a=rsa-sha256; cv=none; b=Y8LyvDzmStXbLhNE3IJRCQBk5Vo+8ZXwOCwHq4xvGIywR1AjIFdxAcBtvTyLQX2xsWeiTf i7ZkgymrAB9ez9l/QRvFo+7UGhGdScCr+sonRIygSc8qtmzW23jYfVpIf+Ys4QSpaAnOi8 axZpQKimtOKA3gLd8YkA9DvrQ/rijHPyvhL7t10PqHMRM7dacTM0hwkD9zFyWxW6dL2LEQ 4BBkSRQ0cMPZX2mBCQRfBS5ESDUuXViSjVY1YBk5jUqInV3XjnPlOuVOovfRdbeDrES7dR Y4YdkilldV7y8jUVcCmsZJqhYn71U6fx2RA+8PxKOI01PnW/EtgCBByCH/ebVA== Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rBAtM-0002x3-Tk; Thu, 07 Dec 2023 04:42:00 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rBAtK-0002wv-F6 for help-guix@gnu.org; Thu, 07 Dec 2023 04:41:59 -0500 Received: from mail-lf1-x131.google.com ([2a00:1450:4864:20::131]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rBAtI-0005v6-K3 for help-guix@gnu.org; Thu, 07 Dec 2023 04:41:58 -0500 Received: by mail-lf1-x131.google.com with SMTP id 2adb3069b0e04-50be9e6427dso452548e87.1 for ; Thu, 07 Dec 2023 01:41:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1701942115; x=1702546915; darn=gnu.org; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:user-agent:from:to:cc:subject:date:message-id:reply-to; bh=1yet4QLTPegWYEf3yeXeg6bgmJGROHhhvR1IUA86f1E=; b=gerLoqkc/8VqphjEbQughym7FkiyRE0xzhe7Ebz09TfEfr2hYHmtxdA6zP9yuMo9de 1ki3LwC5Mpb9PzQWoh+CZeoq2lFbTiF08xzaiaQQBX/sA9Dpu6oQeWwEAl3PEdrGxfIZ krgMXAQWBSozgkOlpLYaLrJE/UmzG+OyN0xpWLzCiLEb5RmatIoKvy87/iwksjLs7LqQ SlJ3YtmpyO3WoX0zIiNLghPUPomfzf5NGnWQG8l86gVnSC0NhKtLc+DfuoK0kld9IBOm nT/M6U1aYel5mCxyFEdkaKjsIAiCSplpmspmNAM+rqCwFthUo0pg/FQHNY5ulRPh8KMG 5SyQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701942115; x=1702546915; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:user-agent:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=1yet4QLTPegWYEf3yeXeg6bgmJGROHhhvR1IUA86f1E=; b=opEVEhlaHnWB1gyRVrrd8/gsGpsfyPwB03F7yy1DuKtG0UQdvaI52Q/YT5JO8EXN1u 2qyfw1zhBKK3l/TqKGf5iBUa/T6i+BLLiEBW/5rBNDjRdDCrBSKUw9n3NdYPHmog7OEN BJmQRIKQE5UR05mjBhXJbvzpjKtVIihtwpOXxd9eHxfeO8B6cNERF6UQqHHKQ+ClcvV4 +uPTnDOOgNmYxoDTHSBHJoNxzToSsup8IujJRgmFJXdpe/5XisgXZqlzLRsJVpqt7hx5 fWSFOxuiSdmxMSGHZN5izOzGFqOuXsi3Dn4wMU3hTxFk5JWyAkHuapLFKfajfsmD9/nx 5CjA== X-Gm-Message-State: AOJu0YxOlOLhMFDctQk0GY3546fsJMeL+j1aBNgxIioGWCdlCV9kZO9h rjf9SaUUCr0x3ZIm8Buhu8klSrIGbBn/bA== X-Google-Smtp-Source: AGHT+IHJiJA3h27/r7jGh8J3rQ2zdsn5LlwPlZ1smzOT97mEvK464dhMe220isF1lOyUpOkz6jryoA== X-Received: by 2002:ac2:46e2:0:b0:50c:6b:f15e with SMTP id q2-20020ac246e2000000b0050c006bf15emr1161976lfo.78.1701942114475; Thu, 07 Dec 2023 01:41:54 -0800 (PST) Received: from localhost (78.79-160-60.customer.lyse.net. [79.160.60.78]) by smtp.gmail.com with ESMTPSA id r1-20020a19ac41000000b0050097974ee0sm121029lfc.224.2023.12.07.01.41.53 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Dec 2023 01:41:54 -0800 (PST) User-agent: mu4e 1.10.8; emacs 30.0.50 From: Lars Rustand To: help-guix@gnu.org Subject: Offlineimap is not able to run as a shepherd service Date: Thu, 07 Dec 2023 10:15:59 +0100 Message-ID: <875y1al57l.fsf@yoga.mail-host-address-is-not-set> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=2a00:1450:4864:20::131; envelope-from=rustand.lars@gmail.com; helo=mail-lf1-x131.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-guix@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-guix-bounces+larch=yhetil.org@gnu.org Sender: help-guix-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Spam-Score: -9.46 X-Spam-Score: -9.46 X-Migadu-Queue-Id: 21DE023C89 X-Migadu-Scanner: mx12.migadu.com X-TUID: 5Nj0JLRgvn/a Hello, I'm trying to run offlineimap as a shepherd service, but it fails in a weird way. I'm able to run offlineimap just fine when I start from the commandline, but inside the service it fails with this error: -8<---------------cut here---------------start------------->8--- 2023-12-07 10:31:13 Traceback: 2023-12-07 10:31:13 File "/gnu/store/g2231vkzbnncyj72085n1ylkh8hq16lm-off= lineimap-8.0.0/lib/python3.10/site-packages/offlineimap/accounts.py", line = 298, in syncrunner 2023-12-07 10:31:13 self.__sync() 2023-12-07 10:31:13 File "/gnu/store/g2231vkzbnncyj72085n1ylkh8hq16lm-off= lineimap-8.0.0/lib/python3.10/site-packages/offlineimap/accounts.py", line = 374, in __sync 2023-12-07 10:31:13 remoterepos.getfolders() 2023-12-07 10:31:13 File "/gnu/store/g2231vkzbnncyj72085n1ylkh8hq16lm-off= lineimap-8.0.0/lib/python3.10/site-packages/offlineimap/repository/IMAP.py"= , line 681, in getfolders 2023-12-07 10:31:13 imapobj =3D self.imapserver.acquireconnection() 2023-12-07 10:31:13 File "/gnu/store/g2231vkzbnncyj72085n1ylkh8hq16lm-off= lineimap-8.0.0/lib/python3.10/site-packages/offlineimap/imapserver.py", lin= e 683, in acquireconnection 2023-12-07 10:31:13 e.args[0][:35] =3D=3D 'IMAP4 protocol error: socket= error:': 2023-12-07 10:31:13 -8<---------------cut here---------------end--------------->8--- I am using the exact same commandline arguments both in the shepherd service and when running offlineimap manually, so Shepherd must be doing something weird that causes offlineimap to fail. Here is my service definition: -8<---------------cut here---------------start------------->8--- (define-module (lrustand services offlineimap) #:use-module (gnu) #:use-module (gnu services) #:use-module (gnu packages mail) #:use-module (gnu services shepherd) #:use-module (gnu services configuration) #:use-module (guix gexp) #:use-module (guix records) #:use-module (ice-9 curried-definitions) #:use-module (gnu home services) ;; For the 'home-shepherd-service-type' mapping. #:use-module (gnu home services shepherd) #:export (offlineimap-configuration offlineimap-configuration? offlineimap-configuration-log-file offlineimap-configuration-pid-file offlineimap-shepherd-service offlineimap-service-type home-offlineimap-service-type)) (define-configuration/no-serialization offlineimap-configuration (pid-file (string "/var/run/offlineimap.pid") "Where to store the PID file.") (config-file (string "/home/lars/.config/offlineimap/config") "Configuration file to use.") (log-file (string "/home/lars/offlineimap.log") "File where =E2=80=98offlineimap=E2=80=99 writes its log to.") (extra-options (list-of-strings '()) "This option provides an =E2=80=9Cescape hatch=E2=80=9D for the user to = provide arbitrary command-line arguments to =E2=80=98offlineimap=E2=80=99 as a list= of strings.") (home-service? (boolean for-home?) "")) (define offlineimap-shepherd-service (match-record-lambda (pid-file config-file log-file extra-options home-service?) (list (shepherd-service (provision '(offlineimap)) (documentation "") (requirement (if home-service? '() '(user-processes))) (start #~(make-forkexec-constructor (list (string-append #$offlineimap "/bin/offlineimap") #$@extra-options "-c" #$config-file "-l" #$log-file) #:log-file #$log-file #:pid-file #$pid-file)) (stop #~(make-kill-destructor)) (one-shot? #f) (respawn? #t))))) (define offlineimap-service-type (service-type (name 'offlineimap) (extensions (list (service-extension shepherd-root-service-type offlineimap-shepherd-service))) (default-value (offlineimap-configuration)) (description "Synchronize remote IMAP mail with local Maildir."))) (define home-offlineimap-service-type (service-type (inherit (system->home-service-type offlineimap-service-type)) (default-value (for-home (offlineimap-configuration))))) -8<---------------cut here---------------end--------------->8---