Announcements and discussions for Gnus, the GNU Emacs Usenet newsreader
 help / color / mirror / Atom feed
* newbie question: trouble with mail splitting
@ 2019-05-27 19:36 Karl
  2019-05-27 20:46 ` Emanuel Berg
  2019-05-27 21:35 ` Adam Sjøgren
  0 siblings, 2 replies; 10+ messages in thread
From: Karl @ 2019-05-27 19:36 UTC (permalink / raw)
  To: info-gnus-english

Hello gnus-list,

i'm happy to use gnus for reading and writing mails.
Now i want to split mails, but i do not understand how it works.

here is my config, but it doesnt work. All mail goes to mail.misc.
Does anyone knows what to do?

;; split
;; client-side imap splitting ermöglichen
(gnus-group-split-setup t)
(setq nnimap-split-download-body t)
(setq nnmail-crosspost nil)
(setq nnmail-split-methods 'nnmail-split-fancy)
(setq nnmail-split-fancy
      '(|
        ;;(: spam-split 'spam-use-regex-headers)
        (to "emacs-orgmode@gnu.org" "nnmaildir+Lokal:OrgDigest")
        (from ".*n3.nabble.com" "nnmaildir+Lokal:notmuch")
        (from ".*pinterest.com" "nnmaildir+Lokal:Pinterest")
        (subject "^FRITZ!.*" "nnmaildir+Lokal:fritz")
        (from "forum@papyrus.de" "nnmaildir+Lokal:Papyrus")
        ;;(: spam-split)
        ("mail.misc")
        ))

;; initialisiere split
(setq gnus-group-split-setup t)
(setq nnmail-pre-get-new-mail-hook '(gnus-group-split-update))

(setq gnus-secondary-select-methods '(
(nnimap "GMail"
                                              (nnimap-address "imap.gmail.com")
                                              (nnimap-server-port "imaps")
                                              (nnimap-user "xxx@googlemail.com")
                                              (nnimap-stream ssl)
                                              (nnimap-split-methods 'nnmail-split-fancy)
                                              (get-new-mail t)
                                              (nnir-search-engine imap)
                                              )
                                              ))

My system is Linux Mint 19.1
Emacs 26.2

Regards
Poul


_______________________________________________
info-gnus-english mailing list
info-gnus-english@gnu.org
https://lists.gnu.org/mailman/listinfo/info-gnus-english

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

* Re: newbie question: trouble with mail splitting
  2019-05-27 19:36 newbie question: trouble with mail splitting Karl
@ 2019-05-27 20:46 ` Emanuel Berg
  2019-05-27 21:35 ` Adam Sjøgren
  1 sibling, 0 replies; 10+ messages in thread
From: Emanuel Berg @ 2019-05-27 20:46 UTC (permalink / raw)
  To: info-gnus-english

Karl wrote:

> i'm happy to use gnus for reading and writing
> mails. Now i want to split mails, but i do
> not understand how it works.

The first thing I always ask when it comes to
mail splitting is what is the reason? Is it to
organize mails from different mailing lists?
Then, the answer is it is much better to
use Gmane which does all that for you, and more.

> here is my config, but it doesnt work.
> All mail goes to mail.misc. Does anyone knows
> what to do?

Not me, be start small is a good ... start.
Try just splitting one type of mail to
one group.

You can change the rules, then go to a mail in
a Summary buffer and press `B q'. Gnus will
then tell its destination, would it arrive
today or if you respooled it. If it tells you
a destination that isn't to your liking, that
means the rules are incorrect or not applied.

This is all I have, and it works great. Yes,
I said Gmane is better, and I have all that
(save for the rsmh-ooa) as Gmane groups.
But sometimes (rarely) stuff find their way to
my mail.misc anyway, that's why I have
a "mailing list out-of-action" group
(mail.mm-ooa) to get them away so I don't see
them twice.


(setq nnmail-split-methods
      '(
        ("mail.ml-ooa"    "\\(To\\|Cc\\):.*\\(help-gnu-emacs@gnu.org\\|ding@gnus.org\\|emacs-w3m@namazu.org\\|emacs-devel@gnu.org\\|gmane-discuss@quimby.gnus.org\\|tex-live@tug.org\\|gnuplot-info@lists.sourceforge.net\\)")
        ("mail.ml-ooa"    "List-Id: <linux-rpi-kernel.lists.infradead.org>")
        ("mail.ml-ooa"    "List-Id: Users list for the GNU Emacs text editor <help-gnu-emacs.gnu.org>")
        ("mail.rsmh-ooa"  "From:.*\\(Tikan <tikan891@gmail.com>\\|RSMH\ Uppsala\\|info@verkstanrsmh.com\\)")
        ("mail.misc"      "")
      ))


If you use another backend, maybe it won't work
without some changes, but it could be a start
for examining how it would work using your
backend as well.

Good luck and HIH

-- 
underground experts united
http://user.it.uu.se/~embe8573
https://dataswamp.org/~incal



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

* Re: newbie question: trouble with mail splitting
  2019-05-27 19:36 newbie question: trouble with mail splitting Karl
  2019-05-27 20:46 ` Emanuel Berg
@ 2019-05-27 21:35 ` Adam Sjøgren
  2019-05-27 22:17   ` Eric Abrahamsen
  1 sibling, 1 reply; 10+ messages in thread
From: Adam Sjøgren @ 2019-05-27 21:35 UTC (permalink / raw)
  To: info-gnus-english

Karl writes:

>         (to "emacs-orgmode@gnu.org" "nnmaildir+Lokal:OrgDigest")

I have "To" instead of to...

>         (from ".*n3.nabble.com" "nnmaildir+Lokal:notmuch")

... and "From" instead of from.

>         (subject "^FRITZ!.*" "nnmaildir+Lokal:fritz")

And "Subject" instead of subject.

I.e. strings enclosed in double quotes.

I don't remember which is correct, but it might be worth trying.

Oh, here is the documentation:

  (field value [- restrict […] ] split [invert-partial])

     The split can be a list containing at least three elements. If the
     first element field (a regexp matching a header) contains value
     (also a regexp) then store the message as specified by split.

    - http://gnus.org/manual/gnus_84.html#Fancy-Mail-Splitting

So try using "To", "From" and "Subject" instead of to, from and subject!

You can use B q to check where an email would be split to, B t to get a
trace (more info!), and B r to actually have the email moved.

I'm not sure about the fully qualified folder names either, but maybe
that works. I just have "cron", "normal" and so on.


  Good luck!

    Adam

-- 
 "Everything needs to change.                                 Adam Sjøgren
  And it has to start today."                            asjo@koldfront.dk


_______________________________________________
info-gnus-english mailing list
info-gnus-english@gnu.org
https://lists.gnu.org/mailman/listinfo/info-gnus-english

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

* Re: newbie question: trouble with mail splitting
  2019-05-27 21:35 ` Adam Sjøgren
@ 2019-05-27 22:17   ` Eric Abrahamsen
  2019-05-28  1:09     ` William Henderson
  2019-05-28  5:27     ` Adam Sjøgren
  0 siblings, 2 replies; 10+ messages in thread
From: Eric Abrahamsen @ 2019-05-27 22:17 UTC (permalink / raw)
  To: info-gnus-english

Adam Sjøgren <asjo@koldfront.dk> writes:

> Karl writes:
>
>>         (to "emacs-orgmode@gnu.org" "nnmaildir+Lokal:OrgDigest")
>
> I have "To" instead of to...
>
>>         (from ".*n3.nabble.com" "nnmaildir+Lokal:notmuch")
>
> ... and "From" instead of from.
>
>>         (subject "^FRITZ!.*" "nnmaildir+Lokal:fritz")
>
> And "Subject" instead of subject.
>
> I.e. strings enclosed in double quotes.
>
> I don't remember which is correct, but it might be worth trying.

The "Fancy Mail Splitting" manual section does say:

   FIELD and VALUE can also be Lisp symbols, in that case they are
expanded as specified by the variable ‘nnmail-split-abbrev-alist’.

So those symbols ought to work...


_______________________________________________
info-gnus-english mailing list
info-gnus-english@gnu.org
https://lists.gnu.org/mailman/listinfo/info-gnus-english

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

* Re: newbie question: trouble with mail splitting
  2019-05-27 22:17   ` Eric Abrahamsen
@ 2019-05-28  1:09     ` William Henderson
  2019-05-28  5:27     ` Adam Sjøgren
  1 sibling, 0 replies; 10+ messages in thread
From: William Henderson @ 2019-05-28  1:09 UTC (permalink / raw)
  To: info-gnus-english

First set up a bit  of a template dealy"

;;[START]
;; LET'S SPLIT [DISTRIBUTE]  SOME OF THE MAIL
(setq nnmail-split-methods
      '( 

       )  ;;   '(
)  ;; (setq nnmail-split-methods
;;[/START]

Then fill it in (with as many of these lines as you like:

;; ALIEXPRESS
	("shopping.aliexpress" "^From:.*aliexpress.com")

;; GTALUG
         ("forum.gtalug" "^To:.*gtalug.org")
	 ("forum.gtalug" "^Subject:.\\[GTALUG\\]")

SO it will look like this at runtime"

;;[START]
;; LET'S SPLIT [DISTRIBUTE]  SOME OF THE MAIL
(setq nnmail-split-methods
      '( 


;; ALIEXPRESS
	("shopping.aliexpress" "^From:.*aliexpress.com")

;; GTALUG
         ("forum.gtalug" "^To:.*gtalug.org")
	 ("forum.gtalug" "^Subject:.\\[GTALUG\\]")


       )  ;;   '(
)  ;; (setq nnmail-split-methods
;;[/START]


-- 
Bill Henderson
aka Slackrat
http://inconnu.freeshell.org/Sig/slackware.jpg


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

* Re: newbie question: trouble with mail splitting
  2019-05-27 22:17   ` Eric Abrahamsen
  2019-05-28  1:09     ` William Henderson
@ 2019-05-28  5:27     ` Adam Sjøgren
       [not found]       ` <87tvdc0yjp.fsf@googlemail.com>
  1 sibling, 1 reply; 10+ messages in thread
From: Adam Sjøgren @ 2019-05-28  5:27 UTC (permalink / raw)
  To: info-gnus-english

Eric writes:

> Adam Sjøgren <asjo@koldfront.dk> writes:
>
>> I don't remember which is correct, but it might be worth trying.
>
> The "Fancy Mail Splitting" manual section does say:
>
>    FIELD and VALUE can also be Lisp symbols, in that case they are
> expanded as specified by the variable ‘nnmail-split-abbrev-alist’.
>
> So those symbols ought to work...

Thanks for the correction! I was too lazy skimming the manual.

Often it's the small things that you overlook in configuring
splitting...


  Best regards,

    Adam

-- 
 "Everything needs to change.                                 Adam Sjøgren
  And it has to start today."                            asjo@koldfront.dk


_______________________________________________
info-gnus-english mailing list
info-gnus-english@gnu.org
https://lists.gnu.org/mailman/listinfo/info-gnus-english

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

* Re: newbie question: trouble with mail splitting
       [not found]       ` <87tvdc0yjp.fsf@googlemail.com>
@ 2019-05-30 15:27         ` Adam Sjøgren
  2019-05-30 17:04           ` physiculus
       [not found]           ` <87k1e727rf.fsf@googlemail.com>
  0 siblings, 2 replies; 10+ messages in thread
From: Adam Sjøgren @ 2019-05-30 15:27 UTC (permalink / raw)
  To: info-gnus-english; +Cc: physiculus

physiculus writes:

> first thanks for the fast replies!
> But unfortunately nothing changed.
> here is my changed gnus.el
> (setq nnmail-split-fancy
>       '(|
>         ;;(: spam-split 'spam-use-regex-headers)
>         (To "emacs-orgmode@gnu.org" "nnmaildir+Lokal:OrgDigest")
>         (From ".*n3.nabble.com" "nnmaildir+Lokal:notmuch")
>         (From ".*pinterest.com" "nnmaildir+Lokal:Pinterest")
>         (Subject "^FRITZ!.*" "nnmaildir+Lokal:fritz")
>         (From "forum@papyrus.de" "nnmaildir+Lokal:Papyrus")
>         ;;(: spam-split)
>         ("mail.misc")
>         ))
>
> If gnus receives mail no splitting is done.
> If i press B t then gnus tells me, that mail goes to mail.misc.
>
> Is there any way to check a little bit deeper, why gnus doesnt split?
> Do i have to set some more variables?

Uhm, yes. The above definitely is not enough.

If you use imap, you can look here:

 · http://gnus.org/manual/gnus_83.html#Client_002dSide-IMAP-Splitting

If you don't (which the above suggests, but the information is
incomplete), then you need at least to also:

  (setq nnmail-split-methods 'nnmail-split-fancy)

Otherwise nnmail-split-fancy doesn't do anything. Documentation here:

 · http://gnus.org/manual/gnus_84.html#Fancy-Mail-Splitting

If you want better hints, include your entire .gnus.


  Best regards,

    Adam

-- 
 "Everything needs to change.                                 Adam Sjøgren
  And it has to start today."                            asjo@koldfront.dk

_______________________________________________
info-gnus-english mailing list
info-gnus-english@gnu.org
https://lists.gnu.org/mailman/listinfo/info-gnus-english

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

* Re: newbie question: trouble with mail splitting
  2019-05-30 15:27         ` Adam Sjøgren
@ 2019-05-30 17:04           ` physiculus
       [not found]           ` <87k1e727rf.fsf@googlemail.com>
  1 sibling, 0 replies; 10+ messages in thread
From: physiculus @ 2019-05-30 17:04 UTC (permalink / raw)
  To: info-gnus-english

Hello,
as you suggest, i post my entire gnus.el.
For security reasons i delete my account informations.

Hope it helps :-)

Regards
Poul

(require 'nnir)

(add-to-list 'load-path "/home/held/.emacs.d/lisp/nnnotmuch/")
(require 'nnnotmuch)
(push '(nnnotmuch "") gnus-secondary-select-methods)
(setq nnnotmuch-groups '((""
                          ("test.woche" "date:7days.."))))
(setq nnnotmuch-program "notmuch") ; This is the default.

(setq nnir-method-default-engines '((nnimap . notmuch) (nnmaildir . notmuch)))
(setq nnir-notmuch-remove-prefix "/home/held/Maildirnm/")

;; gnus gesprächiger
(setq gnus-verbose 9)
(setq gnus-verbose-backends 8)

;;(setq gnus-default-charset 'iso-8859-1)
;;(setq gnus-summary-show-article-charset-alist '((1 . iso-8859-1) (2 . utf-8)))
(setq gnus-summary-tool-bar 'gnus-summary-tool-bar-gnome)

(setq mail-user-agent 'gnus-user-agent)
(setq smtpmail-queue-mail nil)
(setq gnus-agent-prompt-send-queue t)
(setq gnus-agent-queue-mail t)
;;(setq smtpmail-queue-dir "~/News/drafts/queue/cur")
(setq smtpmail-queue-dir "~/Maildirnm/queue")

;; (defun choose-msmtp-account ()
;;   (if (message-mail-p)
;;       (save-excursion
;;         (let*
;;             ((from (save-restriction
;;                      (message-narrow-to-headers)
;;                      (message-fetch-field "from")))
;;              (account
;;               (cond
;;                ((string-match "xxx@googlemail.com" from) "gmail")
;;                ((string-match "xxx.xxx@holnishaus.de" from) "xeimer_j")
;;                ((string-match "xxx@holnishaus.de" from) "jx")
;;                ((string-match "xxx@holnishaus.de" from) "kx"))))
;;           ;;(setq sendmail-program "/usr/bin/msmtp")
;;           ;;(setq message-sendmail-extra-arguments (list '"-a" account "-N failure,delay,success" "-R headers"))
;;           (setq message-sendmail-extra-arguments (list 'account))
;;           ))))
;; ;; testweise auf nil
;; ;;(setq message-sendmail-envelope-from 'header)
;; (add-hook 'message-send-mail-hook 'choose-msmtp-account)

;; Aufhübschen. Zeigt Gesamtzahl und ungelesene Mails
(setq gnus-group-line-format "%M%S%p%P%5y/%5t:%B%(%g%)\n")
;;(setq gnus-summary-line-format "%U%R%B|%-16,16&user-date;|%5k|%-30,30f| %s|\n;")
;;(setq gnus-summary-line-format ":%U%R %B %20s %-60=|%4L |%-20,20f |%&user-date; \n")
(setq gnus-user-date-format-alist '((t . "%Y-%m-%d %H:%M"))
     gnus-summary-line-format "%U%R%z%O|%&user-date;|%5k|%-45,45F%B %~(max-right 70)~(pad-right 70)s %{%20uM%}\n"
     gnus-article-mode-line-format "Gnus: %g %S %m %w"
     gnus-thread-sort-functions '(gnus-thread-sort-by-date)
     gnus-article-sort-functions '(gnus-thread-sort-by-date)
     ;;gnus-sum-thread-tree-false-root ""
     gnus-sum-thread-tree-leaf-with-other "├► "
     ;;gnus-sum-thread-tree-root ""
     gnus-sum-thread-tree-single-leaf "╰► "
     gnus-sum-thread-tree-vertical ""
     gnus-summary-make-false-root 'none
     ;;gnus-summary-same-subject "-||-"
     gnus-summary-same-subject ""
     )

;;Generate the mail headers before you edit your message.
(setq message-generate-headers-first nil)

;;The message buffer will be killed after sending a message.
(setq message-kill-buffer-on-exit t)

;; eigene Tags setzen
(setq gnus-registry-marks
      ' (
         (Wichtig :char 119 :image "summary_wichtig")
         (To-Do  :char 116 :image "summary_todo")
         (Persoenlich :char 112 :image "summary_persoenlich")
         (DIY :char 100 :image  "summary_diy")
         (Spaeter :char 115 :image  "summary_spaeter")
         (Linzessin :char 105 :image "summary_linzessin")
         (Held :char 104 :image "summary_held")
         (Heldenaufgaben :char 97 :image "summary_heldenaufgaben" )
         (Heldennahrung :char 110 :image "summary_heldennahrung")
         (Pflanzen :char 122 :image "summary_pflanzen")
         (Pflanzenpflege :char 101 :image "summary_pflanzenpflege")
         (Pflanzenarbeiten :char 114 :image "summary_pflanzarbeiten")
         (Pflanzenkauf :char 107 :image "summary_pflanzenkauf")
         (Pflanzennachkauf :char 99 :image "summary_pflanzennachkauf")
         (Garten :char 103 :image "summary_garten")
         (Gartenpflege :char 102 :image "summary_gartenpflege")
         (GaLa :char 108 :image "summary_gala")
         (Haus :char 117 :image "summary_haus")
         (Innenausbau :char 101 :image "summary_innenausbau")
         )
        )
;; show the marks by name (see 'gnus-registry-marks'):
(defalias 'gnus-user-format-function-M 'gnus-registry-article-marks-to-names)

(setq gnus-registry-max-entries 5000)
(gnus-registry-initialize)

;; The registry knows how to map each Message-ID to the group it's
;; in. This can be leveraged to enhance the “article refer method”,
;; the thing that tells Gnus how to look up an article given its
;; Message-ID (see Finding the Parent).

;; The nnregistry refer method does exactly that. It has the
;; advantage that an article may be found regardless of the group
;; it's in—provided its Message-ID is known to the registry. It can
;; be enabled by augmenting the start-up file with something along
;; these lines:
(setq gnus-refer-article-method
           '(current
             (nnregistry)))
;; The example above instructs Gnus to first look up the article in the current
;; group, or, alternatively, using the registry.

(spam-initialize)
(setq spam-log-to-registry t)     ; for spam autodetection
(setq spam-use-regex-headers t)   ; catch X-Spam-Flag (SpamAssassin)

;; split
;; client-side imap splitting ermöglichen
(gnus-group-split-setup t)
(setq nnimap-split-download-body t)
(setq nnmail-crosspost nil)
(setq nnmail-split-methods 'nnmail-split-fancy)
(setq nnmail-split-fancy
      '(|
        ;;(: spam-split 'spam-use-regex-headers)
        (To "emacs-orgmode@gnu.org" "nnmaildir+Lokal:OrgDigest")
        (From ".*n3.nabble.com" "nnmaildir+Lokal:notmuch")
        (From ".*pinterest.com" "nnmaildir+Lokal:Pinterest")
        (Subject "^FRITZ!.*" "nnmaildir+Lokal:fritz")
        (From "forum@papyrus.de" "nnmaildir+Lokal:Papyrus")
        ;;(: spam-split)
        ("mail.misc")
        ))

;; (setq nnmail-split-fancy
;;       '(|
;;         (: spam-split)
;;         "inbox"))

;; initialisiere split
(setq gnus-group-split-setup t)
(setq nnmail-pre-get-new-mail-hook '(gnus-group-split-update))

;; @see http://www.emacswiki.org/emacs/GnusGmail#toc1
(setq gnus-select-method '(nnnil "")) ;; if you read news groups
;;(setq gnus-select-method '(nntp "nntp.aioe.org"))

(setq gnus-secondary-select-methods '(
(nnimap "GMail"
                                              (nnimap-address "imap.gmail.com")
                                              (nnimap-server-port "imaps")
                                              (nnimap-user "xxx@googlemail.com")
                                              (nnimap-stream ssl)
                                              (nnimap-split-methods 'nnmail-split-fancy)
                                              (get-new-mail t)
                                              (nnir-search-engine imap)
                                              )
(nnimap "Jx"
                                              (nnimap-address "wpxxx.mail.server-he.de")
                                              (nnimap-server-port "imap")
                                              (nnimap-user "xx-xx")
                                              (nnimap-stream starttls)
                                              (get-new-mail nil)
                                              )
(nnimap "Jx_"
                                              (nnimap-address "wpxxx.mail.server-he.de")
                                              (nnimap-server-port "imap")
                                              (nnimap-user "xx-xx")
                                              (nnimap-stream starttls)
                                              (get-new-mail nil)
                                              )
(nnimap "Jx"
                                              (nnimap-address "wpxxx.mail.server-he.de")
                                              (nnimap-server-port "imap")
                                              (nnimap-user "xx-xx")
                                              (nnimap-stream starttls)
                                              (nnimap-split-methods 'nnmail-split-fancy)
                                              (get-new-mail t)
                                              (nnir-search-engine imap)
                                              )
(nnimap "Jx_"
                                              (nnimap-address "wpxxx.mail.server-he.de")
                                              (nnimap-server-port "imap")
                                              (nnimap-user "xx-xx")
                                              (nnimap-stream starttls)
                                              (nnimap-split-methods 'nnmail-split-fancy)
                                              (get-new-mail t)
                                              (nnir-search-engine imap)
                                              )
(nnimap "Kx"
                                              (nnimap-address "wpxxx.mail.server-he.de")
                                              (nnimap-server-port "imap")
                                              (nnimap-user "xx-xx")
                                              (nnimap-stream starttls)
                                              (nnimap-split-methods 'nnmail-split-fancy)
                                              (get-new-mail t)
                                              (nnir-search-engine imap)
                                              )

(nnmaildir "GMail_hier" (directory "~/Maildirnm/gmail") (directory-files
                                     nnheader-directory-files-safe)
                                     (get-new-mail nil))
(nnmaildir "Jx_hier"
                                     (directory "~/Maildirnm/jx")
                                     (directory-files nnheader-directory-files-safe)
                                     (get-new-mail nil))

(nnmaildir "Jxx_hier"
                                     (directory "~/Maildirnm/jx_")
                                     (directory-files nnheader-directory-files-safe)
                                     (get-new-mail nil))
(nnmaildir "Kx_hier"
                                     (directory "~/Maildirnm/kx")
                                     (directory-files nnheader-directory-files-safe)
                                     (get-new-mail nil))
(nnmaildir "Lokal"
(directory "~/Maildirnm")
(directory "~/Maildirnm/archive")
(directory "~/Maildirnm/attachments")
(directory "~/Maildirnm/BugsandFeatures")
(directory "~/Maildirnm/bwp")
(directory "~/Maildirnm/Campact")
(directory "~/Maildirnm/draft")
(directory "~/Maildirnm/drafts")
(directory "~/Maildirnm/Ebay")
(directory "~/Maildirnm/Ebay_noch_suchen")
(directory "~/Maildirnm/Emacs")
(directory "~/Maildirnm/emms")
(directory "~/Maildirnm/Enteignung")
(directory "~/Maildirnm/Feedburner")
(directory "~/Maildirnm/fritz")
(directory "~/Maildirnm/Garten")
(directory "~/Maildirnm/Held_Wichtig")
(directory "~/Maildirnm/inbox")
(directory "~/Maildirnm/Informatik")
(directory "~/Maildirnm/Instructables")
(directory "~/Maildirnm/Lehrerausbildung")
(directory "~/Maildirnm/Linzessin")
(directory "~/Maildirnm/logins")
(directory "~/Maildirnm/mnp-notes")
(directory "~/Maildirnm/mu")
(directory "~/Maildirnm/notmuch")
(directory "~/Maildirnm/OrgDigest")
(directory "~/Maildirnm/Orgmode")
(directory "~/Maildirnm/Papyrus")
(directory "~/Maildirnm/Physik")
(directory "~/Maildirnm/Politik")
(directory "~/Maildirnm/Privat")
(directory "~/Maildirnm/ProT")
(directory "~/Maildirnm/queue")
(directory "~/Maildirnm/rclone")
(directory "~/Maildirnm/Sammelpost")
(directory "~/Maildirnm/sent")
(directory "~/Maildirnm/SMS")
(directory "~/Maildirnm/Spam")
(directory "~/Maildirnm/Später")
(directory "~/Maildirnm/SteuerNews")
(directory "~/Maildirnm/Strom")
(directory "~/Maildirnm/trash")
(directory "~/Maildirnm/Wanderlust")
(directory "~/Maildirnm/Wichtig")
(directory "~/Maildirnm/ZuErledigen")
(directory "~/Maildirnm/Privat")

(directory-files nnheader-directory-files-safe)
(get-new-mail t))
))

;; ask encryption password once
;;(setq epa-file-cache-passphrase-for-symmetric-encryption t)

(setq gnus-thread-sort-functions
      '(gnus-thread-sort-by-most-recent-date))

;; Make Gnus NOT ignore [Gmail] mailboxes
(setq gnus-ignored-newsgroups "^to\\.\\|^[0-9. ]+\\( \\|$\\)\\|^[\"]\"[#'()]")

;; NO 'passive
;;(setq gnus-use-cache t)

;; BBDB: Address list
;;(add-to-list 'load-path "~/.emacs.d/bbdb/")
(require 'bbdb)
(bbdb-initialize 'message 'gnus)
(add-hook 'gnus-startup-hook 'bbdb-insinuate-gnus)
(add-hook 'gnus-startup-hook 'bbdb-insinuate-message)
(setq bbdb/mail-auto-create-p t
      bbdb/news-auto-create-p t)

;; auto-complete emacs address using bbdb UI
(add-hook 'message-mode-hook '(lambda ()
             (flyspell-mode t)
             (local-set-key (kbd "TAB") 'bbdb-complete-mail)))

;; Fetch only part of the article if we can with 'some.
;; I saw this in someone's .gnus
(setq gnus-read-active-file 'some)

;; open attachment
(eval-after-load 'mailcap '(progn
     (cond
      ;; on OSX, maybe change mailcap-mime-data?
      ((eq system-type 'darwin))
      ;; on Windows, maybe change mailcap-mime-data?
      ((eq system-type 'windows-nt))
      (t
       ;; Linux, read ~/.mailcap
       (mailcap-parse-mailcaps)))))

(setq gnus-summary-thread-gathering-function 'gnus-gather-threads-by-references)

(setq gnus-thread-hide-subtree nil)
(setq gnus-thread-ignore-subject t)

(setq mm-text-html-renderer 'gnus-w3m) ; OPTIONAL

;; ace-link nutzen um links anzuspringen
(define-key gnus-summary-mode-map (kbd "M-L") 'ace-link-gnus)
(define-key gnus-article-mode-map (kbd "M-L") 'ace-link-gnus)

;; using smileys
(setq gnus-treat-display-smileys t)
(setq smiley-style 'medium)

;; http://www.gnu.org/software/emacs/manual/html_node/gnus/_005b9_002e2_005d.html
(setq gnus-use-correct-string-widths nil)

;; posting styles
(setq gnus-parameters '(("Jx"
         (posting-style
          (address "xxx@holnishaus.de")
          (name "jx")
          ("X-Message-SMTP-Method" "smtp wpxxx.mailout.server-he.de 25 xx-xx")
          (body "")
         ))
        ("J_"
         (posting-style
          (address "xxx@holnishaus.de")
          (name "jx_")
          ("X-Message-SMTP-Method" "smtp wpxxx.mailout.server-he.de 25 xx-xx")
          (body "")
          ))
        ("Kx"
         (posting-style
          (address "xxx@holnishaus.de")
          (name "kx")
          ("X-Message-SMTP-Method" "smtp wpxxx.mailout.server-he.de 25 xx-xx")
          (body "")
          ))
        ("GMail"
         (posting-style
          (address "xxx@googlemail.com")
          (name "ph")
          ("X-Message-SMTP-Method" "smtp smtp.gmail.com 587 xxx@googlemail.com")
          (body "")
          ))
        ))


_______________________________________________
info-gnus-english mailing list
info-gnus-english@gnu.org
https://lists.gnu.org/mailman/listinfo/info-gnus-english

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

* Re: newbie question: trouble with mail splitting
       [not found]           ` <87k1e727rf.fsf@googlemail.com>
@ 2019-05-30 20:56             ` Adam Sjøgren
  2019-06-03 17:33               ` physiculus
  0 siblings, 1 reply; 10+ messages in thread
From: Adam Sjøgren @ 2019-05-30 20:56 UTC (permalink / raw)
  To: info-gnus-english

(Please reply to the mailing list, and not just me. Email-addresses in
the To: line should be comma-, not space-separated. Thanks.)

physiculus writes:

[...]

> ;; split
> ;; client-side imap splitting ermöglichen
> (gnus-group-split-setup t)
> (setq nnimap-split-download-body t)
> (setq nnmail-crosspost nil)
> (setq nnmail-split-methods 'nnmail-split-fancy)
> (setq nnmail-split-fancy
>       '(|
>         ;;(: spam-split 'spam-use-regex-headers)
>         (To "emacs-orgmode@gnu.org" "nnmaildir+Lokal:OrgDigest")
>         (From ".*n3.nabble.com" "nnmaildir+Lokal:notmuch")
>         (From ".*pinterest.com" "nnmaildir+Lokal:Pinterest")
>         (Subject "^FRITZ!.*" "nnmaildir+Lokal:fritz")
>         (From "forum@papyrus.de" "nnmaildir+Lokal:Papyrus")
>         ;;(: spam-split)
>         ("mail.misc")
>         ))
>
> ;; (setq nnmail-split-fancy
> ;;       '(|
> ;;         (: spam-split)
> ;;         "inbox"))
>
> ;; initialisiere split
> (setq gnus-group-split-setup t)
> (setq nnmail-pre-get-new-mail-hook '(gnus-group-split-update))

[...]

>
> (setq gnus-secondary-select-methods '(
> (nnimap "GMail"
>                                               (nnimap-address "imap.gmail.com")
>                                               (nnimap-server-port "imaps")
>                                               (nnimap-user "xxx@googlemail.com")
>                                               (nnimap-stream ssl)
>                                               (nnimap-split-methods 'nnmail-split-fancy)
>                                               (get-new-mail t)
>                                               (nnir-search-engine imap)
>                                               )

[...]

As far as I can tell, the above quoted parts of your .gnus are the ones
related to splitting.

So you are doing nnimap-splitting. Step 1 is to read:

 · http://gnus.org/manual/gnus_83.html#Client_002dSide-IMAP-Splitting

I think you need to set nnimap-split-fancy to your fancy splits:

,----[ C-h v nnimap-split-fancy RET ]
| nnimap-split-fancy is a variable defined in ‘nnimap.el’.
| Its value is nil
| 
| Documentation:
| Uses the same syntax as ‘nnmail-split-fancy’.
| 
| This is a Gnus server variable.  See Info node ‘(gnus)Select Methods’.
`----

You've only set nnmail-split-fancy, which is for non-IMAP splitting.

You also have to set nnimap-inbox:

,----[ C-h v nnimap-inbox RET ]
| nnimap-inbox is a variable defined in ‘nnimap.el’.
| Its value is nil
| 
| Documentation:
| The mail box where incoming mail arrives and should be split out of.
| This can be a string or a list of strings
| For example, "INBOX" or ("INBOX" "SENT").
| 
| This is a Gnus server variable.  See Info node ‘(gnus)Select Methods’.
`----

I'm not sure that IMAP-splitting can split to other backends, so you
might have to revise your splits, but I don't know for sure.


  Best regards,

    Adam

-- 
 "Everything needs to change.                                 Adam Sjøgren
  And it has to start today."                            asjo@koldfront.dk

_______________________________________________
info-gnus-english mailing list
info-gnus-english@gnu.org
https://lists.gnu.org/mailman/listinfo/info-gnus-english

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

* Re: newbie question: trouble with mail splitting
  2019-05-30 20:56             ` Adam Sjøgren
@ 2019-06-03 17:33               ` physiculus
  0 siblings, 0 replies; 10+ messages in thread
From: physiculus @ 2019-06-03 17:33 UTC (permalink / raw)
  To: info-gnus-english

Adam Sj?gren <asjo@koldfront.dk> writes:

> (Please reply to the mailing list, and not just me. Email-addresses in
> the To: line should be comma-, not space-separated. Thanks.)
>
> physiculus writes:
>
> [...]
>
>> ;; split
>> ;; client-side imap splitting erm?glichen
>> (gnus-group-split-setup t)
>> (setq nnimap-split-download-body t)
>> (setq nnmail-crosspost nil)
>> (setq nnmail-split-methods 'nnmail-split-fancy)
>> (setq nnmail-split-fancy
>>       '(|
>>         ;;(: spam-split 'spam-use-regex-headers)
>>         (To "emacs-orgmode@gnu.org" "nnmaildir+Lokal:OrgDigest")
>>         (From ".*n3.nabble.com" "nnmaildir+Lokal:notmuch")
>>         (From ".*pinterest.com" "nnmaildir+Lokal:Pinterest")
>>         (Subject "^FRITZ!.*" "nnmaildir+Lokal:fritz")
>>         (From "forum@papyrus.de" "nnmaildir+Lokal:Papyrus")
>>         ;;(: spam-split)
>>         ("mail.misc")
>>         ))
>>
>> ;; (setq nnmail-split-fancy
>> ;;       '(|
>> ;;         (: spam-split)
>> ;;         "inbox"))
>>
>> ;; initialisiere split
>> (setq gnus-group-split-setup t)
>> (setq nnmail-pre-get-new-mail-hook '(gnus-group-split-update))
>
> [...]
>
>>
>> (setq gnus-secondary-select-methods '(
>> (nnimap "GMail"
>>                                               (nnimap-address "imap.gmail.com")
>>                                               (nnimap-server-port "imaps")
>>                                               (nnimap-user "xxx@googlemail.com")
>>                                               (nnimap-stream ssl)
>>                                               (nnimap-split-methods 'nnmail-split-fancy)
>>                                               (get-new-mail t)
>>                                               (nnir-search-engine imap)
>>                                               )
>
> [...]
>
> As far as I can tell, the above quoted parts of your .gnus are the ones
> related to splitting.
>
> So you are doing nnimap-splitting. Step 1 is to read:
>
>  ? http://gnus.org/manual/gnus_83.html#Client_002dSide-IMAP-Splitting
>
> I think you need to set nnimap-split-fancy to your fancy splits:
>
> ,----[ C-h v nnimap-split-fancy RET ]
> | nnimap-split-fancy is a variable defined in ?nnimap.el?.
> | Its value is nil
> | 
> | Documentation:
> | Uses the same syntax as ?nnmail-split-fancy?.
> | 
> | This is a Gnus server variable.  See Info node ?(gnus)Select
> | Methods?.
Hello,
i try to use all your suggestions and reading material.
Now my related split config looks like this:
(nnimap "GMail"
                                              (nnimap-address "imap.gmail.com")
                                              (nnimap-server-port "imaps")
                                              (nnimap-user "physiculus@googlemail.com")
                                              (nnimap-stream ssl)
                                              (nnimap-inbox "INBOX")
                                              (nnimap-split-methods 'nnimap-split-fancy)
                                              (nnimap-split-fancy
      '(|
        ;;(: spam-split 'spam-use-regex-headers)
        (To "emacs-orgmode@gnu\\.org" "nnmaildir+Lokal:OrgDigest")
        (From ".*n3\\.nabble\\.com" "nnmaildir+Lokal:notmuch")
        (From ".*pinterest\\.com" "nnmaildir+Lokal:Pinterest")
        (Subject "^FRITZ!.*" "nnmaildir+Lokal:fritz")
        (From "forum@papyrus\\.de" "nnmaildir+Lokal:Papyrus")
        ;;(: spam-split)
        ("mail.misc")
        ))
                                              (get-new-mail t)
                                              (nnir-search-engine imap)
                                              )

A difference is now, that now i got an error message from gnus. That
looks promise! Unfortunately i dont know how i can fix it.

Error in ‘nnmail-split-methods’; using ‘bogus’ mail group:
(wrong-type-argument arrayp (| (To "emacs-orgmode@gnu\\.org"
"nnmaildir+Lokal:OrgDigest") (From ".*n3\\.nabble\\.com"
"nnmaildir+Lokal:notmuch") (From ".*pinterest\\.com"
"nnmaildir+Lokal:Pinterest") (Subject "^FRITZ!.*"
"nnmaildir+Lokal:fritz") (From "forum@papyrus\\.de"
"nnmaildir+Lokal:Papyrus") ("mail.misc")))

Any clues or infos about it?

Regards
Poul

> `----
>
> You've only set nnmail-split-fancy, which is for non-IMAP splitting.
>
> You also have to set nnimap-inbox:
>
> ,----[ C-h v nnimap-inbox RET ]
> | nnimap-inbox is a variable defined in ?nnimap.el?.
> | Its value is nil
> | 
> | Documentation:
> | The mail box where incoming mail arrives and should be split out of.
> | This can be a string or a list of strings
> | For example, "INBOX" or ("INBOX" "SENT").
> | 
> | This is a Gnus server variable.  See Info node ?(gnus)Select Methods?.
> `----
>
> I'm not sure that IMAP-splitting can split to other backends, so you
> might have to revise your splits, but I don't know for sure.
>
>
>   Best regards,
>
>     Adam

_______________________________________________
info-gnus-english mailing list
info-gnus-english@gnu.org
https://lists.gnu.org/mailman/listinfo/info-gnus-english

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

end of thread, other threads:[~2019-06-03 17:33 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-27 19:36 newbie question: trouble with mail splitting Karl
2019-05-27 20:46 ` Emanuel Berg
2019-05-27 21:35 ` Adam Sjøgren
2019-05-27 22:17   ` Eric Abrahamsen
2019-05-28  1:09     ` William Henderson
2019-05-28  5:27     ` Adam Sjøgren
     [not found]       ` <87tvdc0yjp.fsf@googlemail.com>
2019-05-30 15:27         ` Adam Sjøgren
2019-05-30 17:04           ` physiculus
     [not found]           ` <87k1e727rf.fsf@googlemail.com>
2019-05-30 20:56             ` Adam Sjøgren
2019-06-03 17:33               ` physiculus

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).