auf.suno
Connector, investor, futurist, geek, software developer, innovator, sportsman, libertarian, business enabler, cosmopolitan, autodidact, funny finch, tech evangelist,
purist, agnostic, Kärnten fan, foodie, artist, globetrotter, social liberal but fiscal conservative, Schöngeist... elegantiorum litterarum amans oder studiosus...

This is the website of Markus Gattol. It is composed, driven and secured/encrypted exclusively by Open Source Software. The speciality of this website
is that it is seamlessly integrating into my daily working environment (Python + MongoDB + Linux + SSH + GIT + ZeroMQ) which therefore means it
becomes a fully fledged and automatized publishing and communication platform. It will be under construction until 2014.

Open Source / Free Software, because freedom is in everyone's language...
Frihed Svoboda Libertà Vrijheid เสรีภาพ Liberté Freiheit Cê̤ṳ-iù Ελευθερία Свобода חרות Bebas Libertada 自由
auf.suno
Website Sections
Home
FAQs
About Me
Tweets by @markusgattol
Email, Feeds and News with Gnus
Status: ETA (Estimated Time of Arrival) is 2011 or sooner. Just notes for now.
Last changed: Saturday 2015-01-10 18:32 UTC
Abstract:

Gnus (pronounced gnuz) is a message reader running under GNU Emacs and XEmacs. It supports reading and composing both news and email. Gnus blurs the distinction between news and email, treating them both as "articles" that come from different sources. Before I came across Gnus, I used a variety of other email and news applications (Microsoft Outlook, Evolution, Thunderbird and Mutt). They are all nice and handy but can simply not keep up with the powers of Gnus. Every time I look back, I got a little grin on my face instantly followed by a serious face -- I do not know of any other mail/news application out there that would allow me to work on such a high quality level, doing so complex things I do with easiness at such a speed as it is possible with Gnus. Last but not least, the fact that I use GNU Emacs for almost anything makes Gnus another integral part that just adds to the outstanding GNU Emacs experience. The whole is more than the sum of its parts. -- Aristotle (384 BC - 322 BC)
Table of Contents
What are emails, Feeds and News?
Miscellaneous
Gmane
Signing and En/Decrypting Email
Notes
Packages/Libraries

The purpose of having mailing lists rather than having newsgroups is to
place a barrier to entry which protects the lists and their users from
invasion by the general uneducated hordes.
                — Ian Jackson

This is what I am looking at... at this point I was reading the Gnus User mailing list via Gmane using Gnus. As can be seen, I love to have the most important buffers i.e. Group, Summary, Article and Server showing all at once.

I did this by setting up so-called panes — one might try this one (Info-goto-node "(gnus) [4.13]") first in order to get a notion about panes. If not already known by the reader how to handle such (Info-goto-node "") expression, I am explaining it here in detail. Aside from mastering the GNU Info manual tricks however, as for all the other stuff, detailed information on my GNU Emacs setup can be found in my .emacs.

Also, as can be seen above, I like having a green Point plus the active window having an also green mode-line — this way I can faster focus on where I am in case I had something to do on some other GNOME workspace and then return into GNU Emacs country again to work with mail/news/feeds using Gnus.

What are emails, Feeds and News?

WRITEME

Miscellaneous

WRITEME

Gmane

Gmane is an bidirectional email to news gateway. It allows users to access electronic mailing lists as if they were Usenet newsgroups, and also through a variety of web interfaces. Gmane also allows to post to certain mailing lists — in fact, that is what I do exclusively i.e. I read and write articles from/to mailing lists via Gmane.

Also, Gmane is an archive i.e. it never expires messages which in turn means you can not just search for a particular list on Gmane put also for single postings from a particular mailing list. And last but not least, Gmane supports importing list postings made prior to a list's inclusion on the service i.e. if you already have a mailing list with thousands of messages that is not carried by Gmane yet, just subscribe that list to Gmane and upload all the articles prior to the subscription date as well so the entire mailing list becomes visible on Gmane (starting with the very first posting to the list).

Read Articles via Gmane

If you are with Gnus then visit the group buffer, type B, choose nntp as protocol and news.gmane.org as news server. Then search for whatever group you are interested in — note, you can use d with point on that line to get a description. Then subscribe the group with point on that line and u. After that quit the buffer using q. Now you are subscribed to the mailing list you picked via Gmane. I abandoned normal subscription to mailing list completely in favor of Gmane since it is way easier to handle, way faster to get things done and what is the most important... I am confronted with a single unique UI (User Interface) no matter what ML (Mailing List) I deal with.

Post Articles via Gmane

  • Get your authorization to post via Gmane
    • http://gmane.org/post.php
    • http://gmane.org/post-details.php
  • Subscribe to the list you want to post to i.e. that has nothing to do with Gmane and then disable mail delivery to you since it is not needed anymore because you get the information via Gmane and Gnus. If you do not disable it, you get every mail send to the ML (Mailing List) in question twice — once via Gmane as news and once send to your email address you made you subscription with. I would also recommend to disable the option which sends you your own postings to the list since it is also all on Gmane once you made a posting.

  • To finally post, visit the group you want to post a message to and hit a if you want to write a new posting or use f respectively F for followups.
,----[ C-h k F ]
| F runs the command gnus-article-followup-with-original
|   which is an interactive compiled Lisp function in `gnus-art.el'.
| It is bound to F.
| (gnus-article-followup-with-original)
|
| Compose a followup to the current article.
| The text in the region will be yanked.  If the region isn't active,
| the entire article will be yanked.
`----
  • If done writing, C-c C-c will ship off your article.

Be aware, that in case a particular mailing list is moderated, your posts to the list through Gmane respectively the old-school, manual way, will not show up on the list ergo also not on Gmane as long as the mailing list moderator (again, that has nothing to do with Gmane) adds your email address etc. to the allowed addresses for the particular mailing list in question.

As the Gmane links above tell, if you went successfully through the authorisation and confirmation request process at Gmane (which usually is a 10 minutes thing), the rest is to deal with a particular mailing list subscription process and rules etc.

Mailing Lists

If you want to subscribe to a bunch of FLOSS (Free/Libre Open Source Software) mailing lists, here is the way to start looking around:

  • https://mail.gna.org/listinfo/planner-el-discuss (this is the Planner list, once subscribed to it, all lists on mail.gna.org are enabled e.g. also Muse would work)
  • http://lists.gnu.org/mailman/listinfo/

And do not forget, after that manual subscription, we still need to subscribe the posting for that list(s) via Gmane (see above)...

Signing and En/Decrypting Email

For now, please take a look at the EasyPG section of my .emacs file.

Hint: PGG is obsolete. So is Mailcrypt. Use EasyPG, which comes bundled with Emacs already.

Notes

This section is a collection of random hints and notes with regards to Gnus.

Which Mail Back End shall I use?

With Gnus there are basically two choices how to read our mail

  1. non-IMAP i.e. what the Info node at (gnus) Choosing a Mail Back End mentions. A very popular choice among the group of non-IMAP back ends is the nnml back end — I used it before I switched to nnimap.
  2. Then there is the IMAP way to read our mail. Gnus nnimap back end turns Gnus into a fully fledged IMAP client. See (gnus) IMAP Info node.

If not otherwise required, I would recommend to use choice #2 i.e. the nnimap back end.

Gmail

For those who do not know what Gmail is, please go here and come back afterwards if you intend to set up accounts with Gmail and use them with Gnus. There are three steps that need to be taken before one is able to receive mail with Gnus via Gmail (in chronological order):

  • First step is to set up an email account with Gmail. In order to do so, please visit Gmail's website and create your account(s).
  • The next thing we want to do is to enable IMAP (Internet Message Access Protocol) with our account(s).
  • After that, the last step is to configure Gnus in order to receive mail sent to any of our Gmail accounts.
Receiving Mail via Gmail

There is not much to say about step one... we just do it... For step two we have to manually enable IMAP support via Gmail's webinterface in order for Gnus to receive mail via the IMAP protocol (see image below).

nnml Back end

The third step is the one that is actually the most work (leaving aside the goofs that need two hours to figure that IMAP support needs to...). The below is what a guy called John King would put into his .gnus respectively .emacs.

(add-to-list 'mail-sources '(imap :server    "imap.gmail.com"
                                  :user      "[email protected]"
                                  :password  "77AeW.&e!M<k+~?ukp"
                                  :port 993
                                  :stream ssl
                                  :authentication login
                            )
)

The way how I generate passwords can be seen below — the manual page tells about the switches in detail.

sa@pc1:~$ pwgen -synB 18 1
77AeW.&e!M<k+~?ukp
sa@pc1:~$

The first example works perfectly fine but note that John's password is there in plaintext, for anyone to read if he puts his .emacs online as I do or if he sends it to someone via email etc. Certainly, neither John nor anyone else would want that. Because of that, I keep all sensible information out of my .emacs and instead put it into another file that is loaded but never made public. That file contains such things like the password from above and maps it to some variable e.g. (setq "priv-imap-gmail-mail-server" "imap.gmail.com").

The code below makes use of those variables so I can put my .emacs online without worries it might cause a security risk for me or someone else. Note the ` and , which basically ensures the variable is evaluated and then the function is executed with the secret value behind the variable.

(add-to-list 'mail-sources `(imap :server    ,priv-imap-gmail-mail-server
                                  :user      ,priv-gmail0-mail-user
                                  :password  ,priv-imap-gmail0-password
                                  :port 993
                                  :stream ssl
                                  :authentication login
                            )
)
nnimap backend

I am now using the real IMAP back end to retrieve my mail — this makes especially sense since I am using more than one computer (a workstation and a subnotebook) to read/write mail. Finally, after a few years, I switched to the nnimap back end since I want all my mail to remain on the mail server(s) — I prefer an IMAP behavior over POP behavior...

Sending Mail via Gmail

For now, I use my own MTA (Mail Transfer Agent) so there is no need for setting Gnus up to use Gmail's SMTP server. However, it is of course possible to do so... the net is full with examples how that is accomplished with Gnus.

Permalink for Articles

We are reading an article from a news group carried by, for example Gmane, and suddenly we want to get a permalink in order to post it somewhere else (maybe to an IRC channel, another article we aer just writing, etc.).

In order to do so, we hit t (gnus-summary-toggle-header) with point in the article buffer. Then we look out for the Archived-At: header, take its URL and be done.

gnus-summary-delete-article

If you want to not just expire an article but to physically delete from your HDD (Hard Disk Drive) once and forever.

,----[ C-h f gnus-summary-delete-article RET ]
| gnus-summary-delete-article is an interactive compiled Lisp function in `gnus-sum.el'.
| (gnus-summary-delete-article &optional n)
|
| Delete the n next (mail) articles.
| This command actually deletes articles.        This is not a marking
| command.  The article will disappear forever from your life, never to
| return.
|
| If n is negative, delete backwards.
| If n is nil and articles have been marked with the process mark,
| delete these instead.
|
| If `gnus-novice-user' is non-nil you will be asked for
| confirmation before the articles are deleted.
`----

Packages/Libraries

This section is about additional add-on packages/libraries which I use in conjunction to the code shipped as Gnus.

BBDB

BBDB stands for The Insidious Big Brother Database –- an address book that you can hook into your mail- and newsreader, sync with your Palm, mobile, etc.

What the BBDB is and what it can be used for
BBDB

This subsection is intended to contain notes with regards to BBDB usage.

bbdb-insert-new-field

Is bound to C-o

,----[ C-h f bbdb-insert-new-field RET ]
| bbdb-insert-new-field is an interactive Lisp function in `bbdb-com.el'.
| (bbdb-insert-new-field record name contents)
|
| Add a new field to the current record; the field type and contents
| are prompted for if not supplied.
|
| If you are inserting a new phone-number field, you can control whether
| it is a north american or european phone number by providing a prefix
| argument.  A prefix arg of ^U means it's to be a euronumber, and any
| other prefix arg means it's to be a a structured north american number.
| Otherwise, which style is used is controlled by the variable
| `bbdb-north-american-phone-numbers-p'.
|
| If you are inserting a new net address, you can have BBDB append a
| default domain to any net address that does not contain one.  Set
| `bbdb-default-domain' to a string such as "mycompany.com" (or,
| depending on your environment, (getenv "DOMAINNAME")), and
| "@mycompany.com" will be appended to an address that is entered as
| just a username.  A prefix arg of ^U (or a `bbdb-default-domain'
| value of "", the default) means do not alter the address.
|
| [back]
`----
Snarf up a BBDB Record
,----[ C-h f bbdb-snarf RET ]
| bbdb-snarf is an interactive Lisp function in `bbdb-snarf.el'.
| (bbdb-snarf where)
|
| snarf up a bbdb record where the point is.
| We assume things are line-broken and paragraph-bounded.
| The name comes first and other fields (address,
| phone, email, web pages) are recognized by context.
|
| Required context:
|     addresses end with "City, State ZIP" or "City, State"
|     phones match bbdb-snarf-phone-regexp
|         (currently US-style phones)
|     email addresses have @'s in them
|     web sites are recognized by http:// or www.
|
| Address and phone context are currently US-specific;
| patches to internationalize these assumptions are welcome.
|
| M-x bbdb-snarf is similar to M-x bbdb-whois-sentinel, but less specialized.
|
| [back]
`----
non-US Phone Numbers

Parsing non-us phone numbers is a hassle with BBDB — there are just to many possible formats worldwide. Best to do is to use the prefix argument (C-u) to C-o in order to avoid automated handling by BBDB and save numbers as they are provided by the user.

,----[ C-h k C-o ]
| C-o runs the command bbdb-insert-new-field
|   which is an interactive Lisp function in `bbdb-com.el'.
| It is bound to C-o.
| (bbdb-insert-new-field record name contents)
|
| Add a new field to the current record; the field type and contents
| are prompted for if not supplied.
|
| If you are inserting a new phone-number field, you can control whether
| it is a north american or european phone number by providing a prefix
| argument.  A prefix arg of ^U means it's to be a euronumber, and any
| other prefix arg means it's to be a a structured north american number.
| Otherwise, which style is used is controlled by the variable
| `bbdb-north-american-phone-numbers-p'.
|
| If you are inserting a new net address, you can have BBDB append a
| default domain to any net address that does not contain one.  Set
| `bbdb-default-domain' to a string such as "mycompany.com" (or,
| depending on your environment, (getenv "DOMAINNAME")), and
| "@mycompany.com" will be appended to an address that is entered as
| just a username.  A prefix arg of ^U (or a `bbdb-default-domain'
| value of "", the default) means do not alter the address.
|
| [back]
`----
Creative Commons License
The content of this site is licensed under Creative Commons Attribution-Share Alike 3.0 License.