From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?utf-8?Q?Bj=C3=B6rn?= Bidar Newsgroups: gmane.emacs.help Subject: Re: Guidance with handling email from emacs Date: Tue, 26 Sep 2023 22:57:21 +0300 Message-ID: <87zg18btcu.fsf@thaodan.de> References: <87ttrozvm1.fsf@makinata.eu> <87ediryj1z.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="359"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Eshel Yaron , Bruno Victal , help-gnu-emacs@gnu.org To: Robert Pluim Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Tue Sep 26 21:58:12 2023 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1qlECC-000AQu-GZ for geh-help-gnu-emacs@m.gmane-mx.org; Tue, 26 Sep 2023 21:58:12 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qlEBX-00010z-2U; Tue, 26 Sep 2023 15:57:31 -0400 Original-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 1qlEBV-00010O-9j for help-gnu-emacs@gnu.org; Tue, 26 Sep 2023 15:57:29 -0400 Original-Received: from thaodan.de ([2a03:4000:4f:f15::1]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qlEBR-0005IB-Lj for help-gnu-emacs@gnu.org; Tue, 26 Sep 2023 15:57:29 -0400 Original-Received: from odin (dsl-trebng12-50dc77-87.dhcp.inet.fi [80.220.119.87]) by thaodan.de (Postfix) with ESMTPSA id DAD36D08DEB; Tue, 26 Sep 2023 22:57:21 +0300 (EEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=thaodan.de; s=mail; t=1695758242; bh=YziJa0obPS39UTTXFKzME/rtDR2nsBYOHEccmjSiz0c=; h=From:To:Cc:Subject:In-Reply-To:References:Date; b=BCrFs0VyZ6T+yQyln5LPe6puMZ5R580OUFmSuE9wXTkxXOWNYUIEeOfEYqwjDx/wd EdR9KI3vPf4GQ79KUey/dHVKVPKREKWwx9IyE6MhV4ym4qIlpclrJE1YFKbAQUZcS8 AhKDDzLq/Z7O7SLTlUcQJwL7mtLtApiws7tDBoPDBCxF9JTsMoXrFJ56+HuWtRmOeC HM+P6vQdNZ5BrC8kqoCwG5X1j7nniAmsx1fRmVKc113Is9WAcUOodkTm5tfC2vwKWU ZbIfbm66ZoALuWBWPMFDKpQOy1BHpxFja3eAeG20fRQwfZTNNDrPj7E+5+1NN4AigW CSGfC8JKtw1QVYfHpRwUI11ofiYevgvbGT3K1HTJWO/XgFiChXzFjD6Ehmo435c21H T76nPsOoFgPZv66MIDq26KcbyJM41WWceP+iBVEfwldSIq0YUoLTE+M/e7JOyOS0X4 eBNgNPAoqvYrXQLQFz3Jx+16SPj1rueZb8BR91+5ba2nTwJgaxJu6cNIoXXvNmTM+I ajFpo+zniptXnPgfCQ2KfGwFTe66+cIYHds/POjwd7/E3GPmR4PRnyLOWg8kRIleZq SGOYHB/dSJUGj+3tIdtFcw2DBfSPVgQJo4NrtTxWpSyJTjq9UxQ3hinxKZglV9Hf3A ROH+SPBYlf8bQ7N6UbQHPBUg= In-Reply-To: <87ediryj1z.fsf@gmail.com> (Robert Pluim's message of "Thu, 21 Sep 2023 11:25:28 +0200") Autocrypt: addr=bjorn.bidar@thaodan.de; prefer-encrypt=nopreference; keydata= mDMEZNfpPhYJKwYBBAHaRw8BAQdACBEmr+0xwIIHZfIDlZmm7sa+lHHSb0g9FZrN6qE6ru60JUJq w7ZybiBCaWRhciA8Ympvcm4uYmlkYXJAdGhhb2Rhbi5kZT6IlgQTFgoAPgIbAwULCQgHAgIiAgYV CgkICwIEFgIDAQIeBwIXgBYhBFHxdut1RzAepymoq1wbdKFlHF9oBQJk1/YmAhkBAAoJEFwbdKFl HF9oB9cBAJoIIGQKXm4cpap+Flxc/EGnYl0123lcEyzuduqvlDT0AQC3OlFKm/OiqJ8IMTrzJRZ8 phFssTkSrrFXnM2jm5PYDoiTBBMWCgA7FiEEUfF263VHMB6nKairXBt0oWUcX2gFAmTX6T4CGwMF CwkIBwICIgIGFQoJCAsCBBYCAwECHgcCF4AACgkQXBt0oWUcX2hbCQEAtru7kvM8hi8zo6z9ux2h K+B5xViKuo7Z8K3IXuK5ugwA+wUfKzomzdBPhfxDsqLcEziGRxoyx0Q3ld9aermBUccHtBxCasO2 cm4gQmlkYXIgPG1lQHRoYW9kYW4uZGU+iJMEExYKADsCGwMFCwkIBwICIgIGFQoJCAsCBBYCAwEC HgcCF4AWIQRR8XbrdUcwHqcpqKtcG3ShZRxfaAUCZNf2FQAKCRBcG3ShZRxfaCzSAP4hZ7cSp0YN XYpcjHdsySh2MuBhhoPeLGXs+2kSiqBiOwD/TP8AgPEg/R+SI9GI9on7fBJJ0mp2IT8kZ2rhDOjg gA6IkwQTFgoAOxYhBFHxdut1RzAepymoq1wbdKFlH Received-SPF: pass client-ip=2a03:4000:4f:f15::1; envelope-from=bjorn.bidar@thaodan.de; helo=thaodan.de 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, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.help:145168 Archived-At: Robert Pluim writes: > >> * Is there a =E2=80=9Cright=E2=80=9D way for easily handling multi= ple SMTP accounts (or > >> identities as Thunderbird calls them)? > > Eshel> Yes, there are a couple of ways to achieve this, none of them = are really > Eshel> great IMO. But the best way is to customize `message-server-a= list`. > Eshel> You can take a look at my email config here: > Eshel> http://git.eshelyaron.com/gitweb/?p=3Ddotfiles.git;a=3Dblob;f= =3D.emacs.d/lisp/esy-comm.el;hb=3DHEAD > > I=CA=BCve used `gnus-posting-styles' for this in the past. something like > > (setq gnus-posting-styles > '( > ("^nnimap\\+gmail" > (address "myusername@gmail.com") > ("X-Message-SMTP-Method" "smtp mail.gmail.com smtps myusername")) > ("^nnimap\\+yahoo" > (address "myusername@yahoo.com") > ("X-Message-SMTP-Method" "smtp mail.yahoo.com smtps myusername")= ))) Another option is to use gnus-alias. You can define `gnus-alias-identity-ru= les` to use a different identity based on the rules e.g. (setq gnus-alias-identity-rules '(("Example-Rule-name" ;; If the email was send To: an address from example.com ;; use the alias called user@example.com ("to" ".+@.*example.com" previous) "user@example.com"))) This way you can define an alias and set settings such as the smtp method: (setq gnus-alias-identity-alist '(("user@example.com" ;; Alias "" ;; Refers-To: "Example User " ;; To: "Example Org" ;; Organization ;; Set Gcc so mails are send in the Send folder ;; on the imap server example.com (("Gcc" . "nnimap+example.com:Sent") ;; Using X-Message-SMTP-Method we can tell ;; Emacs wich smtp server to use, doesn't depend on ;; gnus-alias=20 ("X-Message-SMTP-Method" . "smtp smtp.example.com 25 user@example.com")) ;; headers "" ;; Body Text "") ;; Signature