Reading and writing emails in GNU Emacs with Gnus

Amin Bandali (he/him) - IRC: bandali, https://kelar.org/~bandali, bandali@gnu.org

Format: 22-min talk ; Q&A: BigBlueButton conference room Etherpad: https://pad.emacsconf.org/2025-gnus
Etherpad: https://pad.emacsconf.org/2025-gnus
Status: TO_REVIEW_QA

Talk

00:02.620 Introduction 01:25.240 Demo 02:49.960 Don't panic 03:58.560 Configuring servers 05:46.240 .authinfo 06:26.600 Configuration 08:25.720 Starting Gnus 09:40.080 Always showing groups 10:19.900 Reading messages 11:30.120 Debugging IMAP 12:55.160 Topics 14:25.560 Customizing message display 15:24.320 Sending emails 17:26.660 Plans 19:27.960 Wrapping up 20:12.760 nnimap

Duration: 21:37 minutes

Q&A

00:00.000 Q: I noticed that it took a considerable amount of time to send email. Is it possible to configure gnus to use an external smtp client to send emails? 01:17.838 Q: Is the dovecot workaround actually a solution? 03:07.118 Q: Do you have experience with mu4e or Notmuch, and why would you say Gnus is worth using compared to these? 06:05.320 Q: At my organization, we're forced to use OAuth with outlook and they've also blacklisted all email clients except thunderbird (but they don't support it, only the webmail or the outlook app). Do you know if this is something that can be circumvented in Gnus? 13:18.798 Comment: Liked how I started with a clean setup 17:34.660 Comment: They would have liked to see a quick demo of Gnus while it is fully configured and tweaked 18:22.798 My init file 19:34.080 Mail splitting 19:52.638 Gnus parameters 21:31.020 Custom signatures 22:05.020 Other customizations

Listen to just the audio:
Duration: 27:00 minutes

Description

Gnus has had the reputation of being difficult to grasp and configure. The myriad of configuration options of its many major and minor modes which afford Gnus its high degree of customizability can also seem overwhelming and daunting for folks looking to learn about and use it to build a workflow for doing email in GNU Emacs.

This talk aims to provide a high-level outline of some of the key concepts in Gnus, and a roadmap for approaching and configuring Gnus and Message to your liking so that you, too, can read, compose, and send emails with GNU Emacs.

About the speaker:

Amin Bandali is a computing scientist and activist for user freedom, and a participant in various free software projects and communities. Bandali wears a few hats around the GNU Project and is a volunteer member of the Free Software Foundation SysOps team, a core organizer of EmacsConf, a Debian Developer and a contributor to the Trisquel GNU/Linux distribution.

In this talk, Bandali will go over configuring Gnus and Message for reading and composing emails, showcasing one of many approaches for using GNU Emacs for email communications.

Discussion / notes

  • bandali: here's the talk page on my site, along with the sample init and authinfo files: https://kelar.org/~bandali/2025/12/06/emacsconf-2025-gnus.html

  • Q: I noticed that it took a considerable amount of time to send email. Is it possible to configure gnus to use an external smtp client to send emails? (thanks! I agree, even on thunderbird it's slow sometimes).

    • A: Right, yes, it definitely is possible. In fact, in the past, I've used, I believe, MSMTP, which is a small SMTP implementation that's independent of Emacs. So you can do that. It's also possible to, pointed to have it use the sendmail binary on your system. If you have a local MTA mail transfer agents like Exim or Postfix installed and configure. I believe that should also dispatch and return instantaneously and then have Postfix or Exim deal with sending the message on their terms without blocking Emacs. I don't know, it depends. Normally it's not always that slow. Sometimes it is. I think it also depends on the load on your mail server. Sometimes it's instantaneous, sometimes not. So I hope that helps.
  • Q: Is the dovecot workaround actually a solution? I haven't tried it, but if it works smoothly I'll surely do so.
    • A: It is, it really is. I've actually been using that setup for many years. I can't remember. Oh, I believe it's Eric Abramson who first shared instructions on how to set this up. Let's see if I can find it. There we go. Yeah, this is it. I'll share this on IRC as well. Yeah, so Dovecot is very, very efficient. It's written in C. And yeah, when you point Gnus to an IMAP server like Dovecot, dealing with email is pretty instantaneous. This article or post by Eric is great. Although I will say that there was a recent major release of Dovecot. I can't remember if it's 2.4 or 2.5. and it's a breaking change. They change a lot of the configuration syntax, so there's a high likelihood that this drop-in configuration won't work, even though that's what I used as my starting point a couple years ago. I will be writing an article on my personal site to go over how to configure recent versions of Dovecot for such a setup, for a local setup.
  • Q: Do you have experience with mu4e or Notmuch, and why would you say Gnus is worth using compared to these?
    • A: I do have experience with these, although it goes back many years, and I'm sure both of these have evolved since, and they're great pieces of software in their own rights. And actually I did use them in that order. Like I first tried Mu4e in Emacs, when I started using email in Emacs, then I tried Notmuch for a while, and then I went to Gnus. They're great. They have like pros and cons. Mu4e, I believe, has excellent maildir handling directly, if I'm not mistaken, unlike Gnus, so you can point it directly to your maildirs locally, and it should work fine, if I'm remembering correctly. Notmuch is also excellent. The thing with Notmuch is that it uses Xapien for indexing and searching email. It's tag-based, so you can tag messages. And then, yeah, it's amazing for tagging and searching capabilities, very powerful search features. And my reason for trying Gnus and then, I don't know, eventually liking it was couple of years ago, I went through this kind of phase of trying and trying to like use and stick with packages that are built into GNU Emacs as much as possible. No particular reason that I would like, you know, recommend people do that per se, but yeah, that's just what I wanted to do. Cause I noticed my configurations were like growing unwieldy. So I, like many others declared, Emacs in its bankruptcy, in its file bankruptcy, and configure things from scratch and try to use whatever that Emacs had to offer built in itself, and then only reach for a couple of external packages here and there. So that's what I went to. That's how I ended up on Gnu's. And it's been very nice. I've tried a few other email clients since then, temporarily, like I tried AERC, A-E-R-C, which is not built into Emacs, but I don't know, I keep coming back to Gnus. It's great to have it all, to be able to do all these things from within GNU Emacs.
  • Q: At my organization, we're forced to use OAuth with outlook and they've also blacklisted all email clients except thunderbird (but they don't support it, only the webmail or the outlook app). Do you know if this is something that can be circumvented in Gnus? (I've tried it with notmuch for example, and it never worked. Even K-mail on android didn't work). But this specific to IT at my org. I'll ask on IRC. Thanks!

    • A: So if I'm pretty sure, at least with the recent Emacs versions, Gnus does support xOAuth as a backend. So I think you should be able to do that even with just the things, the machinery built into Emacs. Even so, I think there are external packages and programs. One of them I think comes from this Cyrus IMAP world of things that implement like XOAuth. So you should be able to do that. You should be able to use that to get authenticated to your organization's mail server. But I've never tried that myself. In terms of like blacklisting all email clients, I don't know how they would do it outside of, you know, this kind of authentication thingy. If, you know, they check the user agent header or something, that's pretty easy to customize and set. With Gnus, you can set, define a posting style to set a custom user agent. So, yeah, that's as far as I know. Thunderbird is pretty nice too. Like I reach out for it sometimes when I'm in a rush or can't, don't have the time to like set up Gnus with like some new like IMAP server or something. I reach for it sometimes, but yeah, I primarily use Gnus. I see. So the question says they tried it with not much and it never worked. Even KML on Android didn't work. Right. Yeah, I'm not sure. If you can like provide maybe more details as to like what doesn't work or if you get any particular error messages or like how they're trying to like prevent you from using it, then maybe folks could have some ideas of maybe how to get around that. ... So the organization is doing some kind of check during setting up of OAuth. So I think how that works is sometimes these email clients, I think at least this is the case for Gmail or something, where a project such as Thunderbird needs to apply for some kind of token to be able to authenticate and connect its users to a mail server. So all I will say is that Thunderbird is free software and the sources are available and you might be able to find the token that they use and yeah.
  • excellent introduction to gnus! thanks!!

  • Very nice talk! Thank you.
  • Really good introduction, this will be my go to link from now whenever someone asks "how to use gnus".
  • great - going to finally be brave and give gnus a look after that, no excuse not to anymore
  • I really enjoyed, from time to time I came across to gnus, but I don't have the time to tune it and I keep with mu4e+mbsync to handle my email
  • Yes, it covered the key points very well and should hopefully encourage others to start using gnus.
  • https://ericabrahamsen.net/tech/2014/oct/gnus-dovecot-lucene.html
  • okay thanks, will do gnus + dovecot ater the conf.
  • For me, the key feature of gnus is scoring (both manual and adaptive)!
  • I use davmail to access Outlook from gnus.
  • Looking forward to more videos on GNUS from you! Excellent talk!!
    1. Excellent introduction. If I would have had such a tutorial some 15 years ago when I first used Gnus, my learning curve would not have been that steep. Thanks! Hope it will help new users. So, spread the word about your talk!
  • Fantastic presentation!
  • Thanks for this talk, I liked that you started with a clean setup and built from that. Reading and writing emails in Emacs is definately not straighforward, I find it frustating that there are so many pieces to put together, and a bunch of documentation to read. I admit I find Gnus overwhelming. Still, like you said, this is built-in into Emacs, and it can be used to read different type of contents, like emails and newgroups, rss feeds, etc. Looking forward to more documentation and tutorials from you, thanks again!
  • BTW, I would have like to see a quick demo of Gnus while it is fully configured and tweaked, just to tease me to bother using it!

Transcript

[00:00:02.620] Introduction
Hello, my name is Amin Bandali, and today I'd like to talk about reading and writing emails in GNU Emacs using Gnus specifically. Gnus has had this sort of reputation of being difficult to approach and configure. That's understandable because it has many, many options and major and minor modes that interact in different ways with each other. And it also doesn't help that Gnus started originally as a newsreader rather than a mail client. So a lot of the terminology that it uses is also rooted in that, in reading and writing news. But nevertheless, with this video and talk, I hope to provide a sort of very quick introduction of starting to use Gnus to read and write email and send it. We will use Gnus' IMAP support, mainly because a lot of people these days have email accounts with mail service providers that support IMAP, which is an open standard. So it's widely available and supported across many different providers as well as mail clients or mail user agents as well. Okay, so let's just jump straight right in. I will enter this demo directory that I created for the purposes of this demonstration and change my home directory to this one so that we can safely experiment with Gnus here. For this presentation, I've written up a quick initialization file or init file that I will share afterwards as well to get us going with Gnus. There's not much to it at the moment. Just set up the package archives and install the keycast package for showing the key presses in the mode line. Yeah, that's about it. And I'll also define a little like inline function +emacs.d that allows me to conveniently write and have it expanded or refer to files and directories, rather, paths that we could expand, inside my Emacs configuration directory. I also have this eval-last-sexp bound to a global key, so that I will be able to easily use it for this talk. Okay, let's jump right in.
[00:02:49.960] Don't panic
First things first, don't panic. And that's actually also the name of the very first node in the Gnus manual when you open it. And it's actually nice. I definitely, definitely recommend that you look through at least the very first couple of chapters of this, skim through it, and later on refer to it whenever you find something confusing or don't understand it. But yeah, we'll start with these two paragraphs here. So again, a Gnus installation is basically just a list of one or more servers and the subscribed groups from those servers and articles in those groups. You can already kind of see where that influence of a newsreader comes in. But yeah, basically what it's saying is that, you know, we have one or more servers. We can think of them as email servers. Groups can be like, we can think of them as folders or directories. And yeah, articles, those would be like our email messages.
[00:03:58.560] Configuring servers
With Gnus, we can add and configure servers mainly using two variables. One of them is the gnus-select-method and the other is gnus-secondary-select-methods. The first one predates the second one and I generally don't recommend using it, because first of all, it can only point to one server, and that server, because it's the primary, then Gnus won't add a prefix to its groups, so later on, as you get into more advanced features of Gnus and, for example, want to write rules to modify your message composition in a way for certain groups, or file mail, automatically classify mail, this distinction can become confusing and annoying. My recommendation is to always and only use the gnus-secondary-select-methods. Yeah, so let's do that here. I'm gonna uncomment this portion. So here, I set the primary select method to nil, and the second one, I define an nnimap server of the nnimap backend. I give it the name ec25gnus. What I want it to do is to connect to my mail server, which is at this address, and fetch emails from it over TLS with this username.
[00:05:46.240] .authinfo
And then the passwords or the credentials, you can put them in the .authinfo file. Normally, you would want to, for example, encrypt this file with your GPG key. But for this demonstration, I haven't. So yeah, the format is the keyword "machine" followed by the name of your Gnus server or account, followed by the word "login", then your login username, and then the password, which here it's not shown. Yeah.
[00:06:26.600] Configuration
But before we actually set this, I'll just show you that if we like start Gnus with M-x gnus, initially, it will just show an error like this. Even if we continue, it's empty. There's not much because Gnus doesn't know where to fetch these emails from. And that's what we will configure. Excuse me. Yeah, so just for convenience, we can bind Gnus to, for example, C-c g, as I've done here. You will want to set your name and email address, like so. Here we tell Emacs that we are going to be using Gnus for reading email, because Emacs comes with other email clients as well, such as Rmail, and in fact, defaults to Rmail, so this way, we tell it to use Gnus. By default, Gnus puts its newsrc file and other files, I believe it still scatters them in a few different directories in your home directory, so it's a little bit messy. So what I prefer to do is to just put it all under the Gnus directory inside of my Emacs configuration, as I do here. Yeah, and then here we just tell Gnus to, like, don't try to bother with a generic newsrc file that would be shared with other news readers. Just want to use it for email. And yeah, so we just tell Gnus to keep all of its data inside a dedicated .newsrc.eld (for Emacs Lisp data) file instead. And we can also have Gnus not prompt us when we want to exit with q. Anyway, so let's go ahead and evaluate this. So this has been set,
[00:08:25.720] Starting Gnus
so if we type M-x gnus again, or hit C-c g, now we're faced with an empty buffer, and it says no news is good news, and that's actually one of the characteristics of Gnus is that by default it tries to like sort of declutter and show us a little less possible in the group buffer, meaning that if you don't have any groups with unread or marked or, like, starred messages, it will not show them. To actually see all of our groups or folders, we hit shift L or capital L, and we see that we have an inbox here, as expected. So we enter the inbox, and we see that there is an article there and it's already been marked as read. But if we mark it as unread and exit and enter Gnus again, this is what we would see. We would see that our group and then we enter it, we see our mail here. Yeah, and this is our very first email that we read in GNU Emacs here, inside Gnus.
[00:09:40.080] Always showing groups
It might be useful to have Gnus always show certain groups or folders even if they don't have anything unread or marked inside of them. The way we can do that is by setting this variable gnus-permanently-visible-groups to a regular expression that describes the name of these groups. So if we launch Gnus again, this time, we see that that group is visible, even though there's no unread messages in it.
[00:10:19.900] Reading messages
When we enter a group or folder, we will see a list of all of our messages. Here, we only have one. We can press M-u or Alt-u to mark something as unread. You can press d to mark it as read. If you press just u, it'll tick the article, which is kind of the equivalent of marking the message or email as starred in other email clients such as Thunderbird. We see that when there are groups that have starred or ticked messages inside of them, Gnus will mark them with this little star here, or asterisk. This talk is just barely scratching the surface. Let's see how far... How am I doing with the time? Okay, 11 minutes already.
[00:11:30.120] Debugging IMAP
Just a couple of helpful things here, like this nnimap-record-commands variable. It's useful when you want to debug your IMAP setup with Gnus. If you set it to anything non-nil, it will log the commands that it runs to a special \*imap log\* buffer. And here I just set it to this init-file-debug variable, which is set to non-nil whenever you launch Emacs with the --debug-init switch, so that's pretty helpful. You want to also set your sent folder, basically, where Gnus will save a copy of the message that you just sent. Normally, I think the convention these days is, a lot of you know servers and clients use a dedicated sent folder, but with Gnus, I just prefer to use INBOX itself. Mainly because then I will have threading working for free, so I can read the entire thread of an email chain there in one place. Of course, we don't have to keep the messages in there forever. And in fact, Gnus has facilities, both manual and automated, for expiring emails into different locations or different folders. Yeah. So let's move on here. Topics are another nice feature of Gnus. So this is useful for creating some topics and then classifying or grouping your directories there. So we will see the use of this in a moment, where, let's say, I want to add a second account to Gnus. This one I'm going to call ec25work. Let's pretend that this is my work email. So if we open Gnus now, we see that our work INBOX also shows up here. And because we enabled topic mode, we see that we have these sort of buttons like Gnus and misc here. And we can, I believe, create a topic with capital T n. We can call it personal, this one. Let's create another one, work. And then what we can do is go over the directory that we want, for example, this one, hit capital T m to move it to the personal topic, and this work one, move it to the work topic. So we can nicely classify and group our groups folders here, which is especially useful when you have hundreds of them.
[00:14:25.560] Customizing message display
Anyhow, we can customize different aspects of message display. Like for example, we can this way customize and change the order of which headers we want to see and where. So if I launch Gnus and go back to this email here, these are the headers that we see at the top. Excuse me. And with Gnus we can always We can have it show all the headers by pressing t to toggle the headers. Here we can see all the nitty-gritty and all of the headers in the message and we can toggle it back with t again. We can modify and customize the sorting with dedicated sorting functions. It comes with a number of them out of the box but we can define them as well.
[00:15:24.320] Sending emails
Now to send emails. Let's see. We will be using message, and that's what Gnus itself uses. So I will set things up here. Let's see. Okay, so first of all, we want to have Gnus mark the messages that we write to others as read automatically, so this option does that. And then we define posting styles this way using the prefix, the name of the IMAP server. And this is how we can tell it to use what email address for the From [header] and which SMTP server to send it with. Yeah, and then gcc is where Gnus will save the copy of the messages that we write. So if we go ahead and launch Gnus again. We can go into our personal email here, hit m to compose a new message. We can prepare an email to, let's say, our work address. Hello from EmacsConf 2025 Gnus talk. Hello, this is just a test. :) Yeah, and we hit send. The sending will be done using Emacs's built-in SMTP libraries. Sometimes it can take a moment. Okay, that's it. It's done. So if we go back out and if we hit g to get new news, we should be able to see our new email there in the other account that we just sent it to. So we can come here, open it, and there we go. There is a lot to configure in Gnus, and we're just barely scratching the surface, and unfortunately I don't have the time to explain all of these but I do plan on doing a much longer running series, whether it's text or videos, showing how to configure and use a lot of these different aspects of Gnus. But yeah, here, near the end, just a couple of... quick things. I find it's nice to have message prompt us for [confirmation] that we do want to send a message. Actually, when it does that, I take another look over my email to make sure I don't have any typos. It's generally a good idea to wrap your messages around 70 or 72 characters. We do that here. We can tell Gnus to forward messages as a proper MIME part, instead of some half-broken way. This customization, the sendmail function, is how we tell Gnus with message to use the SMTP library to sending the email, and these two variables are useful for omitting our own email address when we want to send someone, like when we hit r, to reply to someone. if we configure these variables, then Gnus won't add our own address to the To or Cc, which is pretty useful. I also find it helpful to unbind C-c C-s. That's another key for sending the message [in addition to C-c C-c]. And because C-c C-d, which is very close to it on the QWERTY layout, is useful for saving a draft and then coming back to it, I don't want to accidentally hit C-c C-s, and send the message prematurely. So I unbind it. Yeah, anyway, that's about it.
[00:19:27.960] Wrapping up
That's a kind of very quick tour and introduction of setting up Gnus. Here, we just configured a remote IMAP server, but we can also, of course, set up a local IMAP server such as Dovecot and point Gnus to there, and use programs like OfflineIMAP, I believe, or the mbsync program from isync package or isync project to synchronize our messages to local mail directories and then point Gnus to it. The reason we might want to use that is to always have a copy of our messages at hand so we can use offline. And why use nnimap specifically? As of now, the Maildir backend included with Gnus is very inefficient, especially when dealing with tens or hundreds of thousands of messages like some of us are. It just takes an eternity to try and index them and get going. In that case, what I recommend doing is instead of interfacing directly with Maildir, for Gnus, just install and run Dovecot, a local IMAP server, and point Gnus to that. I plan on writing tutorials or doing videos about these other aspects of configuring Gnus after the conference. That's about it for me, so I hope you find this helpful. If you have any questions, please feel free to email me at bandali@gnu.org or @kelar.org. You can take a look at my personal website where I plan on posting other Emacs and Gnus materials. And yeah, thank you for watching and I hope you enjoy the rest of the conference. Take care.

Captioner: sachac

Q&A transcript (unedited)

[00:00:00.000] Q: I noticed that it took a considerable amount of time to send email. Is it possible to configure gnus to use an external smtp client to send emails?
Okay, so first question. I noticed that it took considerable amount of time to send email. Is it possible to configure to use an external SMTP client to send emails? Right, yes, it definitely is possible. In fact, in the past, I've used, I believe, MSMTP, which is a small SMTP implementation that's independent of Emacs. So you can do that. It's also possible to, pointed to have it use the sendmail binary on your system. If you have a local MTA mail transfer agents like Exim or Postfix installed and configure. I believe that should also dispatch and return instantaneously and then have Postfix or Exim deal with sending the message on their terms without blocking Emacs. I don't know, it depends. Normally it's not always that slow. Sometimes it is. I think it also depends on the load on your mail server. Sometimes it's instantaneous, sometimes not. So I hope that helps.
[00:01:17.838] Q: Is the dovecot workaround actually a solution?
Let's see, is the Dovecot workaround actually a solution? I haven't tried it, but if it works smoothly, I'll surely do so. It is, it really is. I've actually been using that setup for many years. I can't remember. Oh, I believe it's Eric Abramson who first shared instructions on how to set this up. Let's see if I can find it. There we go. Yeah, this is it. I'll share this on IRC as well. Yeah, so Dovecot is very, very efficient. It's written in C. And yeah, when you point Gnus to an IMAP server like Dovecot, dealing with email is pretty instantaneous. This article or post by Eric is great. Although I will say that there was a recent major release of Dovecot. I can't remember if it's 2.4 or 2.5. and it's a breaking change. They change a lot of the configuration syntax, so there's a high likelihood that this drop-in configuration won't work, even though that's what I used as my starting point a couple years ago. I will be writing an article on my personal site to go over how to configure recent versions of Dovecot for such a setup, for a local setup.
[00:03:07.118] Q: Do you have experience with mu4e or Notmuch, and why would you say Gnus is worth using compared to these?
Let's see. Do you have experience with Mu4e or not much? And why would you say Gnus is worth using compared to these? I do have experience with these, although it goes back many years, and I'm sure both of these have evolved since, and they're great pieces of software in their own rights. And actually I did use them in that order. Like I first tried Mu4e in Emacs, when I started using email in Emacs, then I tried Notmuch for a while, and then I went to Gnus. They're great. They have like pros and cons. Mu4e, I believe, has excellent maildir handling directly, if I'm not mistaken, unlike Gnus, so you can point it directly to your maildirs locally, and it should work fine, if I'm remembering correctly. NotMuch is also excellent. The thing with Notmuch is that it uses Xapien for indexing and searching email. It's tag-based, so you can tag messages. And then, yeah, it's amazing for tagging and searching capabilities, very powerful search features. And my reason for trying Gnus and then, I don't know, eventually liking it was couple of years ago, I went through this kind of phase of trying and trying to like use and stick with packages that are built into GNU Emacs as much as possible. No particular reason that I would like, you know, recommend people do that per se, but yeah, that's just what I wanted to do. Cause I noticed my configurations were like growing unwieldy. So I, like many others declared, Emacs in its bankruptcy, in its file bankruptcy, and configure things from scratch and try to use whatever that Emacs had to offer built in itself, and then only reach for a couple of external packages here and there. So that's what I went to. That's how I ended up on Gnu's. And it's been very nice. I've tried a few other email clients since then, temporarily, like I tried AERC, A-E-R-C, which is not built into Emacs, but I don't know, I keep coming back to Gnus. It's great to have it all, to be able to do all these things from within GNU Emacs. Let's see, some notes and feedback. Thank you for all the kind words folks, appreciate it. I'm glad that you found the presentation helpful or somewhat useful. Let's see, new question. Oh, and I will check IRC as well.
[00:06:05.320] Q: At my organization, we're forced to use OAuth with outlook and they've also blacklisted all email clients except thunderbird (but they don't support it, only the webmail or the outlook app). Do you know if this is something that can be circumvented in Gnus?
Let's see, at my organization, we're forced to use OAuth with Outlook, and they've also blacklisted all email clients except Thunderbird, but they don't support it, only the Webmail or the Outlook app. Do you know if this is something that can be circumvented in Gnus? Let's see. So if I'm pretty sure, at least with the recent Emacs versions, Gnus does support xOAuth as a backend. So I think you should be able to do that even with just the things, the machinery built into Emacs. Even so, I think there are external packages and programs. One of them I think comes from this Cyrus IMAP world of things that implement like XOAuth. So you should be able to do that. You should be able to use that to get authenticated to your organization's mail server. But I've never tried that myself. In terms of like blacklisting all email clients, I don't know how they would do it outside of, you know, this kind of authentication thingy. If, you know, they check the user agent header or something, that's pretty easy to customize and set. With Gnus, you can set, define a posting style to set a custom user agent. So, yeah, that's as far as I know. Thunderbird is pretty nice too. Like I reach out for it sometimes when I'm in a rush or can't, don't have the time to like set up Gnus with like some new like IMAP server or something. I reach for it sometimes, but yeah, I primarily use Gnus. I see. So the question says they tried it with not much and it never worked. Even KML on Android didn't work. Right. Yeah, I'm not sure. If you can like provide maybe more details as to like what doesn't work or if you get any particular error messages or like how they're trying to like prevent you from using it, then maybe folks could have some ideas of maybe how to get around that. Yeah. Let's see, I'm going to go over and take a look at IRC. Yes, scoring is great. In it for bankruptcy, they have mail to use outlook from Gnus, right? Yeah, there are various like solutions and workarounds. Yeah, let's see. How's the schedule looking? I think the next talk is gonna start pretty soon, if I'm not mistaken. Yeah, so I believe that's about all the time that we have on the stream for the Q&A, but of course I'll hang around here on big blue button and IRC for a while if folks would like to ask more questions. And also feel free to email me, bandali@gnu.org or at kelar.org with any questions. Thanks again for the kind words folks, appreciate it. Yeah, I myself also wish that there were like some tutorials or something when I was getting started with Gnus, but we didn't have that. So, and I've been meaning to like record a talk like this for years for EmacsConf, but yeah, funnily enough, after like 10 years of, at my 10th anniversary of being involved with the conference, I finally put together a talk of my own to talk about configuring Gnus. Let's see. Oh, I see, I see. So the organization is doing some kind of check during setting up of OAuth. So I think how that works is sometimes these email clients, I think at least this is the case for Gmail or something, where a project such as Thunderbird needs to apply for some kind of token to be able to authenticate and connect its users to a mail server. So all I will say is that Thunderbird is free software and the sources are available and you might be able to find the token that they use and yeah. Right, so yeah, I'm just reading this comment here. You're very welcome again. I hope you find it useful in some way.
[00:13:18.798] Comment: Liked how I started with a clean setup
So they say that they like the fact that I started with a clean setup and built from that. Reading and writing emails in Emacs is definitely not straightforward. And I find it frustrating that there are so many pieces to put together and a bunch of documentation to read. And they admit that they find Gnus overwhelming. I sympathize and empathize. I've been in that very same situation. And yeah, it's totally okay to feel like that. I mean, email itself is kind of complex, even on the server side. If you've ever looked or have been interested in self-hosting your email, you know that there are so many moving parts and pieces. So yeah, I hope that this short video can be a useful first step of getting you set up to at least be able to read your emails and compose and send them within Emacs so that you can see that it's possible and get that positive feedback loop going and get the encouragement and then go from there. Yeah, Gnus is most definitely very extensible. It already has a lot of backends built into GNU Emacs, and there are other ones that people have written externally on various code hosting forges that you can download and set up. Yeah, thank you all. It's nice to see that the talk has kind of resonated with so many folks. And, yeah, it is encouragement for me to finally get around to starting perhaps either a tutorial series or like a video series like this concretely showing and walking through how to like set up and configure these different aspects. There were so many other things that I wanted to show, but didn't have the time or couldn't squeeze it into the 15, 20 minute format for the conference. Yeah. I'm going to hang out here for a few more minutes.
[00:17:34.660] Comment: They would have liked to see a quick demo of Gnus while it is fully configured and tweaked
Another comment, they would have liked to see a quick demo of Gnus while it is fully configured and tweaked. That's kind of a teaser. I can definitely do that sometime after the conference. Truth be told, I don't customize the looks of it heavily. I use the default layout for the summary and article buffers. With Gnus, you can even reconfigure that to arrange these in your preferred location or layout. I don't really do any of that. For the most part, my setup is pretty simple.
[00:18:22.798] My init file
I can actually maybe show my init file here. Let's see. Yeah, so this is, I guess, part of my Gnus configuration. I configure a couple of mail servers, set up these expiry targets so that I can hit capital E on a message and then have it be archived. You can have it be immediate. I do that for work messages or you can use the default seven day, where if a message is older than seven days, like once it reaches that age and it's been marked as expired and it'll be moved into, like for example, this yearly archive directory, like archive. For example, 2025.
[00:19:34.080] Mail splitting
Yeah, you can do like mail splitting, automatically filing email. The fancy splitting is the more powerful variant. You can use like all kinds of regular expressions and move email around depending on what field or what header matches what regular expression.
[00:19:52.638] Gnus parameters
What else? Gnus has things, has a facility like Gnus parameters for configuring individual groups or directories. Like if you file all the mailing or the mails for a particular mailing list into a certain group. And for example, if they add the name of the mailing list to the, subject header. They prefix the subject header with the name of the list. You can set that here and Gnus will automatically hide that for you. So, let's see. There's a news agent, which I won't even get into because it's a rabbit hole. It's pretty cool. Definitely check it out. You can define what MIME parts should be buttonized so that you can like easily toggle them when displaying the article. Yeah, you can customize the list of the headers that are displayed and the order of them. Like I showed in the sample init file that I provided. Gnus can integrate with Dired.
[00:21:31.020] Custom signatures
You can set like custom signatures like here. I might define something and then I use it later in the posting, in the posting, the news posting styles variable. I set a signature to that. Yeah.
[00:22:05.020] Other customizations
You can write custom like functions to move email around. So I have this like Gnus chunk article function that I bind to v s, so v is the prefix came up that I defined, and then s, so you can do things like that. You can customize the format of the topic lines, so if I actually launch Gnus with my own configuration, this is how it might look like, so. You can define archive decoders to let you like automatically decode inside the Gnus article buffer, how to extract certain archive formats. Like for example, I defined this one for Gzip. You can set like discouraged alternatives to like, for example, hide HTML email by default, especially if there is a plain text version. I do that. GNU says machinery around like encrypting emails. It has a bunch of customizations. that you can configure and have Gnus behave a certain way. For example, when replying to signed or encrypted emails. And yeah. Anyway. That's about it. So yeah, thanks again for hanging out with me, folks. I appreciate all the kind words. comments and yeah, I'm also looking forward to trying and putting together more videos or articles about Gnus. Definitely one about configuring Dovecot for local mail. And yeah, take it from there. Thanks again. Hope you enjoy the rest of the conference.

Questions or comments? Please e-mail bandali@gnu.org