Use Curl to read your imap emails

You can use the bash command “curl” to read your imap emails like this:

Note: your password will be visible on the command line, so don’t use this on a public server.

So it is actually better to create a file, for instance called secret, then write your password in it, and protect it with:

Then you can use this command instead:

If there is a SSL certificate issue, you can also try (not recommended of course):

You need a newer version of curl, because version before 7.29 have limited imap support.

In order to upgrade curl on a Centos system, you can:

Create a new file /etc/yum.repos.d/city-fan.repo

Then paste the following contents:


You can very finally the version of curl:

See also:

Leave a Reply

Your email address will not be published. Required fields are marked *