MediumAxis eMail marketing
Menu
  • Home
  • Email Lists
  • Services
    • Managed Email marketing
    • B2B Lead Generation Services
    • E-mail Marketing for Cryptocurrency and ICO projects
    • Order Email Sends / Validation
  • FAQ
  • About
    • About Us
    • Contact
  • Blog
MediumAxis eMail marketing
Menu   ≡ ╳
  • Home
  • Email Lists
  • Services
    • Managed Email marketing
    • B2B Lead Generation Services
    • E-mail Marketing for Cryptocurrency and ICO projects
    • Order Email Sends / Validation
  • FAQ
  • About
    • About Us
    • Contact
  • Blog

My Account

  • My account
  • Wishlist
  • Shopping Cart
  • Checkout
All Categories

All Categories

  • Email lists
  • Services
  • Other databases

Search

×

Cart

Home>articles>How to Setup a Mail Server with Webmail on Ubuntu/Debian
articles

How to Setup a Mail Server with Webmail on Ubuntu/Debian

Posted by  Alex Tsvetochkin | August 20, 2020
Spread the love

Creating a mail server on Linux powered machines can be one of the most essential things that every system administrator needs to do while configuring his servers for the first time, if you don’t know what it means; it’s simple, if you have a website like “example.com”, you can create an email account like “[email protected]” to use it to send / receive emails easily instead of using services like Hotmail, Gmail, Yahoo Mail, etc.

 

In this article, we’ll learn how to do so by installing the Postfix with “SquirrelMail” webmail application and its dependencies on Debian/Ubuntu machines.

 

Step 1: Installing Apache2 and PHP7

1. In order to create a running mail server using “SquirrelMail”, we’ll have to install both Apache2 & PHP7 packages first, to do so, run.

$ sudo apt-get update -y
$ sudo apt-get upgrade -y
$ sudo apt-get install apache2 php7

 

Step 2: Installing Postfix Mail Server

2. Postfix is a mail transfer agent (MTA) which is the responsible software for delivering & receiving emails, it’s essential in order to create a complete mail server.

To install it on Ubuntu/Debian or even Mint, run:

$ sudo apt-get install postfix

During installation, you will be asked to choose the type of mail configuration, choose “Internet Site”.

 

blank

 

3. Now enter the fully qualified domain name that you want to use for send and receive mails.

 

blank

 

4. Once the FQDN set, you’ve restart the Postfix mail server using.

$ sudo service postfix restart

 

Step 3: Installing Dovecot

5. Dovecot is a mail delivery agent (MDA), it delivers the emails from/to the mail server, to install it, run the following command.

$ sudo apt-get install dovecot-imapd dovecot-pop3d

 

6. Next, restart Dovecot service using the following command.

$ sudo service dovecot restart

 

Step 4: Installing SquirrelMail in Ubuntu

7. SquirrelMail is the email server that you’ll be using to manage emails on your server, it has a simple web interface to do the job, it can be customized by installing more modules & themes.

$ wget https://sourceforge.net/projects/squirrelmail/files/stable/1.4.22/squirrelmail-webmail-1.4.22.zip
$ unzip squirrelmail-webmail-1.4.22.zip
$ sudo mv squirrelmail-webmail-1.4.22 /var/www/html/
$ sudo chown -R www-data:www-data /var/www/html/squirrelmail-webmail-1.4.22/
$ sudo chmod 755 -R /var/www/html/squirrelmail-webmail-1.4.22/
$ sudo mv /var/www/html/squirrelmail-webmail-1.4.22/ /var/www/html/squirrelmail

 

8. After the installation, you will have to run this command in order to configure SquirrelMail.

$ sudo perl /var/www/html/squirrelmail/config/conf.pl

(the command will open a text menu with items to choose from)

 

09. Next, enter “2” in order to edit the server settings, and you will be prompted to it.

 

10. Now enter “1” in order to change the domain name and write up your domain (e.g: example.com).

 

11. Go back to the main menu by writing “R” and hitting the enter key, write “4” in order to configure the general options.

 

You see “Allow server-side sorting”? Enter “11” and change it from “false” to “true” by entering “y”. Now hit the Enter key, and enter the “S” key in order to save the configuration file.

 

12. You can now access the mail server by going to domain.com/squirrelmail.

 

Step 5: Creating Mail Users

13. In order to start using squirrelmail webmail, you’ll have to create a new user, to do so, run.

$ sudo useradd myusername

Replace “myusername” with the user name you want, create a password for the new user by running.

$ sudo passwd myusername

 

14. Create a home folder for the user in /var/www/html/myusername and make it default home directory.

$ sudo mkdir -p /var/www/html/myusername
$ usermod -m -d /var/www/html/myusername myusername

15. Now go back to the login page and enter the user name and the password of newly created user.

 

blank

 

You will be surprise to see the error message. This is just a problem in the permissions, you have to give the user “myusername” the complete permissions on its home folder.

$ sudo chown -R myusername:myusername /var/www/html/myusername

 

16. Once permission set, you should able to login into squirrelmail.

 

blank

 

You can try to send email from it, or you can try to receive emails by sending it to “[email protected]” , don’t forget to replace “myusername” with the user name you created.

 

If you faced any other error.. Just check the “/var/log/mail.err” file, all the error message will be stored there, you won’t lose your way 🙂

 


Spread the love

Related Content:

  • OpenPGP in Thunderbird - HOWTO and FAQ
    OpenPGP in Thunderbird - HOWTO and FAQ
  • Email Marketing Trends Beyond 2020: Experts Share Their Visions
    Email Marketing Trends Beyond 2020: Experts Share Their…
  • A Survival Guide for the Small Mail Server
    A Survival Guide for the Small Mail Server
  • How to Steal Your Competitors' Customers (the legal way)
    How to Steal Your Competitors' Customers (the legal way)
  • Configuring DNS for email: A quick beginner’s guide
    Configuring DNS for email: A quick beginner’s guide
Tags: debian, email server, linux, ubuntu

Share this post

Related posts

blank

Multiple Ways to Improve Email Deliverability

August 22, 2020
blank

How To Set Up Your Own Email Server on Windows in 10 minutes

August 20, 2020
×
blank

Categories

  • articles (45)

Recent Posts

  • How to Generate B2B Leads Through Email Marketing
  • 7 Email Marketing Trends for 2022
  • Blockchain Email Marketing Tools and Strategies
  • Why 75% of Your Marketing Emails Are Never Read
  • Email Marketing Trends & Predictions for 2022 – A Look into What Lies Ahead

Product categories

  • Email lists
  • Other databases
  • Services

Products

  • Wolrd investor contacts 325.000 emails
    Wolrd investor contacts 325.000 emails
    $300.00
  • NFT forums combined email database 49.000 Emails
    NFT forums combined email database 49.000 Emails
    Rated 4 out of 5
    $190.00
  • UK - Crypto Enthusiasts and Crypto Funding contacts (compilation of newly released user records from 2 forums + 1 exchange) 3.995.000 Emails
    UK - Crypto Enthusiasts and Crypto Funding contacts (compilation of newly released user records from 2 forums + 1 exchange) 3.995.000 Emails
    Rated 5 out of 5
    $800.00 $99.00
  • Italy - Customer Email list / products and accessories for small animals (actual data from online business) - 14.600 Emails
    Italy - Customer Email list / products and accessories for small animals (actual data from online business) - 14.600 Emails
    Rated 5 out of 5
    $60.00 $45.00
  • WorldWide - Mega Porno subscribers Email List (xxx) 564.800 Emails
    WorldWide - Mega Porno subscribers Email List (xxx) 564.800 Emails
    Rated 5 out of 5
    $290.00 $99.00
  • India - Stock Market Search / Tools / Predictions Email list (customers from original website) 60.700 Emails
    India - Stock Market Search / Tools / Predictions Email list (customers from original website) 60.700 Emails
    Rated 5 out of 5
    $190.00 $99.00
  • USA / Worldwide - SPA, SPA parts and supplies consumers email list (internal data of spashopper.com) 41.900 Emails
    USA / Worldwide - SPA, SPA parts and supplies consumers email list (internal data of spashopper.com) 41.900 Emails
    Rated 4 out of 5
    $280.00 $89.00
  • Cambodia - Business Directory (Biz nature, company name, phone, email, address, etc) 28.300 records
    Cambodia - Business Directory (Biz nature, company name, phone, email, address, etc) 28.300 records
    Rated 5 out of 5
    $280.00 $94.00
  • Germany - Hanoverian breeding and Verden auctions Email list (hannoveraner.com) 4.000 Emails
    Germany - Hanoverian breeding and Verden auctions Email list (hannoveraner.com) 4.000 Emails
    Rated 5 out of 5
    $90.00
  • Egypt / Arabic - Saint Mark Festival Website members email list (mahraganalkraza.com) 36.000 Emails
    Egypt / Arabic - Saint Mark Festival Website members email list (mahraganalkraza.com) 36.000 Emails
    Rated 5 out of 5
    $135.00 $25.00

blank95% Deliverability Guarantee

If more than 5% of our emails bounce back, we'll provide credits for more data.

blankVERIFIED DATABASE

Our databases were checked for inbox availability and spamtraps.

blankDIRECT BUSINESS AND CUSTOMER CONTACTS

Don't bother contacting generics (such as [email protected]). With our lists, you can email real people.

MediumAxis eMail marketing

Creating strong, provocative relationships between good companies and their customers.

Copyright © 2019-2022 The Omega project
All Rights Reserved.

FAQ   Privacy policy   Terms and conditions

Follow us:

  • icon
  • icon

Payment Methods:

blank

en English
ar العربيةzh-CN 简体中文nl Nederlandsen Englishfr Françaisde Deutschit Italianopt Portuguêsru Русскийes Españolth ไทย