Ubuntu postfix webmail

A great combination!

To set up Postfix and a webmail interface on Ubuntu, you'll need to follow these steps:

Step 1: Install Postfix

  1. Open a terminal on your Ubuntu machine.
  2. Update the package list: sudo apt update
  3. Install Postfix: sudo apt install postfix

Step 2: Configure Postfix

  1. Edit the Postfix configuration file: sudo nano /etc/postfix/main.cf

  2. Add the following lines to the end of the file:

    mydestination = localhost
    myhostname = yourdomain.com
    myorigin = $myhostname

    Replace yourdomain.com with your actual domain name.

  3. Save and close the file.

Step 3: Create a Postfix user and password

  1. Create a new user: sudo useradd -m -s /bin/false webmail
  2. Set a password for the user: sudo passwd webmail

Step 4: Install a webmail interface

You can choose from several webmail interfaces, such as:

For this example, we'll use Roundcube.

Step 5: Configure Roundcube

  1. Edit the Roundcube configuration file: sudo nano /etc/roundcube/main.inc.php
  2. Update the $config array to include the following settings:
    $config['default_host'] = 'localhost';
    $config['smtp_server'] = 'localhost';
    $config['smtp_port'] = 25;
  3. Save and close the file.

Step 6: Restart Postfix and Roundcube

  1. Restart Postfix: sudo service postfix restart
  2. Restart Roundcube: sudo service roundcube restart

Step 7: Access your webmail interface

  1. Open a web browser and navigate to http://yourdomain.com/roundcube (replace yourdomain.com with your actual domain name).
  2. Log in with the username and password you created earlier.

That's it! You should now have a working Postfix and Roundcube setup on your Ubuntu machine.

Remember to replace yourdomain.com with your actual domain name throughout the process.