Announcements and discussions for Gnus, the GNU Emacs Usenet newsreader
 help / color / mirror / Atom feed
* make sent emails synced in imap sent folder
@ 2016-03-07 14:35 fkqqrr
  2016-03-07 15:13 ` Eric Abrahamsen
                   ` (2 more replies)
  0 siblings, 3 replies; 21+ messages in thread
From: fkqqrr @ 2016-03-07 14:35 UTC (permalink / raw)
  To: info-gnus-english


When sending email in Gnus, 'sent' emails by default go into
'archive' folder locally.

How to set sent emails to IMAP sent folder?

-- 
Whatever you are, be a good one

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: make sent emails synced in imap sent folder
  2016-03-07 14:35 make sent emails synced in imap sent folder fkqqrr
@ 2016-03-07 15:13 ` Eric Abrahamsen
  2016-03-08  7:16 ` Gijs Hillenius
       [not found] ` <mailman.6969.1457363607.843.info-gnus-english@gnu.org>
  2 siblings, 0 replies; 21+ messages in thread
From: Eric Abrahamsen @ 2016-03-07 15:13 UTC (permalink / raw)
  To: info-gnus-english

fkqqrr <fkqqrr@autistici.org> 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)

I might be wrong, but it should also be possible to set the Gcc header
in posting styles (?).

Eric



^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: make sent emails synced in imap sent folder
  2016-03-07 14:35 make sent emails synced in imap sent folder fkqqrr
  2016-03-07 15:13 ` Eric Abrahamsen
@ 2016-03-08  7:16 ` Gijs Hillenius
  2016-03-08 12:07   ` Fkqqrr
  2016-03-08 12:41   ` Fkqqrr
       [not found] ` <mailman.6969.1457363607.843.info-gnus-english@gnu.org>
  2 siblings, 2 replies; 21+ messages in thread
From: Gijs Hillenius @ 2016-03-08  7:16 UTC (permalink / raw)
  To: info-gnus-english

On  7 Mar 2016, fkqqrr@autistici.org wrote:

>
> When sending email in Gnus, 'sent' emails by default go into
> 'archive' folder locally.
>
> How to set sent emails to IMAP sent folder?

I use

;; Archive Sent Mail On Imap Server
(setq gnus-message-archive-method 
      '(nnimap "name-of-your-server-here"))

;; E-mail archive, per month
(setq gnus-message-archive-group
      '((if (message-news-p)
  	    "INBOX.misc-news"
	  (concat "INBOX.sent." (format-time-string "%Y-%m")))))


^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: make sent emails synced in imap sent folder
       [not found] ` <mailman.6969.1457363607.843.info-gnus-english@gnu.org>
@ 2016-03-08 11:12   ` Fkqqrr
  2016-03-08 11:33   ` Fkqqrr
  2016-03-09  2:11   ` Emcc
  2 siblings, 0 replies; 21+ messages in thread
From: Fkqqrr @ 2016-03-08 11:12 UTC (permalink / raw)
  To: info-gnus-english

Eric Abrahamsen <eric@ericabrahamsen.net> writes:

> fkqqrr <fkqqrr@autistici.org> writes:
>
>> When sending email in Gnus, 'sent' emails by default go into
>> 'archive' folder locally.
I missed some clues. Some imap account will automatically sync
a copy of sent emails to imap sent folder as well as local archive
folder. But another imap email account won't do this. That's weird.

>
> 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")))
>
Hi Eric, '\\|gmane' above is to place 'sent messgages in gmane' to
your email server?

That means 'This-account' (email) and gmane (news) share the same
sent folder of your email account. A possible guess is you use
'This-account' to post messages to gmane news groups.

Currently I only have one smtp account while many imap acount. It
seems that Gnus does not support another 'That-Account', right?
> (setq gnus-message-archive-group #'my-archiver-figure-outer)
>
> I might be wrong, but it should also be possible to set the Gcc header
> in posting styles (?).
>
> Eric
>
>

-- 
Whatever you are, be a good one

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: make sent emails synced in imap sent folder
       [not found] ` <mailman.6969.1457363607.843.info-gnus-english@gnu.org>
  2016-03-08 11:12   ` Fkqqrr
@ 2016-03-08 11:33   ` Fkqqrr
  2016-03-10  1:30     ` Eric Abrahamsen
       [not found]     ` <mailman.7195.1457573482.843.info-gnus-english@gnu.org>
  2016-03-09  2:11   ` Emcc
  2 siblings, 2 replies; 21+ messages in thread
From: Fkqqrr @ 2016-03-08 11:33 UTC (permalink / raw)
  To: info-gnus-english

Eric Abrahamsen <eric@ericabrahamsen.net> writes:

> fkqqrr <fkqqrr@autistici.org> 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?
>
> I might be wrong, but it should also be possible to set the Gcc header
> in posting styles (?).
>
> Eric
>
>

-- 
Whatever you are, be a good one

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: make sent emails synced in imap sent folder
  2016-03-08  7:16 ` Gijs Hillenius
@ 2016-03-08 12:07   ` Fkqqrr
  2016-03-08 12:41   ` Fkqqrr
  1 sibling, 0 replies; 21+ messages in thread
From: Fkqqrr @ 2016-03-08 12:07 UTC (permalink / raw)
  To: info-gnus-english

Gijs Hillenius <gijs@hillenius.net> writes:

> On  7 Mar 2016, fkqqrr@autistici.org wrote:
>
>>
>> When sending email in Gnus, 'sent' emails by default go into
>> 'archive' folder locally.
>>
>> How to set sent emails to IMAP sent folder?
>
> I use
Ha, this is a straightward solution.
>
> ;; Archive Sent Mail On Imap Server
> (setq gnus-message-archive-method 
>       '(nnimap "name-of-your-server-here"))
Like `imap.gmail.com'?

I have a doubt. Use this setting, all sent items (news and mails)
are placed in email server's 'sent' folder.

1. If I am right, mail server can do this automatcially when
sending email. This is from my past experience. No matter send by
browser or client, sent emails are synced with 'sent' folder in
mail server. This is done, I think, by IMAP server.

2. Some mail servers, all sent emails go to
local archive sent group (%Y-%m). Meanwhile, they are synced with
mail server 'sent' folder too.

  However, some other email servers won't sync! This is why I need
  explicit archive method and archive group setting.

  Do you have any clues why some sync while others not?
>
> ;; E-mail archive, per month
> (setq gnus-message-archive-group
>       '((if (message-news-p)
>   	    "INBOX.misc-news"
> 	  (concat "INBOX.sent." (format-time-string "%Y-%m")))))
>

-- 
Whatever you are, be a good one

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: make sent emails synced in imap sent folder
  2016-03-08  7:16 ` Gijs Hillenius
  2016-03-08 12:07   ` Fkqqrr
@ 2016-03-08 12:41   ` Fkqqrr
  2016-03-08 14:53     ` Gijs Hillenius
  1 sibling, 1 reply; 21+ messages in thread
From: Fkqqrr @ 2016-03-08 12:41 UTC (permalink / raw)
  To: info-gnus-english

Gijs Hillenius <gijs@hillenius.net> writes:

> On  7 Mar 2016, fkqqrr@autistici.org wrote:
>
>>
>> When sending email in Gnus, 'sent' emails by default go into
>> 'archive' folder locally.
>>
>> How to set sent emails to IMAP sent folder?
>
> I use
>
> ;; Archive Sent Mail On Imap Server
> (setq gnus-message-archive-method 
>       '(nnimap "name-of-your-server-here"))
>
> ;; E-mail archive, per month
> (setq gnus-message-archive-group
>       '((if (message-news-p)
>   	    "INBOX.misc-news"
> 	  (concat "INBOX.sent." (format-time-string "%Y-%m")))))
1. Will this create new 'sent' folders per month under 'Inbox'
folder?
2. How about the original default 'sent' folder on imap server?
>

-- 
Whatever you are, be a good one

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: make sent emails synced in imap sent folder
  2016-03-08 12:41   ` Fkqqrr
@ 2016-03-08 14:53     ` Gijs Hillenius
  2016-03-09  2:06       ` Emcc
  0 siblings, 1 reply; 21+ messages in thread
From: Gijs Hillenius @ 2016-03-08 14:53 UTC (permalink / raw)
  To: info-gnus-english

On  8 Mar 2016, fkqqrr@autistici.org wrote:

> Gijs Hillenius <gijs@hillenius.net> writes:
>
>> On  7 Mar 2016, fkqqrr@autistici.org wrote:
>>
>>>
>>> When sending email in Gnus, 'sent' emails by default go into
>>> 'archive' folder locally.
>>>
>>> How to set sent emails to IMAP sent folder?
>>
>> I use
>>
>> ;; Archive Sent Mail On Imap Server
>> (setq gnus-message-archive-method 
>> '(nnimap "name-of-your-server-here"))

name-of-your-server-here should correspond to the name you defined for
the imap server in the server buffer

>> ;; E-mail archive, per month
>> (setq gnus-message-archive-group
>> '((if (message-news-p)
>> 	    "INBOX.misc-news"
>> 	  (concat "INBOX.sent." (format-time-string "%Y-%m")))))
> 1. Will this create new 'sent' folders per month under 'Inbox'
> folder?

yes. My group buffer lists them like so:

nnimap+thuis:INBOX.sent.2015-01
nnimap+thuis:INBOX.sent.2015-02
nnimap+thuis:INBOX.sent.2015-03
nnimap+thuis:INBOX.sent.2015-04
nnimap+thuis:INBOX.sent.2015-05

every now and then I unsubscribe a bunch of these so that the list
becomes not too unwieldy

> 2. How about the original default 'sent' folder on imap server?

Yep, that is there too. And other imap clients will add Sent, instead of
sent, so you have quite a few sent folders to manage.


^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: make sent emails synced in imap sent folder
  2016-03-08 14:53     ` Gijs Hillenius
@ 2016-03-09  2:06       ` Emcc
  0 siblings, 0 replies; 21+ messages in thread
From: Emcc @ 2016-03-09  2:06 UTC (permalink / raw)
  To: info-gnus-english

Gijs Hillenius <gijs@hillenius.net> writes:

>>> ;; Archive Sent Mail On Imap Server
>>> (setq gnus-message-archive-method 
>>> '(nnimap "name-of-your-server-here"))
>
> name-of-your-server-here should correspond to the name you defined for
> the imap server in the server buffer
1. Must this imap server be consistent with my current smtp server?


2. What if: imap.gmail.com for sent archive while smtp.outlook.com for sending?
>
>>> ;; E-mail archive, per month
>>> (setq gnus-message-archive-group
>>> '((if (message-news-p)
>>> 	    "INBOX.misc-news"
>>> 	  (concat "INBOX.sent." (format-time-string "%Y-%m")))))
>> 1. Will this create new 'sent' folders per month under 'Inbox'
>> folder?
>

> nnimap+thuis:INBOX.sent.2015-01
> nnimap+thuis:INBOX.sent.2015-02
> nnimap+thuis:INBOX.sent.2015-03
> nnimap+thuis:INBOX.sent.2015-04
> nnimap+thuis:INBOX.sent.2015-05
>
3. Traditionally, when using email through browser, we can see
folders (letter case sensitive) like 'Inbox', 'Sent', 'Trash'
etc. 'Inbox' is for receving emails while 'Sent' folder is for our
written emails. Why use 'INBOX.sent.' prefix?  Why not
'Sent.2015-01'? Is there any difference between 'INBOX' and
'Inbox'? 
>
-- 
Whatever you are, be a good one

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: make sent emails synced in imap sent folder
       [not found] ` <mailman.6969.1457363607.843.info-gnus-english@gnu.org>
  2016-03-08 11:12   ` Fkqqrr
  2016-03-08 11:33   ` Fkqqrr
@ 2016-03-09  2:11   ` Emcc
  2 siblings, 0 replies; 21+ messages in thread
From: Emcc @ 2016-03-09  2:11 UTC (permalink / raw)
  To: info-gnus-english

Eric Abrahamsen <eric@ericabrahamsen.net> writes:

> fkqqrr <fkqqrr@autistici.org> 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)
>
> I might be wrong, but it should also be possible to set the Gcc header
> in posting styles (?).
Afer using your code, it will automatically add a Gcc header
whenever writing new message or mail.

But we can add manually a gcc header if need.
>
> Eric
>
>

-- 
Whatever you are, be a good one

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: make sent emails synced in imap sent folder
  2016-03-08 11:33   ` Fkqqrr
@ 2016-03-10  1:30     ` Eric Abrahamsen
       [not found]     ` <mailman.7195.1457573482.843.info-gnus-english@gnu.org>
  1 sibling, 0 replies; 21+ messages in thread
From: Eric Abrahamsen @ 2016-03-10  1:30 UTC (permalink / raw)
  To: info-gnus-english

Fkqqrr <fkqqrr@autistici.org> writes:

> Eric Abrahamsen <eric@ericabrahamsen.net> writes:
>
>> fkqqrr <fkqqrr@autistici.org> 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.



^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: make sent emails synced in imap sent folder
       [not found]     ` <mailman.7195.1457573482.843.info-gnus-english@gnu.org>
@ 2016-03-10  3:21       ` fkqqrr
  2016-03-10  3:40         ` Eric Abrahamsen
       [not found]         ` <mailman.7199.1457581246.843.info-gnus-english@gnu.org>
  2016-03-10  7:38       ` fkqqrr
  1 sibling, 2 replies; 21+ messages in thread
From: fkqqrr @ 2016-03-10  3:21 UTC (permalink / raw)
  To: info-gnus-english

Eric Abrahamsen <eric@ericabrahamsen.net> writes:

> Fkqqrr <fkqqrr@autistici.org> writes:
>
>> Eric Abrahamsen <eric@ericabrahamsen.net> writes:
>>
>>> fkqqrr <fkqqrr@autistici.org> 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'.

So sent items: connect to both receiver's IMAP and my IMAP (archive)
-- 
Who am I? Where am I from? Where would I go?

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: make sent emails synced in imap sent folder
  2016-03-10  3:21       ` fkqqrr
@ 2016-03-10  3:40         ` Eric Abrahamsen
       [not found]         ` <mailman.7199.1457581246.843.info-gnus-english@gnu.org>
  1 sibling, 0 replies; 21+ messages in thread
From: Eric Abrahamsen @ 2016-03-10  3:40 UTC (permalink / raw)
  To: info-gnus-english

fkqqrr@autistici.org writes:

> Eric Abrahamsen <eric@ericabrahamsen.net> writes:
>
>> Fkqqrr <fkqqrr@autistici.org> writes:
>>
>>> Eric Abrahamsen <eric@ericabrahamsen.net> writes:
>>>
>>>> fkqqrr <fkqqrr@autistici.org> 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



^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: make sent emails synced in imap sent folder
       [not found]         ` <mailman.7199.1457581246.843.info-gnus-english@gnu.org>
@ 2016-03-10  3:55           ` fkqqrr
  0 siblings, 0 replies; 21+ messages in thread
From: fkqqrr @ 2016-03-10  3:55 UTC (permalink / raw)
  To: info-gnus-english

Eric Abrahamsen <eric@ericabrahamsen.net> writes:

> fkqqrr@autistici.org writes:
>
>> Eric Abrahamsen <eric@ericabrahamsen.net> writes:
>>
>>> Fkqqrr <fkqqrr@autistici.org> writes:
>>>
>>>> Eric Abrahamsen <eric@ericabrahamsen.net> writes:
>>>>
>>>>> fkqqrr <fkqqrr@autistici.org> 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?
My problem was solved. I just don't the idea behind.
>
>> 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.
That clarifies my clouds.
>
> Hope that helps,
> Eric
>
>

-- 
Who am I? Where am I from? Where would I go?

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: make sent emails synced in imap sent folder
       [not found]     ` <mailman.7195.1457573482.843.info-gnus-english@gnu.org>
  2016-03-10  3:21       ` fkqqrr
@ 2016-03-10  7:38       ` fkqqrr
  2016-03-10  7:47         ` Eric Abrahamsen
       [not found]         ` <mailman.7214.1457596037.843.info-gnus-english@gnu.org>
  1 sibling, 2 replies; 21+ messages in thread
From: fkqqrr @ 2016-03-10  7:38 UTC (permalink / raw)
  To: info-gnus-english

Eric Abrahamsen <eric@ericabrahamsen.net> writes:

> Fkqqrr <fkqqrr@autistici.org> writes:
>
>> Eric Abrahamsen <eric@ericabrahamsen.net> writes:
>>
>>> fkqqrr <fkqqrr@autistici.org> 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")))
If all `cond' does not match, where will the `archive' message go?
(for example, just write a new mail by `m' without enterning any
group. Just stay on the start `Group' buffer)

I know the default is `archive' on local disk. But this line:
>>> (setq gnus-message-archive-group #'my-archiver-figure-outer)
prevents un-matched sent items archived locally.

Should I add a condition:

   ((string-match-p ".*" group)
    "nnimap+3rd-account:Sent")

  Like this?
>> 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.
>
>

-- 
Who am I? Where am I from? Where am I going?

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: make sent emails synced in imap sent folder
  2016-03-10  7:38       ` fkqqrr
@ 2016-03-10  7:47         ` Eric Abrahamsen
       [not found]         ` <mailman.7214.1457596037.843.info-gnus-english@gnu.org>
  1 sibling, 0 replies; 21+ messages in thread
From: Eric Abrahamsen @ 2016-03-10  7:47 UTC (permalink / raw)
  To: info-gnus-english

fkqqrr@autistici.org writes:

> Eric Abrahamsen <eric@ericabrahamsen.net> writes:
>
>> Fkqqrr <fkqqrr@autistici.org> writes:
>>
>>> Eric Abrahamsen <eric@ericabrahamsen.net> writes:
>>>
>>>> fkqqrr <fkqqrr@autistici.org> 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")))
> If all `cond' does not match, where will the `archive' message go?
> (for example, just write a new mail by `m' without enterning any
> group. Just stay on the start `Group' buffer)
>
> I know the default is `archive' on local disk. But this line:
>>>> (setq gnus-message-archive-group #'my-archiver-figure-outer)
> prevents un-matched sent items archived locally.
>
> Should I add a condition:
>
>    ((string-match-p ".*" group)
>     "nnimap+3rd-account:Sent")

The `cond' form usually takes a final "t" condition, which serves as a
catch-all for when nothing else matches. I didn't put one in there
because I couldn't be bothered. So:

(cond ((string-match-p "nnimap\\+NEA\\|gmane" group)
	 "nnimap+NEA:Sent")
	((string-match-p "nnimap\\+NPR" group)
	 "nnimap+NPR:Sent")
	(t "archive"))

Or "nnimap+3rd-account:Sent", if you like.



^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: make sent emails synced in imap sent folder
       [not found]         ` <mailman.7214.1457596037.843.info-gnus-english@gnu.org>
@ 2016-03-10  8:33           ` fkqqrr
  2016-05-04  7:21           ` Alice Bob
  1 sibling, 0 replies; 21+ messages in thread
From: fkqqrr @ 2016-03-10  8:33 UTC (permalink / raw)
  To: info-gnus-english

Eric Abrahamsen <eric@ericabrahamsen.net> writes:

> fkqqrr@autistici.org writes:
>
>> Eric Abrahamsen <eric@ericabrahamsen.net> writes:
>>
>>> Fkqqrr <fkqqrr@autistici.org> writes:
>>>
>>>> Eric Abrahamsen <eric@ericabrahamsen.net> writes:
>>>>
>>>>> fkqqrr <fkqqrr@autistici.org> 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")))
>> If all `cond' does not match, where will the `archive' message go?
>> (for example, just write a new mail by `m' without enterning any
>> group. Just stay on the start `Group' buffer)
>>
>> I know the default is `archive' on local disk. But this line:
>>>>> (setq gnus-message-archive-group #'my-archiver-figure-outer)
>> prevents un-matched sent items archived locally.
>>
>> Should I add a condition:
>>
>>    ((string-match-p ".*" group)
>>     "nnimap+3rd-account:Sent")
>
> The `cond' form usually takes a final "t" condition, which serves as a
> catch-all for when nothing else matches. I didn't put one in there
> because I couldn't be bothered. So:
>
> (cond ((string-match-p "nnimap\\+NEA\\|gmane" group)
> 	 "nnimap+NEA:Sent")
> 	((string-match-p "nnimap\\+NPR" group)
> 	 "nnimap+NPR:Sent")
> 	(t "archive"))
>
> Or "nnimap+3rd-account:Sent", if you like.
This really helps. I can also set the default un-matched archive
method by `gnus-message-archive-method'.
>

-- 
Who am I? Where am I from? Where am I going?

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: make sent emails synced in imap sent folder
       [not found]         ` <mailman.7214.1457596037.843.info-gnus-english@gnu.org>
  2016-03-10  8:33           ` fkqqrr
@ 2016-05-04  7:21           ` Alice Bob
  2016-06-08  2:13             ` Eric Abrahamsen
       [not found]             ` <mailman.1102.1465352106.1216.info-gnus-english@gnu.org>
  1 sibling, 2 replies; 21+ messages in thread
From: Alice Bob @ 2016-05-04  7:21 UTC (permalink / raw)
  To: info-gnus-english

Eric Abrahamsen <eric@ericabrahamsen.net> writes:

> fkqqrr@autistici.org writes:
>
>> Eric Abrahamsen <eric@ericabrahamsen.net> writes:
>>
>>> Fkqqrr <fkqqrr@autistici.org> writes:
>>>
>>>> Eric Abrahamsen <eric@ericabrahamsen.net> writes:
>>>>
>>>>> fkqqrr <fkqqrr@autistici.org> 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")))
>> If all `cond' does not match, where will the `archive' message go?
>> (for example, just write a new mail by `m' without enterning any
>> group. Just stay on the start `Group' buffer)
>>
>> I know the default is `archive' on local disk. But this line:
>>>>> (setq gnus-message-archive-group #'my-archiver-figure-outer)
>> prevents un-matched sent items archived locally.
>>
>> Should I add a condition:
>>
>>    ((string-match-p ".*" group)
>>     "nnimap+3rd-account:Sent")
>
> The `cond' form usually takes a final "t" condition, which serves as a
> catch-all for when nothing else matches. I didn't put one in there
> because I couldn't be bothered. So:
>
> (cond ((string-match-p "nnimap\\+NEA\\|gmane" group)
> 	 "nnimap+NEA:Sent")
> 	((string-match-p "nnimap\\+NPR" group)
> 	 "nnimap+NPR:Sent")
> 	(t "archive"))
>
> Or "nnimap+3rd-account:Sent", if you like.
>
>
An issue:

I can see the header: `Gcc: nnimap+NEA:Sent.misc-news'. But the
news is actually archived to `Gcc: nnimap+NPR:Sent.misc-news'.

On my system, NPR is the default `gnus-message-archive-method'.
-- 
Who am I? Where am I from? Where am I going?

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: make sent emails synced in imap sent folder
  2016-05-04  7:21           ` Alice Bob
@ 2016-06-08  2:13             ` Eric Abrahamsen
       [not found]             ` <mailman.1102.1465352106.1216.info-gnus-english@gnu.org>
  1 sibling, 0 replies; 21+ messages in thread
From: Eric Abrahamsen @ 2016-06-08  2:13 UTC (permalink / raw)
  To: info-gnus-english

Alice Bob <alicebob@riseup.net> writes:

> Eric Abrahamsen <eric@ericabrahamsen.net> writes:
>
>> fkqqrr@autistici.org writes:
>>
>>> Eric Abrahamsen <eric@ericabrahamsen.net> writes:
>>>
>>>> Fkqqrr <fkqqrr@autistici.org> writes:
>>>>
>>>>> Eric Abrahamsen <eric@ericabrahamsen.net> writes:
>>>>>
>>>>>> fkqqrr <fkqqrr@autistici.org> 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")))
>>> If all `cond' does not match, where will the `archive' message go?
>>> (for example, just write a new mail by `m' without enterning any
>>> group. Just stay on the start `Group' buffer)
>>>
>>> I know the default is `archive' on local disk. But this line:
>>>>>> (setq gnus-message-archive-group #'my-archiver-figure-outer)
>>> prevents un-matched sent items archived locally.
>>>
>>> Should I add a condition:
>>>
>>>    ((string-match-p ".*" group)
>>>     "nnimap+3rd-account:Sent")
>>
>> The `cond' form usually takes a final "t" condition, which serves as a
>> catch-all for when nothing else matches. I didn't put one in there
>> because I couldn't be bothered. So:
>>
>> (cond ((string-match-p "nnimap\\+NEA\\|gmane" group)
>> 	 "nnimap+NEA:Sent")
>> 	((string-match-p "nnimap\\+NPR" group)
>> 	 "nnimap+NPR:Sent")
>> 	(t "archive"))
>>
>> Or "nnimap+3rd-account:Sent", if you like.
>>
>>
> An issue:
>
> I can see the header: `Gcc: nnimap+NEA:Sent.misc-news'. But the
> news is actually archived to `Gcc: nnimap+NPR:Sent.misc-news'.
>
> On my system, NPR is the default `gnus-message-archive-method'.

Sorry for the late response... Unfortunately I'm not sure why the header
wouldn't take effect: are you sure that nnimap+NEA:Sent.misc-news
actually exists? And what's the full value for
`gnus-message-archive-method'?

Eric



^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: make sent emails synced in imap sent folder
       [not found]             ` <mailman.1102.1465352106.1216.info-gnus-english@gnu.org>
@ 2016-06-08 13:58               ` Alice Bob
  2016-06-09  1:11                 ` Eric Abrahamsen
  0 siblings, 1 reply; 21+ messages in thread
From: Alice Bob @ 2016-06-08 13:58 UTC (permalink / raw)
  To: info-gnus-english

Eric Abrahamsen <eric@ericabrahamsen.net> writes:

> Alice Bob <alicebob@riseup.net> writes:
>
>> Eric Abrahamsen <eric@ericabrahamsen.net> writes:
>>
>>> fkqqrr@autistici.org writes:
>>>
>>>> Eric Abrahamsen <eric@ericabrahamsen.net> writes:
>>>>
>>>>> Fkqqrr <fkqqrr@autistici.org> writes:
>>>>>
>>>>>> Eric Abrahamsen <eric@ericabrahamsen.net> writes:
>>>>>>
>>>>>>> fkqqrr <fkqqrr@autistici.org> 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")))
>>>> If all `cond' does not match, where will the `archive' message go?
>>>> (for example, just write a new mail by `m' without enterning any
>>>> group. Just stay on the start `Group' buffer)
>>>>
>>>> I know the default is `archive' on local disk. But this line:
>>>>>>> (setq gnus-message-archive-group #'my-archiver-figure-outer)
>>>> prevents un-matched sent items archived locally.
>>>>
>>>> Should I add a condition:
>>>>
>>>>    ((string-match-p ".*" group)
>>>>     "nnimap+3rd-account:Sent")
>>>
>>> The `cond' form usually takes a final "t" condition, which serves as a
>>> catch-all for when nothing else matches. I didn't put one in there
>>> because I couldn't be bothered. So:
>>>
>>> (cond ((string-match-p "nnimap\\+NEA\\|gmane" group)
>>> 	 "nnimap+NEA:Sent")
>>> 	((string-match-p "nnimap\\+NPR" group)
>>> 	 "nnimap+NPR:Sent")
>>> 	(t "archive"))
>>>
>>> Or "nnimap+3rd-account:Sent", if you like.
>>>
>>>
>> An issue:
>>
>> I can see the header: `Gcc: nnimap+NEA:Sent.misc-news'. But the
>> news is actually archived to `Gcc: nnimap+NPR:Sent.misc-news'.
>>
>> On my system, NPR is the default `gnus-message-archive-method'.
>
> Sorry for the late response... Unfortunately I'm not sure why the header
> wouldn't take effect: are you sure that nnimap+NEA:Sent.misc-news
> actually exists? And what's the full value for
> `gnus-message-archive-method'?
>
> Eric
Many thanks to Eric.

Issue solved by:

`(setq gnus-update-message-archive-method t)'

-- 
horizon

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: make sent emails synced in imap sent folder
  2016-06-08 13:58               ` Alice Bob
@ 2016-06-09  1:11                 ` Eric Abrahamsen
  0 siblings, 0 replies; 21+ messages in thread
From: Eric Abrahamsen @ 2016-06-09  1:11 UTC (permalink / raw)
  To: info-gnus-english

Alice Bob <alicebob@riseup.net> writes:

> Eric Abrahamsen <eric@ericabrahamsen.net> writes:
>
>> Alice Bob <alicebob@riseup.net> writes:
>>
>>> Eric Abrahamsen <eric@ericabrahamsen.net> writes:
>>>
>>>> fkqqrr@autistici.org writes:
>>>>
>>>>> Eric Abrahamsen <eric@ericabrahamsen.net> writes:
>>>>>
>>>>>> Fkqqrr <fkqqrr@autistici.org> writes:
>>>>>>
>>>>>>> Eric Abrahamsen <eric@ericabrahamsen.net> writes:
>>>>>>>
>>>>>>>> fkqqrr <fkqqrr@autistici.org> 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")))
>>>>> If all `cond' does not match, where will the `archive' message go?
>>>>> (for example, just write a new mail by `m' without enterning any
>>>>> group. Just stay on the start `Group' buffer)
>>>>>
>>>>> I know the default is `archive' on local disk. But this line:
>>>>>>>> (setq gnus-message-archive-group #'my-archiver-figure-outer)
>>>>> prevents un-matched sent items archived locally.
>>>>>
>>>>> Should I add a condition:
>>>>>
>>>>>    ((string-match-p ".*" group)
>>>>>     "nnimap+3rd-account:Sent")
>>>>
>>>> The `cond' form usually takes a final "t" condition, which serves as a
>>>> catch-all for when nothing else matches. I didn't put one in there
>>>> because I couldn't be bothered. So:
>>>>
>>>> (cond ((string-match-p "nnimap\\+NEA\\|gmane" group)
>>>> 	 "nnimap+NEA:Sent")
>>>> 	((string-match-p "nnimap\\+NPR" group)
>>>> 	 "nnimap+NPR:Sent")
>>>> 	(t "archive"))
>>>>
>>>> Or "nnimap+3rd-account:Sent", if you like.
>>>>
>>>>
>>> An issue:
>>>
>>> I can see the header: `Gcc: nnimap+NEA:Sent.misc-news'. But the
>>> news is actually archived to `Gcc: nnimap+NPR:Sent.misc-news'.
>>>
>>> On my system, NPR is the default `gnus-message-archive-method'.
>>
>> Sorry for the late response... Unfortunately I'm not sure why the header
>> wouldn't take effect: are you sure that nnimap+NEA:Sent.misc-news
>> actually exists? And what's the full value for
>> `gnus-message-archive-method'?
>>
>> Eric
> Many thanks to Eric.
>
> Issue solved by:
>
> `(setq gnus-update-message-archive-method t)'

Ah, glad that got sorted!

E



^ permalink raw reply	[flat|nested] 21+ messages in thread

end of thread, other threads:[~2016-06-09  1:11 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-03-07 14:35 make sent emails synced in imap sent folder fkqqrr
2016-03-07 15:13 ` Eric Abrahamsen
2016-03-08  7:16 ` Gijs Hillenius
2016-03-08 12:07   ` Fkqqrr
2016-03-08 12:41   ` Fkqqrr
2016-03-08 14:53     ` Gijs Hillenius
2016-03-09  2:06       ` Emcc
     [not found] ` <mailman.6969.1457363607.843.info-gnus-english@gnu.org>
2016-03-08 11:12   ` Fkqqrr
2016-03-08 11:33   ` Fkqqrr
2016-03-10  1:30     ` Eric Abrahamsen
     [not found]     ` <mailman.7195.1457573482.843.info-gnus-english@gnu.org>
2016-03-10  3:21       ` fkqqrr
2016-03-10  3:40         ` Eric Abrahamsen
     [not found]         ` <mailman.7199.1457581246.843.info-gnus-english@gnu.org>
2016-03-10  3:55           ` fkqqrr
2016-03-10  7:38       ` fkqqrr
2016-03-10  7:47         ` Eric Abrahamsen
     [not found]         ` <mailman.7214.1457596037.843.info-gnus-english@gnu.org>
2016-03-10  8:33           ` fkqqrr
2016-05-04  7:21           ` Alice Bob
2016-06-08  2:13             ` Eric Abrahamsen
     [not found]             ` <mailman.1102.1465352106.1216.info-gnus-english@gnu.org>
2016-06-08 13:58               ` Alice Bob
2016-06-09  1:11                 ` Eric Abrahamsen
2016-03-09  2:11   ` Emcc

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).