Re: newbie question: trouble with mail splitting

2019-06-03 Thread physiculus
Adam Sj?gren  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-orgm...@gnu.org" "nnmaildir+Lokal:OrgDigest")
>> (From ".*n3.nabble.com" "nnmaildir+Lokal:notmuch")
>> (From ".*pinterest.com" "nnmaildir+Lokal:Pinterest")
>> (Subject "^FRITZ!.*" "nnmaildir+Lokal:fritz")
>> (From "fo...@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 
>> "x...@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 
"physicu...@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

Re: newbie question: trouble with mail splitting

2019-05-31 Thread physiculus
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 "x...@googlemail.com" from) "gmail")
;;((string-match "xxx@holnishaus.de" from) "xeimer_j")
;;((string-match "x...@holnishaus.de" from) "jx")
;;((string-match "x...@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|%5k|%-30,30f| 
%s|\n;")
;;(setq gnus-summary-line-format ":%U%R %B %20s %-60=|%4L |%-20,20f 
|% \n")
(setq gnus-user-date-format-alist '((t . "%Y-%m-%d %H:%M"))
 gnus-summary-line-format "%U%R%z%O|%|%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 

Re: newbie question: trouble with mail splitting

2019-05-30 Thread Adam Sjøgren
(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-orgm...@gnu.org" "nnmaildir+Lokal:OrgDigest")
> (From ".*n3.nabble.com" "nnmaildir+Lokal:notmuch")
> (From ".*pinterest.com" "nnmaildir+Lokal:Pinterest")
> (Subject "^FRITZ!.*" "nnmaildir+Lokal:fritz")
> (From "fo...@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 
> "x...@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."a...@koldfront.dk

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


Re: newbie question: trouble with mail splitting

2019-05-30 Thread Adam Sjøgren
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-orgm...@gnu.org" "nnmaildir+Lokal:OrgDigest")
> (From ".*n3.nabble.com" "nnmaildir+Lokal:notmuch")
> (From ".*pinterest.com" "nnmaildir+Lokal:Pinterest")
> (Subject "^FRITZ!.*" "nnmaildir+Lokal:fritz")
> (From "fo...@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."a...@koldfront.dk

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


Re: newbie question: trouble with mail splitting

2019-05-27 Thread Adam Sjøgren
Eric writes:

> Adam Sjøgren  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."a...@koldfront.dk


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


Re: newbie question: trouble with mail splitting

2019-05-27 Thread William Henderson
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

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


Re: newbie question: trouble with mail splitting

2019-05-27 Thread Eric Abrahamsen
Adam Sjøgren  writes:

> Karl writes:
>
>> (to "emacs-orgm...@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


Re: newbie question: trouble with mail splitting

2019-05-27 Thread Adam Sjøgren
Karl writes:

> (to "emacs-orgm...@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."a...@koldfront.dk


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


Re: newbie question: trouble with mail splitting

2019-05-27 Thread Emanuel Berg
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-em...@gnu.org\\|d...@gnus.org\\|emacs-...@namazu.org\\|emacs-de...@gnu.org\\|gmane-disc...@quimby.gnus.org\\|tex-l...@tug.org\\|gnuplot-i...@lists.sourceforge.net\\)")
("mail.ml-ooa""List-Id: ")
("mail.ml-ooa""List-Id: Users list for the GNU Emacs text editor 
")
("mail.rsmh-ooa"  "From:.*\\(Tikan \\|RSMH\ 
Uppsala\\|i...@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


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


newbie question: trouble with mail splitting

2019-05-27 Thread Karl
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-orgm...@gnu.org" "nnmaildir+Lokal:OrgDigest")
(from ".*n3.nabble.com" "nnmaildir+Lokal:notmuch")
(from ".*pinterest.com" "nnmaildir+Lokal:Pinterest")
(subject "^FRITZ!.*" "nnmaildir+Lokal:fritz")
(from "fo...@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 
"x...@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