-1

I have a working postfix smtp server on my Ubuntu 20.04 cloud machine. I can send/receive emails using the standard command line "mail" client. I am now looking for a way to do the same via web browser. I already am running nginx on the server.

It seems there are various apps such as RoundCube and SquirrelMail that are available on Ubuntu. However, they seem to require additional pop3/imap server packages to be installed.

As the webmail client is intended to be on the same machine as my smtp server is, I do not see why additional pop3/imap packages need to be installed.

Wondering if there is a simpler way to look at emails via web browser. Regards.

Peter
  • 11,260
  • 14
  • 78
  • 155

1 Answers1

0

You need to install a web server, PHP (or whatever is required to run the webmail app of your choosing), and an IMAP server.

mail is an email client that knows how to directly access your messages on the filesystem, something that a web app has no capability to do. Also note that it is executed from the context of you having already logged in to your server as a particular user.

It's a Very Bad Idea to give your web server read/write access to parts of the filesystem outside the directories where your web-related files are kept (write access can and should be even more strict).

It's technically feasible to create a webmail app that does what you want (I think there may have been some attempts in the distant past), but it would be limited to systems with a very specific mail system setup and require some questionable permission tweaking. IMAP is the layer that abstracts your particular mail system setup from any of the various mail clients you may want to use to access your messages. It also helps make sure users and apps are not able to access things they should not.

Wondering if there is a simpler way to look at emails via web browser

Not that I can think of. Fortunately, this will get you most of the way there:

apt-get install dovecot-imapd

Dovecot will need minimal configuration in your case, and more time will be spent installing and tweaking whatever webmail client you choose (or you can try Thunderbird). And remember that the IMAP server can be limited to local clients (webmail counts as such) and need not be exposed to the Internet.

  • SO is a programming Q&A platform and this question is not about programming. [What topics can I ask about here?](https://stackoverflow.com/help/on-topic) Do not answer off topic questions. [answer] – Rob Feb 23 '22 at 19:51