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
- Open a terminal on your Ubuntu machine.
- Update the package list:
sudo apt update
- Install Postfix:
sudo apt install postfix
Step 2: Configure Postfix
-
Edit the Postfix configuration file:
sudo nano /etc/postfix/main.cf
-
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. -
Save and close the file.
Step 3: Create a Postfix user and password
- Create a new user:
sudo useradd -m -s /bin/false webmail
- Set a password for the user:
sudo passwd webmail
Step 4: Install a webmail interface
You can choose from several webmail interfaces, such as:
- Roundcube:
sudo apt install roundcube
- SquirrelMail:
sudo apt install squirrelmail
- Horde:
sudo apt install horde
For this example, we'll use Roundcube.
Step 5: Configure Roundcube
- Edit the Roundcube configuration file:
sudo nano /etc/roundcube/main.inc.php
- Update the
$config
array to include the following settings:$config['default_host'] = 'localhost'; $config['smtp_server'] = 'localhost'; $config['smtp_port'] = 25;
- Save and close the file.
Step 6: Restart Postfix and Roundcube
- Restart Postfix:
sudo service postfix restart
- Restart Roundcube:
sudo service roundcube restart
Step 7: Access your webmail interface
- Open a web browser and navigate to
http://yourdomain.com/roundcube
(replaceyourdomain.com
with your actual domain name). - 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.