From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.user/18173 Path: news.gmane.org!not-for-mail From: Eric Abrahamsen Newsgroups: gmane.emacs.gnus.user Subject: Re: make sent emails synced in imap sent folder Date: Thu, 10 Mar 2016 11:40:29 +0800 Message-ID: <87wppbf1aq.fsf@ericabrahamsen.net> References: <87vb4y1hkp.fsf@zhtux.jiantu.boxes> <87d1r5nqzj.fsf@zhtux.jiantu.boxes> <87lh5r6mse.fsf@zhtux.jiantu.boxes> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1457581261 10148 80.91.229.3 (10 Mar 2016 03:41:01 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 10 Mar 2016 03:41:01 +0000 (UTC) To: info-gnus-english@gnu.org Original-X-From: info-gnus-english-bounces+gegu-info-gnus-english=m.gmane.org@gnu.org Thu Mar 10 04:40:52 2016 Return-path: Envelope-to: gegu-info-gnus-english@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1adrT1-0008Ii-AW for gegu-info-gnus-english@m.gmane.org; Thu, 10 Mar 2016 04:40:51 +0100 Original-Received: from localhost ([::1]:45934 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1adrSx-0000O2-9K for gegu-info-gnus-english@m.gmane.org; Wed, 09 Mar 2016 22:40:47 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:49815) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1adrSu-0000Nt-Vs for info-gnus-english@gnu.org; Wed, 09 Mar 2016 22:40:45 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1adrSp-0005ga-IH for info-gnus-english@gnu.org; Wed, 09 Mar 2016 22:40:44 -0500 Original-Received: from plane.gmane.org ([80.91.229.3]:38455) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1adrSp-0005gK-BL for info-gnus-english@gnu.org; Wed, 09 Mar 2016 22:40:39 -0500 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1adrSm-00089E-7f for info-gnus-english@gnu.org; Thu, 10 Mar 2016 04:40:36 +0100 Original-Received: from 114.248.30.198 ([114.248.30.198]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 10 Mar 2016 04:40:36 +0100 Original-Received: from eric by 114.248.30.198 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 10 Mar 2016 04:40:36 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 57 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: 114.248.30.198 User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) Cancel-Lock: sha1:EOIf9vgpB3W3MdTkISg3Gpmn9D8= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 X-BeenThere: info-gnus-english@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Announcements and discussions for GNUS, the GNU Emacs Usenet newsreader \(in English\)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: info-gnus-english-bounces+gegu-info-gnus-english=m.gmane.org@gnu.org Original-Sender: info-gnus-english-bounces+gegu-info-gnus-english=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.gnus.user:18173 Archived-At: fkqqrr@autistici.org writes: > Eric Abrahamsen writes: > >> Fkqqrr writes: >> >>> Eric Abrahamsen writes: >>> >>>> fkqqrr writes: >>>> >>>>> When sending email in Gnus, 'sent' emails by default go into >>>>> 'archive' folder locally. >>>>> >>>>> How to set sent emails to IMAP sent folder? >>>> >>>> You can set the `gnus-message-archive-group' option to the desired >>>> "Sent" folder. If you have more than one account you're trying to set >>>> up, you can set that option to a function that takes one argument, a >>>> group name, and returns the appropriate archive group. In my case: >>>> >>>> (defun my-archiver-figure-outer (group) >>>> (cond ((string-match-p "nnimap\\+This-Account\\|gmane" group) >>>> "nnimap+This-Account:Sent") >>>> ((string-match-p "nnimap\\+That-Account" group) >>>> "nnimap+That-Account:Sent"))) >>>> >>>> (setq gnus-message-archive-group #'my-archiver-figure-outer) >>> By the way, this method will send the email again to nnimap sent >>> folder on email server? >> >> That's right, it will result in the sent mail being pushed to your imap >> server. There isn't any "automatic" connection between your SMTP server >> and your imap mail store, so you have to do the archiving yourself. > > I thought the IMAP and SMTP server are 'auto-connected'. Well, it depends on the email service you're using. Most commercial providers will "auto-connect" the two behind the scenes, because that's what users expect, but in fact the two protocols have nothing to do with each other (not only that, your SMTP account and your imap account are theoretically completely separate accounts). You haven't given us a whole lot of information here -- I assume you're using an email provider of some kind, which should be doing this connection for you. Are you sure you need Gccs at all? > So sent items: connect to both receiver's IMAP and my IMAP (archive) Not quite: message-mode ends up connecting to your SMTP server, which sends the message through one or more mail transfer agents, until it ends up in the receiver's imap (or other) mail account. If there's a Gcc header in your sent message, Gnus will also put a copy of the message in your archive group. So sending a message potentially involves two copies: one to SMTP, the other to your imap account. Hope that helps, Eric