我有两个邮件帐户,foo.bar@uni.edu
和 foo.bar@gmail.com
.我想将我发送的邮件归档到相应的“已发送邮件”文件夹( nnimap+foo.bar@uni.edu:Sent Items
和 foo.bar@gmail.com:[Google Mail]/Sent Mail
)中。
我试图设置
(setq gnus-message-archive-group
'(("uni" "nnimap+foo.bar@uni.edu:Sent Items")
("gmail" "nnimap+foo.bar@gmail.com:[Google Mail]/Sent Mail")
))
但这并没有设置 Gcc(新消息没有 Gcc;这里有任何解决方案吗?)。于是我又回到了
(setq
gnus-message-archive-group "nnimap+foo.bar@uni.edu:Sent Items")
设置 Gcc如果我通过
foo.bar@uni.edu
在 *Group* 中打开一条新消息,则正确(对于主帐户 m
) .然后我尝试使用
gcc-self
通过 gnus-parameters
正确归档发送的邮件:(setq gnus-parameters
`((,(rx "nnimap+foo.bar@uni.edu")
(gcc-self . "nnimap+foo.bar@uni.edu:Sent Items"))
(,(rx "nnimap+foo.bar@gmail.com")
(gcc-self . "foo.bar@gmail.com:[Google Mail]/Sent Mail"))))
手册( http://www.gnus.org/manual/gnus_28.html )说如果
gcc-self
是一个字符串,它只是简单地作为 Gcc header 插入。我做了以下
经验:无论我在哪里通过
C-u m
在 *Group* 中开始新消息(与 m
,Gcc是前面提到的“nnimap+foo.bar@uni.edu:Sent Items”),Gcc 被认为是
点在
m
之前在 *Group* 中的名称清洗它。所以如果重点是nnimap+foo.bar@gmail.com:Drafts
, gcc 将是 Gcc:
nnimap+foo.bar@gmail.com:Drafts
(而不是 foo.bar@gmail.com:[Google
Mail]/Sent Mail
)。如果通过 C-u m
写入,如何修复此问题并将消息存档在相应的已发送邮件文件夹中?换句话说,为什么 Gcc
没有正确设置?[这是在 Emacs 24.3.50.1,Gnus v5.13 上]
最佳答案
我和你有完全一样的问题。即使我在发送消息时将 gcc-self 参数添加为“INBOX.Sent”,它也以“nnfolder+archive:sent.YYYY-MM”结尾
我的设置是我有一个默认帐户(家庭)和一个辅助帐户(工作)都 imap(但不是 Gmail,希望这个答案仍然适用)
通过大量的反复试验,我设法让它按我想要的方式运行:工作电子邮件保存在工作发送文件夹中,家庭电子邮件保存在家庭发送文件夹中。
在 gnus 参数中,我只是更改了我的 gcc-self
参数到 gcc 并且它起作用了!但是,仅适用于辅助地址。
对于我设置的默认地址 gnus-message-archive-group
缩减我的 ~/.gnus 文件
(setq gnus-select-method
'(nnimap "home"
(nnimap-address "mail.homeaddress.com")
(nnimap-server-port 143)
(nnimap-stream starttls)
(nnimap-inbox "INBOX")
))
(setq gnus-secondary-select-methods
'((nnimap "work"
(nnimap-address "mail.workaddress.com")
(nnimap-server-port 143)
(nnimap-stream starttls)
(nnimap-inbox "INBOX"))))
(setq gnus-parameters
'(
("work"
(posting-style
(address "me@workaddress.com")
(gcc "nnimap+work:INBOX.Sent")))))
(setq gnus-message-archive-group "nnimap:INBOX.Sent")
请注意,我没有任何
posting-styles
为家。我希望这有帮助。
Emacs 版本 24.3.1,Gnus v5.13
关于emacs - Gnus:如何根据撰写电子邮件的帐户归档电子邮件? [gcc-self 没有按预期工作],我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15888354/