Search code examples
phpmailer

How can i install a mail client in ubuntu?


I have so many problems trying to install some mail clients like Squirrel or postfix ...

I try to install a mail client but i recieve so many fails like cannot conect smtp server or similars and in squirrel only shows a white screen instead the client.

Can someone make a guide to install it please ?


Solution

  • Okay, try this in that order.

    1st u need to install postfix and mailutils in case u need to use them.

    sudo apt install postfix mailutils -y
    

    U should select the option of Internet Site and introduce the address of your mail like mail.com or something like this same on the archive /etc/hosts so u need to put

    sudo nano /etc/hosts
    

    and rename the line of your localhost to the address on the previous step.

    Now u should create the users to exchange the mails.

    sudo adduser user1
    sudo adduser user2
    

    And the last step send and email like...

    su user1
    mail user2
    

    and finish the mail pressing Ctrl+d

    Now u can change the users to verify the mail , just put the line:

    mail
    

    In the case u need graphical instance u can install squirrel like this.

    sudo apt install php libapache2-mod-php
    sudo apt install dovecot-impad dovecot-pop3d
    

    Now, u can go to the web of Squirrelmail and download the version required.

    Then, u can extract the tar.gz

    sudo tar -xf Downloads/squirrel....
    

    U should move it sudo mv squirrelmail.stable/ var/www/html/mail(or the name what u want it)

    U will need change the owner like nobody or www-data

    sudo chown -R www-data:www-data /var/www/html/mail
    

    Now u should go to the archive config-default.php to edit it

    sudo nano /var/www/html/mail/squirrelmail/config/config-default.php 
    

    inside u need to change three lines

    domain to ='mail.com'
    data_dir to = '/var/www/html/mail/squirrelmail/data'
    attach_dir to ='/var/www/html/mail/squirrelmail/attach'
    

    The attach dir isnt create so do this:

    sudo mkdir /var/www/html/mail/squirrelmail/attach
    

    and change the owner

    sudo chown www-data:www-data /var/www/html/mail/squirrelmail/attach
    

    If all its okay and u follow all the steps u can type in Explorers bar something like mail.com/mail/squirrelmail to get a client mail.