360 lines
22 KiB
Plaintext
360 lines
22 KiB
Plaintext
|
|
Episode: 203
|
||
|
|
Title: HPR0203: Alpine: How to
|
||
|
|
Source: https://hub.hackerpublicradio.org/ccdn.php?filename=/eps/hpr0203/hpr0203.mp3
|
||
|
|
Transcribed: 2025-10-07 13:44:22
|
||
|
|
|
||
|
|
---
|
||
|
|
|
||
|
|
Let's get started.
|
||
|
|
I'm recording this not in my traditional environment, so if you hear servers in the background
|
||
|
|
or anything humming, that is because I'm in my office right now, having been made homeless
|
||
|
|
for a good week while I'm transitioning from one apartment to another.
|
||
|
|
So I apologize for sound quality if it is suffering.
|
||
|
|
And since Dave Yates and his latest episode decided to start a new segment called What
|
||
|
|
Is in My Bag, an exciting new segment, I'm going to get that out of the way right now.
|
||
|
|
What is in my bag is all my personal belongings, clothes, computers, and that's all I own.
|
||
|
|
So there you go.
|
||
|
|
Okay, so this episode is going to be about setting up pine or alpine to work with IMAP specifically,
|
||
|
|
although a lot of this will apply if you're just doing it with a regular pop account as
|
||
|
|
well.
|
||
|
|
So first of all, the obligatory, what is pine?
|
||
|
|
Well, WebsterStictionary defines pine as an email client.
|
||
|
|
It's a text or a command line based email client.
|
||
|
|
And it was developed, I think, by the University of Washington.
|
||
|
|
You can get all this information on the inner web, just Google, pine, email client, you'll
|
||
|
|
get all the history about it.
|
||
|
|
It's fairly well time honored and a lot of people used it back in the days when they were
|
||
|
|
on whatever version of the internet existed on the campuses at universities and stuff
|
||
|
|
like that.
|
||
|
|
And this will help you understand the way that pine works.
|
||
|
|
So it's kind of good to imagine, you know, a university having whatever kind of network
|
||
|
|
they had, you know, you would get your user account name and you could sign in and you
|
||
|
|
could go into pine and, you know, it's the traditional multi-user system, right?
|
||
|
|
So fairly recently, we'll come back to that.
|
||
|
|
Fairly recently, pine was discontinued, has been around for a while, you know, they kind
|
||
|
|
of stopped developing on it.
|
||
|
|
You can still use it, but you could also opt to use the current developed program called
|
||
|
|
Alpine, ALPIN, and I don't know if these are acronyms or anything or if they're just
|
||
|
|
catching names, but Alpine is the, is the latest version of this kind of set up.
|
||
|
|
And in fact, if you launch, if you have both on your system and you launch them both,
|
||
|
|
you will not be able to tell them the part really, I mean, they're exactly the same in
|
||
|
|
look and feel.
|
||
|
|
It's just Alpine has some cool features like tab to completion.
|
||
|
|
So if you've got like a couple of addresses in your address book, you go to enter the name,
|
||
|
|
you hit tab and it completes it for you.
|
||
|
|
It's quite nice.
|
||
|
|
So I'm going to probably end up saying pine and Alpine, just assume I'm talking about
|
||
|
|
the same thing and basically you can assume that I'm talking about either pine or Alpine.
|
||
|
|
I'm not going to give you the URLs for either of these because typically what you'll be
|
||
|
|
able to do, if you're running Linux is just install it from your repo, if your repo
|
||
|
|
doesn't have it, Google for pine or Alpine email client and you will find the link to
|
||
|
|
it.
|
||
|
|
They're both on university websites and they're both very easy to download and as a matter
|
||
|
|
of fact, they're both really easy to compile Alpine, I was able to compile on basically
|
||
|
|
every system I had, Slackware, Mandriva, I didn't try it on Fedora and OS 10.
|
||
|
|
So there were really easy compiles, I think for OS 10 you have to set a couple of flags
|
||
|
|
like enable OS 10 binaries or something like that.
|
||
|
|
It's on their website.
|
||
|
|
It's just like one little thing that you have to pass while you're compiling or two
|
||
|
|
actually two little options but it's really easy and it works really well.
|
||
|
|
Okay, I know you're saying, well, why do I want to use Alpine Clat 2?
|
||
|
|
Answer is you probably don't.
|
||
|
|
You probably want your thunderbirds and your evolutions and your other email clients that
|
||
|
|
have all the fancy colors and the drag and dropping and stuff like that.
|
||
|
|
However, there are two things that you might actually might want to use Alpine.
|
||
|
|
Number one is if you actually do find yourself in a terminal or in a console a lot during
|
||
|
|
the day, it's just a bother to go back out to the GUI.
|
||
|
|
Like however you escape the console, sometimes it's just too much, you're just always flipping
|
||
|
|
over to the GUI and that just kind of gets bothersome after a while.
|
||
|
|
So you might want to do it for that reason.
|
||
|
|
Number two, you might want to use it simply to become familiar with a terminal based email
|
||
|
|
clients.
|
||
|
|
It's kind of a cool skill to have so it's kind of fun to teach yourself that.
|
||
|
|
I mean, there's not a whole lot to learn at this point about the GUI email clients,
|
||
|
|
right?
|
||
|
|
You've got that down probably.
|
||
|
|
So it is kind of fun to learn something new and the third one is because, you know,
|
||
|
|
the whole myth of it being faster, you know, the terminal.
|
||
|
|
It's just all text so fast, oh, so great.
|
||
|
|
So you can do it for that reason too if you're finding that the GUI based applications
|
||
|
|
is just horribly slow.
|
||
|
|
Not that I've actually had any problem with GUI based email clients being slow lately,
|
||
|
|
but in theory, you know, it could happen, it could be a problem for you.
|
||
|
|
So we've installed it, we've decided we want to use it great.
|
||
|
|
Let's launch it.
|
||
|
|
So obviously you go out to a console or a terminal, type in pine or alpine.
|
||
|
|
What I did was I just made an alias in my bash profile and made an alias so that if
|
||
|
|
I do type in pine, which I was used to, then it would just launch alpine anyway.
|
||
|
|
So if you need to find out where alpine is, you can type in which alpine, W-H-I-C-H
|
||
|
|
space alpine, that will tell you, like, where is it is, like, slash user slash bin slash
|
||
|
|
alpine, whatever.
|
||
|
|
So once you're there, you'll see a main menu.
|
||
|
|
This is the main menu you're going to see a lot because it's the first screen you see
|
||
|
|
anytime you launch alpine.
|
||
|
|
And it's got a couple of different options.
|
||
|
|
The first of which we will be going into is setup.
|
||
|
|
So you hit S as in setup, and then you hit C as in config.
|
||
|
|
This is a ridiculously long config file.
|
||
|
|
This thing, the main menu base, it's very easy to navigate, but it's just really, really
|
||
|
|
long.
|
||
|
|
It has every option you could possibly want.
|
||
|
|
Now that is bonus reason number four that you might want to use pine or alpine.
|
||
|
|
You might want to look at this program because if you at all have the occasion or the need
|
||
|
|
with a desire to modify a lot of the headers that go out on an email, I think you might
|
||
|
|
find it fairly difficult to do that on a lot of the GUI apps.
|
||
|
|
But on pine, you've got a lot of control over what exactly is displayed in the header
|
||
|
|
files of the email.
|
||
|
|
Obviously, that's not going to include things like originating IP address and what IP
|
||
|
|
addresses it goes through along the path.
|
||
|
|
But if you need to modify a lot of the little minute details that some people will look
|
||
|
|
in the header files for, pine gives you access to all that kind of stuff.
|
||
|
|
So the first field there is personal name.
|
||
|
|
That's the field that is going to be visible in a person's inbox.
|
||
|
|
Like when it says from Clat 2, or from Clat 2 last name, whatever, but whatever you want
|
||
|
|
to say there, that's what you're going to put in personal name.
|
||
|
|
User domain.
|
||
|
|
I know you're thinking, well, so the domain is one thing, and my personal name is another
|
||
|
|
thing.
|
||
|
|
Where's the rest of it?
|
||
|
|
Like, where's the user name?
|
||
|
|
You know, where's the thing that my email provider has as my login name?
|
||
|
|
Well, that's going to be in a different menu, and it's a little bit of a setup in this
|
||
|
|
different menu that you have to do like a reply to option, and we'll do that in a little
|
||
|
|
while.
|
||
|
|
So basically, the user domain is going to be whoever your provider is, whether it's
|
||
|
|
like Gmail.com, for instance, or like if you're at a company, let's say I work at Hacker
|
||
|
|
Public Radio, right?
|
||
|
|
Maybe they have an IMAP server setup.
|
||
|
|
So it would be personal name, Clat 2, user domain, HackerPublicRadio.org, SMTP server.
|
||
|
|
Again, I'm going to just say that this is an IMAP setup because that's more complicated
|
||
|
|
than pop.
|
||
|
|
If this is pop, you probably, I mean, if you've ever set up an email client before you
|
||
|
|
just do the same thing, it's really, really simple.
|
||
|
|
SMTP-server, let's just say it is relay.hackerpublicradio.com.
|
||
|
|
The inbox path, you can leave that, no, you can't leave that as the default for IMAP.
|
||
|
|
Actually, you have to change that.
|
||
|
|
So what that's going to be, and again, this obviously, this always depends on how the
|
||
|
|
system admin of this company would have it set up, but I'll do an example.
|
||
|
|
So inbox path, you can hit enter, and it'll take you into that field, and you can type
|
||
|
|
in, for instance, curly bracket, let's say mail.hackerpublicradio.org slash user equals.
|
||
|
|
So it's the word user, usr equals, and then your actual user name that you're going to
|
||
|
|
use to sign in to the email account.
|
||
|
|
So if my user name was actually, let's say, not Clat 2, then I would need to put that
|
||
|
|
in there, right?
|
||
|
|
So my personal name that I want people to see, that can be anything I want.
|
||
|
|
It can be Clat 2, it can be hacker, public radio host, it can be anything.
|
||
|
|
But the user name needs to be what you sign in for, like if you were going to go to the
|
||
|
|
web-based interface or something like that, that's going to be your user name.
|
||
|
|
So that's going to be very specific.
|
||
|
|
That's the account that you have with that email provider.
|
||
|
|
So user equals, let's say, not Clat 2, and then slash, now if they're doing SSL and stuff
|
||
|
|
like that, and you don't have the key files that you need for this to all happen very
|
||
|
|
smoothly, you will need to put no validate-sert.
|
||
|
|
And then you can close the curly brackets and then type in inbox, and I did it all on
|
||
|
|
caps and it works.
|
||
|
|
So that is basically telling Pine or Alpine, that your inbox does not exist on your computer,
|
||
|
|
it exists on the server.
|
||
|
|
You've got a lot of different folders that you can set up.
|
||
|
|
You've got incoming archive folders, you've got prune folders, you've got a default
|
||
|
|
FCC, which is file-carbon copy, which is sort of your sent folder basically.
|
||
|
|
So you can do that again, curly bracket, mail.hackupradarorg slash user equals, not Clat 2 slash.
|
||
|
|
And again, if there's SSL stuff going on here, because I don't have the SSL files that
|
||
|
|
I need for it to happen automatically, I had to put slash TLS, that's tango, L's, and
|
||
|
|
L's, and S's and set up slash, no validate-sert, and then close curly bracket and in the
|
||
|
|
word sent.
|
||
|
|
And again, I used to capital S, lowercase ENT, I don't know if it matters, but it certainly
|
||
|
|
works.
|
||
|
|
And you've got saved message folders and things like that.
|
||
|
|
You've got a literal signature file, which is where you can hit return there and you can
|
||
|
|
put some text.
|
||
|
|
There's also, if you opt out of that, you can have a signature file that it will attach
|
||
|
|
to your email as well.
|
||
|
|
So lots of different options here.
|
||
|
|
One of the cool options, I mean, I could obviously go through every single option on here.
|
||
|
|
It would be a lot better if you just kind of scroll through, like I say, this configuration
|
||
|
|
setup is really, really long.
|
||
|
|
But one of the cool options is you can enable an alternate editor.
|
||
|
|
So if you don't want to necessarily just type your emails in the little interface, that
|
||
|
|
Pine provides you, which is kind of, I would say, well, actually, I think it actually is
|
||
|
|
Pico.
|
||
|
|
So if you've ever used Pico, it'll be very familiar to you.
|
||
|
|
Because I think Pico and Pine are made by the same people, or same university or something.
|
||
|
|
But you could enable, you know, VIM or EMAX or something like that.
|
||
|
|
You know, in order for that to happen automatically, you will need to go down to enable dash, alternate
|
||
|
|
dash, editor dash, implicitly, and hit X, and that marks that on.
|
||
|
|
And then you can keep going down the list until you find a field called editor.
|
||
|
|
And then you can tell it how, what editor you want to use when you're down in the actual
|
||
|
|
body of the email.
|
||
|
|
And you can set that.
|
||
|
|
You need to set the full path so you can't just type in VIM or EMAX, you have to do, you
|
||
|
|
know, user slash bin slash slash slash user slash bin slash EMAX or whatever you're going
|
||
|
|
to use.
|
||
|
|
And the point is that you can do all this and it'll be great and you can just go crazy with
|
||
|
|
the options.
|
||
|
|
I would advise not doing anything too crazy at first because you just want to kind of make
|
||
|
|
sure that you get it up and running, you know, so don't start out with a whole bunch
|
||
|
|
of variables so that you don't know if the errors, you, how you set it up, or, you know,
|
||
|
|
if it's just an error because you did some weird option in all these setups.
|
||
|
|
So I would keep it simple first.
|
||
|
|
Once you're finished, you can hit E as an exit.
|
||
|
|
And it should ask you if you want to save your, save your settings.
|
||
|
|
And after you hit E and yes, you save, why for yes, you're back at the main menu.
|
||
|
|
All right, we would almost be ready to go right now.
|
||
|
|
In fact, we are technically speaking.
|
||
|
|
You can hit compose, see for compose, you can compose a message and it will, as long
|
||
|
|
as you've got access to that server that you, that you entered in, you will be asked
|
||
|
|
possibly for your password and then it will send your message.
|
||
|
|
Now I actually advise doing that thing right now because it's helpful to see you.
|
||
|
|
It's really interesting to see where it comes from.
|
||
|
|
So I did that and I sent it to one of my email addresses and looked at the, you know, the
|
||
|
|
reply to and the from and it's basically what it does by default is it takes the user
|
||
|
|
name of just your normal login name.
|
||
|
|
So if you're a Linux login name is John, but you're, you know, the email identity that
|
||
|
|
you have is class two, then suddenly your emails are going out from like John at whatever
|
||
|
|
your computer's name is.
|
||
|
|
So if you've, if you've even bothered setting up your domain and your, yeah, your domain
|
||
|
|
name or your computer for your, your internal network, you know, if you've got like darkstar.com,
|
||
|
|
then your email is going to be showing up as John at, you know, from, from John at darkstar.com.
|
||
|
|
That is probably not correct.
|
||
|
|
So if someone says reply, sends you a message back, chances are they are not going to
|
||
|
|
reach you.
|
||
|
|
What you need to do is go in and set up a rule.
|
||
|
|
And this rule will tell Pine or Alpine to instead of using the system default to substitute
|
||
|
|
the name in for something else.
|
||
|
|
Now the exception here would be if your user name happens to be your real username for
|
||
|
|
your email client, for your email service, and it's the same as your login name and it's
|
||
|
|
the same as the actual address of your email.
|
||
|
|
If you've got, if you just really consistent and you use, you know, the same name for everything,
|
||
|
|
then honestly you might be ready to go.
|
||
|
|
But otherwise, if you haven't set, you know, explicitly the, the place that this is being
|
||
|
|
sent from, then, then it's going to take just the system defaults.
|
||
|
|
And actually, you know, it might not take the domain name of your computer because we
|
||
|
|
set the, the domain name in the setup.
|
||
|
|
So, so actually, just be using your, your Linux, you know, login username point is it's
|
||
|
|
not going to get back to you.
|
||
|
|
So what you need to do is you go to a setup again, so it's s and then you go to rules are
|
||
|
|
and then you go to roles, which is are again.
|
||
|
|
So it's rules and then roles.
|
||
|
|
There will be a blank screen because you don't have any roles setup yet and so that you,
|
||
|
|
you can then say that you want to add a role and that is the a for add.
|
||
|
|
And once again, you're greeted with a really, really long list of, of options, luckily there's
|
||
|
|
only about, I don't know, maybe six or seven fields that we actually have to touch here.
|
||
|
|
The first thing that we should do is give it a nickname, this role, we should give like
|
||
|
|
a name to it.
|
||
|
|
So you can say, okay, the nickname is going to be, you know, reply to and then you can
|
||
|
|
also give it a comment.
|
||
|
|
So go down to comment, which is the next line and hit return and then it'll get you a screen
|
||
|
|
and you can, you can just explain to yourself, you know, why this exists so that if you're
|
||
|
|
sorting through these things later on, you, you have, you have some idea of why it's here,
|
||
|
|
what, what function it's serving.
|
||
|
|
So then what you can do is the current folder type, I think by default email will be selected,
|
||
|
|
which you could do, but basically I think it's just easier to hit to mark any because
|
||
|
|
any that way, if you, if you happen to be doing, you know, using pine for news groups or
|
||
|
|
something like that, then when you send something to a news group, it'll, it'll also give
|
||
|
|
your correct, you know, contact information.
|
||
|
|
So I put any.
|
||
|
|
The next option really isn't until it's pretty far down, let me find it, it's initialized
|
||
|
|
settings using role and that is, that's not that far down.
|
||
|
|
So you want to initialize settings using role set from, see, you're just setting the
|
||
|
|
from field, and then you can say, okay, so my, my, my name is class who and the actual
|
||
|
|
email is not clatu at hackerpublicradio.org.
|
||
|
|
You can set the reply to, I found that this was not necessary by default from what I can
|
||
|
|
tell everything when you hit reply, it, it, it, it replies to the from.
|
||
|
|
So I didn't really bother setting that, but if you're finding, you know, if something
|
||
|
|
goes wrong, that, that would be somewhere to start.
|
||
|
|
Now the uses of this rule, rule, are next, and that's, it's not very far down at all.
|
||
|
|
It's like one, one section down.
|
||
|
|
It says reply using, you want to just have it reply using that without confirmation.
|
||
|
|
You want to use the forwarding without confirmation, and you want to compose without confirmation.
|
||
|
|
So this is a rule that is just always going to happen.
|
||
|
|
This is your, this is basically a, practically a system preference at this point for your,
|
||
|
|
for your user environment.
|
||
|
|
Once you're finished setting all that up, you hit E again for exit setup.
|
||
|
|
It should again confirm that you want to save it and everything you do, and then you
|
||
|
|
can exit the setup menu and you're back in the main menu.
|
||
|
|
So it's E and then E again, and now you're back in the main menu, and you will see that
|
||
|
|
you've got, like I say, you've got an address book, and you've got C to compose an email.
|
||
|
|
You also have I for your message index.
|
||
|
|
Now I for message index will just take you to a listing of inbox, sent mail, saved
|
||
|
|
messages, things like that.
|
||
|
|
So that's just, you know, your normal tree of folders that you would expect.
|
||
|
|
You can go into any of those, and they should show you everything on the IMAP server.
|
||
|
|
Pretty much as simple as that.
|
||
|
|
The options are down at the bottom, like I say, if you've ever used Pico, you're going
|
||
|
|
to find Pine really pretty familiar.
|
||
|
|
It's got the same little style to it, you know, the options down at the bottom, just really
|
||
|
|
easy to understand.
|
||
|
|
And as you can tell from this tutorial already, I think it's really easy to set up.
|
||
|
|
It's just, it's a question of going to configuration menus and looking through the options that
|
||
|
|
you know with matter from your experience of setting up an email client in the past.
|
||
|
|
Now the address book is pretty nice.
|
||
|
|
You can just go down to that if you want, or hit A for address book.
|
||
|
|
And this is a list of people and their email addresses and stuff like that.
|
||
|
|
You can put that in the only way I really know how to do it is by hand.
|
||
|
|
There might be a way to import this from something else, I'm really not sure.
|
||
|
|
I just don't have that many people on the system that I'm using this for that I really
|
||
|
|
need to have an address book.
|
||
|
|
So I did that by hand.
|
||
|
|
But the cool thing about Alpine, like I say, is once you're finished with that, let me
|
||
|
|
exit my address book.
|
||
|
|
And once you're done with that, you can hit C for compose.
|
||
|
|
And you'll see that it prefaces it with a from field, which should be already filled
|
||
|
|
in for you using the rule that you've defined.
|
||
|
|
And then there's the two fields and you put in whatever you want.
|
||
|
|
So we'll put in a test email at, you know, whatever.com.
|
||
|
|
You can see it, you can add an attachment, type in the subject field, subject, and then
|
||
|
|
you go down one and it takes you straight into your editor, and that's pretty nice.
|
||
|
|
And I'm back and I see my message, my signature file or my signature appears at the bottom,
|
||
|
|
just as expected.
|
||
|
|
So now I'm going to send it, right?
|
||
|
|
So it's Ctrl X to send and then it says, are you sure you want to send that?
|
||
|
|
You say yes.
|
||
|
|
And it sends.
|
||
|
|
And it's as simple as that.
|
||
|
|
If you want to cancel, you can do Ctrl C and then C again for confirm.
|
||
|
|
And then it will send that email and it really is that easy.
|
||
|
|
And someone will get it in their inbox.
|
||
|
|
They will see it.
|
||
|
|
They will reply to it.
|
||
|
|
And when you go to message index that is I from the main menu, you will see their email
|
||
|
|
in your big list of emails.
|
||
|
|
And there are little letter codes by each email, you know, telling you if it's a new message
|
||
|
|
or if it's a little bit old, things like that.
|
||
|
|
So that's really it.
|
||
|
|
That's fine.
|
||
|
|
Just to reiterate that the server type was obviously going to matter a lot.
|
||
|
|
And it's going to matter a lot on who is setting this up.
|
||
|
|
And you know, the names of the servers and the user name and things like that.
|
||
|
|
So you might have to do a little bit of investigation to find out, you know, is this mail.example.com
|
||
|
|
or is this is this iMap.example.com or is it something entirely different, you know?
|
||
|
|
So figure that out before you set about this, it's going to be easier to go in with that
|
||
|
|
kind of information.
|
||
|
|
You know, you're not doing anything weird here.
|
||
|
|
You're allowed to ask your IT person, like if you're in a company or something for that
|
||
|
|
information, that's normal stuff for them to tell you.
|
||
|
|
So don't hesitate to ask for that kind of information.
|
||
|
|
And remember to use your real user name, me at work, I have a user name that I used
|
||
|
|
to get into the, you know, like the web interface and things like that.
|
||
|
|
But then I had to have the IT guys set up an alias for me.
|
||
|
|
And I was for a little while while I was setting up my alpine, I was putting in my, you
|
||
|
|
know, the alias name for getting that was not actually my user name and obviously that
|
||
|
|
did not work.
|
||
|
|
So user username, you'll be prompted for a password when you first launch alpine usually.
|
||
|
|
And then from then on, you'll be in and you'll be good to go.
|
||
|
|
So that is how to use alpine and use it with IMAP.
|
||
|
|
Like I say, you can use pop, pop stuff as well.
|
||
|
|
It's just, you know, instead of, instead of filling in IMAP stuff, it's pop.
|
||
|
|
You know, example.com usually and again, you'll have to figure out what your server actually
|
||
|
|
has you doing.
|
||
|
|
It could be anything in theory.
|
||
|
|
But it sits pretty much just like any other email clients all, it's all there in the
|
||
|
|
setup, config menu, type that stuff in, send email, receive email, delete it, store
|
||
|
|
it, live your life digitally online.
|
||
|
|
It's really cool.
|
||
|
|
So have fun with it.
|
||
|
|
And thanks for listening to Hacker Public Radio.
|
||
|
|
This has been Class 2 and it's been my pleasure talking to you about alpine and IMAP.
|
||
|
|
Thank you for listening to Hacker Public Radio.
|
||
|
|
HPR is sponsored by tarot.net so head on over to CARO.nc for all of our community.
|
||
|
|
Thanks for listening to Hacker Public Radio.
|