From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id oCjaFuS7/mZp2AAA62LTzQ:P1 (envelope-from ) for ; Thu, 03 Oct 2024 15:44:36 +0000 Received: from aspmx1.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1.migadu.com with LMTPS id oCjaFuS7/mZp2AAA62LTzQ (envelope-from ) for ; Thu, 03 Oct 2024 17:44:36 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=fail ("body hash did not verify") header.d=tethera.net header.s=2024 header.b="Mz/YOo4w"; spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 135.181.149.255 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org; dmarc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1727970276; h=from:from: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: in-reply-to:in-reply-to:references:references:list-id:list-help: list-owner:list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=ixnoLFctGTfvdusrfeV21Ch+OMn3vOXggijNOvCrv14=; b=FzVaNpAJwLe6tsODU+HMkIdxrlK+iE/ELuM1mNk33on7C4lolzrFsNKemd687CIqXETe2C fXQO72GAZVBuLRCQIHVVcIgvTWwJuLmpT6YFn9OvWL61ay0armFsWimq0WTGvHf52WWyat 5kV30m+facAodrExLkjoWLtY3LFzyd7SPW9iepOT8BIqYsaLmSou6VjJHQIfc7CLR06e5G J8ouVg//UA+6jNzR0XM9Tp69PGpcTAV+rOA6WhgcZUaSCVzO3CyHZdq30o1HieXz4FOTkd G2adKTh78dl33hRo0NmIrpSFExvpNwgR6EH4mnbvnsZVtPgsvOz1tU5CNQNgEA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1727970276; a=rsa-sha256; cv=none; b=Ul2cHkJcGXbH9JQ0GkmK94NiEJMN9ug5XBq6gCTCQDK5cRnCYZzUU0qN5WGVCK9U/LAeQS xorpi0La/d+slTy6AzxFeKbqmDumCIHNIFohrD5J5c6Z8Je+hKwuCz7/SSIJO8tRsWwi3j 4iG1cPfYnkBCsI2hzhw2UCpKNcpjTFXgNhojear+J1XFWO7FyECO+YHNuuZcu6r81sTPY5 LC6UoLgd0VGDNh0o/x5A6ZpJAxPWjFZQVhkv0ORZpGtBwkHUVKrMSMQo948+tE4CwkPthz jze3Gftla7yK1EbZWQmSmMVB5+Nz1KBGUr/7hw2anP+1596iup8BCpG/BJ7R/g== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("body hash did not verify") header.d=tethera.net header.s=2024 header.b="Mz/YOo4w"; spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 135.181.149.255 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org; dmarc=none Received: from mail.notmuchmail.org (yantan.tethera.net [135.181.149.255]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id B07D579009 for ; Thu, 03 Oct 2024 17:44:34 +0200 (CEST) Received: from yantan.tethera.net (localhost [127.0.0.1]) by mail.notmuchmail.org (Postfix) with ESMTP id CDB285F6B6; Thu, 3 Oct 2024 15:44:31 +0000 (UTC) Received: from phubs.tethera.net (phubs.tethera.net [IPv6:2607:5300:60:3a9d::1]) by mail.notmuchmail.org (Postfix) with ESMTPS id 6191B5E50D for ; Thu, 3 Oct 2024 15:44:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tethera.net; i=@tethera.net; q=dns/txt; s=2024; t=1727970265; h=from : to : subject : in-reply-to : references : date : message-id : mime-version : content-type : from; bh=Bs/OkWi+GmCtyZb0X5zBbhR7DpED+GAfR5MclAd9rXs=; b=Mz/YOo4wozJ6oiE7RdLU50IhtblfY9RSI44d91D9D031WRE4TQMtPLfEsSfesyuRDJMMJ SPOPIln6BtPg8GKFNNZ0aR4vSA7Kh6NK5SvolYVp4N5aLnjLhhJi94EhuZy1cIEZElJxzy5 AeqDdSpmSPkm+Q+5vv1WHI3Fakbj/yGWf/aoMi3Joznl5sFobpnGHKrYn/kHdJHQVXyFYHn qmn4b77Gv1Gb9HGcmLzLQBg9zqfqoZrl1RfmWWjwZ/O9tWPQtDttBmfAJJgOcOLSZ/H2gTl ORPVSYybivNlxjCcyDBFSDGX05LsQrHD7akYP0iwlpzpTQPmUhMFbP0CJxeA== Received: from tethera.net (fctnnbsc51w-159-2-211-58.dhcp-dynamic.fibreop.nb.bellaliant.net [159.2.211.58]) by phubs.tethera.net (Postfix) with ESMTPS id 1B61218006E; Thu, 3 Oct 2024 12:44:25 -0300 (ADT) Received: (nullmailer pid 91821 invoked by uid 1000); Thu, 03 Oct 2024 15:44:24 -0000 From: David Bremner To: Xiyue Deng , notmuch@notmuchmail.org Subject: Re: Hooks for sending/replying to set a custom header In-Reply-To: <87msjl4qmv.fsf@debian-hx90.lan> References: <87msjl4qmv.fsf@debian-hx90.lan> Date: Thu, 03 Oct 2024 12:44:24 -0300 Message-ID: <874j5t2ntz.fsf@tethera.net> MIME-Version: 1.0 Message-ID-Hash: 6NOFC6ARKU2UAX44QQSZYOMYPD3NZXP7 X-Message-ID-Hash: 6NOFC6ARKU2UAX44QQSZYOMYPD3NZXP7 X-MailFrom: david@tethera.net X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-notmuch.notmuchmail.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.3 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Migadu-Flow: FLOW_IN X-Migadu-Country: DE X-Migadu-Spam-Score: 6.55 X-Spam-Score: 6.55 X-Migadu-Queue-Id: B07D579009 X-Migadu-Scanner: mx13.migadu.com X-TUID: /mdxlEURpHEx Xiyue Deng writes: > Let me start by saying that I have been enjoying notmuch recently and > wish I had tried notmuch much earlier. > > I do encounter a small issue on managing multiple email accounts: I set > `message-default-mail-headers' with the SMTP settings and email address > so that smtpmail can send the mail through my specified email address, > and would like to change this setting based on which address I'm sending > from. However I'm having trouble finding the best place to set this in > notmuch when sending/replying. AIUI notmuch does not really have the > concept of mail account, so this may require some manual handling. I > tried to `re-search-forward' in notmuch-message-mode-hook for the `From: You could try out message-templ (elpa-message-templ in Debian). I'm using that to set the X-Message-SMTP-Method header, which sounds related. There is also message-server-alist, which does not need a header.