Servei de Correu

1. Instal·lació d’Apache2

Primer de tot, he instal·lat el servidor web Apache2, que ens servirà per allotjar la interfície web del client de correu.

root@ubuntu-mate:/home/isard/Desktop# sudo apt-get install apache2 -y
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following packages were automatically installed and are no longer required:
  gir1.2-snapd-2 libllvm17t64 linux-headers-6.8.0-36 linux-headers-6.8.0-36-generic linux-image-6.8.0-36-generic linux-modules-6.8.0-36-generic linux-modules-extra-6.8.0-36-generic linux-tools-6.8.0-36 linux-tools-6.8.0-36-generic
  python3-netifaces
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
  apache2-bin apache2-data apache2-utils libapr1t64 libaprutil1-dbd-sqlite3 libaprutil1-ldap libaprutil1t64
Suggested packages:
  apache2-doc apache2-suexec-pristine | apache2-suexec-custom
The following NEW packages will be installed:
  apache2 apache2-bin apache2-data apache2-utils libapr1t64 libaprutil1-dbd-sqlite3 libaprutil1-ldap libaprutil1t64
0 upgraded, 8 newly installed, 0 to remove and 4 not upgraded.
Need to get 1.900 kB of archives.
After this operation, 7.455 kB of additional disk space will be used.
Get:1 http://de.archive.ubuntu.com/ubuntu noble-updates/main amd64 libapr1t64 amd64 1.7.2-3.1ubuntu0.1 [108 kB]
Get:2 http://de.archive.ubuntu.com/ubuntu noble/main amd64 libaprutil1t64 amd64 1.6.3-1.1ubuntu7 [91,9 kB]
Get:3 http://de.archive.ubuntu.com/ubuntu noble/main amd64 libaprutil1-dbd-sqlite3 amd64 1.6.3-1.1ubuntu7 [11,2 kB]
Get:4 http://de.archive.ubuntu.com/ubuntu noble/main amd64 libaprutil1-ldap amd64 1.6.3-1.1ubuntu7 [9.116 B]
Get:5 http://de.archive.ubuntu.com/ubuntu noble-updates/main amd64 apache2-bin amd64 2.4.58-1ubuntu8.6 [1.330 kB]
Get:6 http://de.archive.ubuntu.com/ubuntu noble-updates/main amd64 apache2-data all 2.4.58-1ubuntu8.6 [163 kB]
Get:7 http://de.archive.ubuntu.com/ubuntu noble-updates/main amd64 apache2-utils amd64 2.4.58-1ubuntu8.6 [97,2 kB]
Get:8 http://de.archive.ubuntu.com/ubuntu noble-updates/main amd64 apache2 amd64 2.4.58-1ubuntu8.6 [90,2 kB]
Fetched 1.900 kB in 0s (7.848 kB/s)     
Selecting previously unselected package libapr1t64:amd64.
(Reading database ... 333832 files and directories currently installed.)
Preparing to unpack .../0-libapr1t64_1.7.2-3.1ubuntu0.1_amd64.deb ...
Unpacking libapr1t64:amd64 (1.7.2-3.1ubuntu0.1) ...
Selecting previously unselected package libaprutil1t64:amd64.
Preparing to unpack .../1-libaprutil1t64_1.6.3-1.1ubuntu7_amd64.deb ...
Unpacking libaprutil1t64:amd64 (1.6.3-1.1ubuntu7) ...
Selecting previously unselected package libaprutil1-dbd-sqlite3:amd64.
Preparing to unpack .../2-libaprutil1-dbd-sqlite3_1.6.3-1.1ubuntu7_amd64.deb ...
Unpacking libaprutil1-dbd-sqlite3:amd64 (1.6.3-1.1ubuntu7) ...
Selecting previously unselected package libaprutil1-ldap:amd64.
Preparing to unpack .../3-libaprutil1-ldap_1.6.3-1.1ubuntu7_amd64.deb ...
Unpacking libaprutil1-ldap:amd64 (1.6.3-1.1ubuntu7) ...
Selecting previously unselected package apache2-bin.
Preparing to unpack .../4-apache2-bin_2.4.58-1ubuntu8.6_amd64.deb ...
Unpacking apache2-bin (2.4.58-1ubuntu8.6) ...
Selecting previously unselected package apache2-data.
Preparing to unpack .../5-apache2-data_2.4.58-1ubuntu8.6_all.deb ...
Unpacking apache2-data (2.4.58-1ubuntu8.6) ...
Selecting previously unselected package apache2-utils.
Preparing to unpack .../6-apache2-utils_2.4.58-1ubuntu8.6_amd64.deb ...
Unpacking apache2-utils (2.4.58-1ubuntu8.6) ...
Selecting previously unselected package apache2.
Preparing to unpack .../7-apache2_2.4.58-1ubuntu8.6_amd64.deb ...
Unpacking apache2 (2.4.58-1ubuntu8.6) ...
Setting up libapr1t64:amd64 (1.7.2-3.1ubuntu0.1) ...
Setting up apache2-data (2.4.58-1ubuntu8.6) ...
Setting up libaprutil1t64:amd64 (1.6.3-1.1ubuntu7) ...
Setting up libaprutil1-ldap:amd64 (1.6.3-1.1ubuntu7) ...
Setting up libaprutil1-dbd-sqlite3:amd64 (1.6.3-1.1ubuntu7) ...
Setting up apache2-utils (2.4.58-1ubuntu8.6) ...
Setting up apache2-bin (2.4.58-1ubuntu8.6) ...
Setting up apache2 (2.4.58-1ubuntu8.6) ...
Enabling module mpm_event.
Enabling module authz_core.
Enabling module authz_host.
Enabling module authn_core.
Enabling module auth_basic.
Enabling module access_compat.
Enabling module authn_file.
Enabling module authz_user.
Enabling module alias.
Enabling module dir.
Enabling module autoindex.
Enabling module env.
Enabling module mime.
Enabling module negotiation.
Enabling module setenvif.
Enabling module filter.
Enabling module deflate.
Enabling module status.
Enabling module reqtimeout.
Enabling conf charset.
Enabling conf localized-error-pages.
Enabling conf other-vhosts-access-log.
Enabling conf security.
Enabling conf serve-cgi-bin.
Enabling site 000-default.
Created symlink /etc/systemd/system/multi-user.target.wants/apache2.service → /usr/lib/systemd/system/apache2.service.
Created symlink /etc/systemd/system/multi-user.target.wants/apache-htcacheclean.service → /usr/lib/systemd/system/apache-htcacheclean.service.
Processing triggers for ufw (0.36.2-6) ...
Processing triggers for man-db (2.12.0-4build2) ...
Processing triggers for libc-bin (2.39-0ubuntu8.4) ...

2. Instal·lació de PHP 7.4

Perquè el sistema funcioni correctament amb SquirrelMail, he instal·lat PHP 7.4. Per fer-ho, he afegit el repositori necessari i he instal·lat la versió corresponent amb les extensions que calen.

root@ubuntu-mate:/home/isard/Desktop# sudo apt install software-properties-common
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
software-properties-common is already the newest version (0.99.49.2).
software-properties-common set to manually installed.
The following packages were automatically installed and are no longer required:
  gir1.2-snapd-2 libllvm17t64 linux-headers-6.8.0-36 linux-headers-6.8.0-36-generic linux-image-6.8.0-36-generic linux-modules-6.8.0-36-generic linux-modules-extra-6.8.0-36-generic linux-tools-6.8.0-36 linux-tools-6.8.0-36-generic
  python3-netifaces
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 4 not upgraded.
root@ubuntu-mate:/home/isard/Desktop# sudo add-apt-reporsitory ppa:ondrej/php
sudo: add-apt-reporsitory: command not found
root@ubuntu-mate:/home/isard/Desktop# sudo add-apt-repository ppa:ondrej/php
PPA publishes dbgsym, you may need to include 'main/debug' component
Repository: 'Types: deb
URIs: https://ppa.launchpadcontent.net/ondrej/php/ubuntu/
Suites: noble
Components: main
'
Description:
Co-installable PHP versions: PHP 5.6, PHP 7.x, PHP 8.x and most requested extensions are included. Packages are provided for Current Ubuntu LTS releases (https://wiki.ubuntu.com/Releases).  Expanded Security Maintenance releases ARE NOT supported.

Debian stable, oldstable and Debian LTS packages are provided from a separate repository: https://deb.sury.org/#debian-dpa

You can get more information about the packages at https://deb.sury.org

BUGS&FEATURES: This PPA has a issue tracker:
https://deb.sury.org/#bug-reporting

Issues reported in a private email don't scale and most likely will be ignored.  I simply don't have capacity to answer questions privately.

CAVEATS:
1. If you are using apache2, you are advised to add ppa:ondrej/apache2
2. If you are using nginx, you are advised to add ppa:ondrej/nginx

DONATION: If you like my work and you want to show appreciation, please consider donating regularly: https://donate.sury.org/

COMMERCIAL SUPPORT: Support for PHP packages for older Debian and Ubuntu release can be bought from https://www.freexian.com/lts/php/

WARNING: add-apt-repository is broken with non-UTF-8 locales, see
https://github.com/oerdnj/deb.sury.org/issues/56 for workaround:

# LC_ALL=C.UTF-8 add-apt-repository ppa:ondrej/php
More info: https://launchpad.net/~ondrej/+archive/ubuntu/php
Adding repository.
Press [ENTER] to continue or Ctrl-c to cancel.
Hit:1 http://de.archive.ubuntu.com/ubuntu noble InRelease
Hit:2 http://de.archive.ubuntu.com/ubuntu noble-updates InRelease              
Hit:3 http://de.archive.ubuntu.com/ubuntu noble-backports InRelease                                  
Get:4 https://ppa.launchpadcontent.net/ondrej/php/ubuntu noble InRelease [24,3 kB]                   
Hit:5 http://security.ubuntu.com/ubuntu noble-security InRelease          
Get:6 https://ppa.launchpadcontent.net/ondrej/php/ubuntu noble/main amd64 Packages [130 kB]
Get:7 https://ppa.launchpadcontent.net/ondrej/php/ubuntu noble/main Translation-en [40,7 kB]
Fetched 195 kB in 1s (339 kB/s)     
Reading package lists... Done

PHP 7.4

root@ubuntu-mate:/home/isard/Desktop# sudo apt install php7.4 libapache2-mod-php7.4 php-mysql
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following packages were automatically installed and are no longer required:
  gir1.2-snapd-2 libllvm17t64 linux-headers-6.8.0-36 linux-headers-6.8.0-36-generic linux-image-6.8.0-36-generic linux-modules-6.8.0-36-generic linux-modules-extra-6.8.0-36-generic linux-tools-6.8.0-36 linux-tools-6.8.0-36-generic
  python3-netifaces
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
  php-common php7.4-cli php7.4-common php7.4-json php7.4-opcache php7.4-readline php8.4-common php8.4-mysql
Suggested packages:
  php-pear
The following NEW packages will be installed:
  libapache2-mod-php7.4 php-common php-mysql php7.4 php7.4-cli php7.4-common php7.4-json php7.4-opcache php7.4-readline php8.4-common php8.4-mysql
0 upgraded, 11 newly installed, 0 to remove and 5 not upgraded.
Need to get 5.016 kB of archives.
After this operation, 28,4 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 https://ppa.launchpadcontent.net/ondrej/php/ubuntu noble/main amd64 php-common all 2:96+ubuntu24.04.1+deb.sury.org+1 [13,3 kB]
Get:2 https://ppa.launchpadcontent.net/ondrej/php/ubuntu noble/main amd64 php7.4-common amd64 1:7.4.33-20+ubuntu24.04.1+deb.sury.org+1 [687 kB]
Get:3 https://ppa.launchpadcontent.net/ondrej/php/ubuntu noble/main amd64 php7.4-json amd64 1:7.4.33-20+ubuntu24.04.1+deb.sury.org+1 [20,6 kB]
Get:4 https://ppa.launchpadcontent.net/ondrej/php/ubuntu noble/main amd64 php7.4-opcache amd64 1:7.4.33-20+ubuntu24.04.1+deb.sury.org+1 [219 kB]
Get:5 https://ppa.launchpadcontent.net/ondrej/php/ubuntu noble/main amd64 php7.4-readline amd64 1:7.4.33-20+ubuntu24.04.1+deb.sury.org+1 [13,3 kB]
Get:6 https://ppa.launchpadcontent.net/ondrej/php/ubuntu noble/main amd64 php7.4-cli amd64 1:7.4.33-20+ubuntu24.04.1+deb.sury.org+1 [1.569 kB]
Get:7 https://ppa.launchpadcontent.net/ondrej/php/ubuntu noble/main amd64 libapache2-mod-php7.4 amd64 1:7.4.33-20+ubuntu24.04.1+deb.sury.org+1 [1.511 kB]
Get:8 https://ppa.launchpadcontent.net/ondrej/php/ubuntu noble/main amd64 php8.4-common amd64 8.4.7-1+ubuntu24.04.1+deb.sury.org+1 [799 kB]
Get:9 https://ppa.launchpadcontent.net/ondrej/php/ubuntu noble/main amd64 php8.4-mysql amd64 8.4.7-1+ubuntu24.04.1+deb.sury.org+1 [129 kB]
Get:10 https://ppa.launchpadcontent.net/ondrej/php/ubuntu noble/main amd64 php-mysql all 2:8.4+96+ubuntu24.04.1+deb.sury.org+1 [4.002 B]
Get:11 https://ppa.launchpadcontent.net/ondrej/php/ubuntu noble/main amd64 php7.4 all 1:7.4.33-20+ubuntu24.04.1+deb.sury.org+1 [50,9 kB]
Fetched 5.016 kB in 1s (6.109 kB/s)    
Selecting previously unselected package php-common.
(Reading database ... 334538 files and directories currently installed.)
Preparing to unpack .../00-php-common_2%3a96+ubuntu24.04.1+deb.sury.org+1_all.deb ...
Unpacking php-common (2:96+ubuntu24.04.1+deb.sury.org+1) ...
Selecting previously unselected package php7.4-common.
Preparing to unpack .../01-php7.4-common_1%3a7.4.33-20+ubuntu24.04.1+deb.sury.org+1_amd64.deb ...
Unpacking php7.4-common (1:7.4.33-20+ubuntu24.04.1+deb.sury.org+1) ...
Selecting previously unselected package php7.4-json.
Preparing to unpack .../02-php7.4-json_1%3a7.4.33-20+ubuntu24.04.1+deb.sury.org+1_amd64.deb ...
Unpacking php7.4-json (1:7.4.33-20+ubuntu24.04.1+deb.sury.org+1) ...
Selecting previously unselected package php7.4-opcache.
Preparing to unpack .../03-php7.4-opcache_1%3a7.4.33-20+ubuntu24.04.1+deb.sury.org+1_amd64.deb ...
Unpacking php7.4-opcache (1:7.4.33-20+ubuntu24.04.1+deb.sury.org+1) ...
Selecting previously unselected package php7.4-readline.
Preparing to unpack .../04-php7.4-readline_1%3a7.4.33-20+ubuntu24.04.1+deb.sury.org+1_amd64.deb ...
Unpacking php7.4-readline (1:7.4.33-20+ubuntu24.04.1+deb.sury.org+1) ...
Selecting previously unselected package php7.4-cli.
Preparing to unpack .../05-php7.4-cli_1%3a7.4.33-20+ubuntu24.04.1+deb.sury.org+1_amd64.deb ...
Unpacking php7.4-cli (1:7.4.33-20+ubuntu24.04.1+deb.sury.org+1) ...
Selecting previously unselected package libapache2-mod-php7.4.
Preparing to unpack .../06-libapache2-mod-php7.4_1%3a7.4.33-20+ubuntu24.04.1+deb.sury.org+1_amd64.deb ...
Unpacking libapache2-mod-php7.4 (1:7.4.33-20+ubuntu24.04.1+deb.sury.org+1) ...
Selecting previously unselected package php8.4-common.
Preparing to unpack .../07-php8.4-common_8.4.7-1+ubuntu24.04.1+deb.sury.org+1_amd64.deb ...
Unpacking php8.4-common (8.4.7-1+ubuntu24.04.1+deb.sury.org+1) ...
Selecting previously unselected package php8.4-mysql.
Preparing to unpack .../08-php8.4-mysql_8.4.7-1+ubuntu24.04.1+deb.sury.org+1_amd64.deb ...
Unpacking php8.4-mysql (8.4.7-1+ubuntu24.04.1+deb.sury.org+1) ...
Selecting previously unselected package php-mysql.
Preparing to unpack .../09-php-mysql_2%3a8.4+96+ubuntu24.04.1+deb.sury.org+1_all.deb ...
Unpacking php-mysql (2:8.4+96+ubuntu24.04.1+deb.sury.org+1) ...
Selecting previously unselected package php7.4.
Preparing to unpack .../10-php7.4_1%3a7.4.33-20+ubuntu24.04.1+deb.sury.org+1_all.deb ...
Unpacking php7.4 (1:7.4.33-20+ubuntu24.04.1+deb.sury.org+1) ...
Setting up php-common (2:96+ubuntu24.04.1+deb.sury.org+1) ...
Created symlink /etc/systemd/system/timers.target.wants/phpsessionclean.timer → /usr/lib/systemd/system/phpsessionclean.timer.
Setting up php7.4-common (1:7.4.33-20+ubuntu24.04.1+deb.sury.org+1) ...

Creating config file /etc/php/7.4/mods-available/calendar.ini with new version

Creating config file /etc/php/7.4/mods-available/ctype.ini with new version

Creating config file /etc/php/7.4/mods-available/exif.ini with new version

Creating config file /etc/php/7.4/mods-available/fileinfo.ini with new version

Creating config file /etc/php/7.4/mods-available/ffi.ini with new version

Creating config file /etc/php/7.4/mods-available/ftp.ini with new version

Creating config file /etc/php/7.4/mods-available/gettext.ini with new version

Creating config file /etc/php/7.4/mods-available/iconv.ini with new version

Creating config file /etc/php/7.4/mods-available/pdo.ini with new version

Creating config file /etc/php/7.4/mods-available/phar.ini with new version

Creating config file /etc/php/7.4/mods-available/posix.ini with new version

Creating config file /etc/php/7.4/mods-available/shmop.ini with new version

Creating config file /etc/php/7.4/mods-available/sockets.ini with new version

Creating config file /etc/php/7.4/mods-available/sysvmsg.ini with new version

Creating config file /etc/php/7.4/mods-available/sysvsem.ini with new version

Creating config file /etc/php/7.4/mods-available/sysvshm.ini with new version

Creating config file /etc/php/7.4/mods-available/tokenizer.ini with new version
Setting up php8.4-common (8.4.7-1+ubuntu24.04.1+deb.sury.org+1) ...

Creating config file /etc/php/8.4/mods-available/calendar.ini with new version

Creating config file /etc/php/8.4/mods-available/ctype.ini with new version

Creating config file /etc/php/8.4/mods-available/exif.ini with new version

Creating config file /etc/php/8.4/mods-available/fileinfo.ini with new version

Creating config file /etc/php/8.4/mods-available/ffi.ini with new version

Creating config file /etc/php/8.4/mods-available/ftp.ini with new version

Creating config file /etc/php/8.4/mods-available/gettext.ini with new version

Creating config file /etc/php/8.4/mods-available/iconv.ini with new version

Creating config file /etc/php/8.4/mods-available/pdo.ini with new version

Creating config file /etc/php/8.4/mods-available/phar.ini with new version

Creating config file /etc/php/8.4/mods-available/posix.ini with new version

Creating config file /etc/php/8.4/mods-available/shmop.ini with new version

Creating config file /etc/php/8.4/mods-available/sockets.ini with new version

Creating config file /etc/php/8.4/mods-available/sysvmsg.ini with new version

Creating config file /etc/php/8.4/mods-available/sysvsem.ini with new version

Creating config file /etc/php/8.4/mods-available/sysvshm.ini with new version

Creating config file /etc/php/8.4/mods-available/tokenizer.ini with new version
Setting up php7.4-readline (1:7.4.33-20+ubuntu24.04.1+deb.sury.org+1) ...

Creating config file /etc/php/7.4/mods-available/readline.ini with new version
Setting up php7.4-opcache (1:7.4.33-20+ubuntu24.04.1+deb.sury.org+1) ...

Creating config file /etc/php/7.4/mods-available/opcache.ini with new version
Setting up php7.4-json (1:7.4.33-20+ubuntu24.04.1+deb.sury.org+1) ...

Creating config file /etc/php/7.4/mods-available/json.ini with new version
Setting up php8.4-mysql (8.4.7-1+ubuntu24.04.1+deb.sury.org+1) ...

Creating config file /etc/php/8.4/mods-available/mysqlnd.ini with new version

Creating config file /etc/php/8.4/mods-available/mysqli.ini with new version

Creating config file /etc/php/8.4/mods-available/pdo_mysql.ini with new version
Setting up php7.4-cli (1:7.4.33-20+ubuntu24.04.1+deb.sury.org+1) ...
update-alternatives: using /usr/bin/php7.4 to provide /usr/bin/php (php) in auto mode
update-alternatives: using /usr/bin/phar7.4 to provide /usr/bin/phar (phar) in auto mode
update-alternatives: using /usr/bin/phar.phar7.4 to provide /usr/bin/phar.phar (phar.phar) in auto mode

Creating config file /etc/php/7.4/cli/php.ini with new version
Setting up libapache2-mod-php7.4 (1:7.4.33-20+ubuntu24.04.1+deb.sury.org+1) ...

Creating config file /etc/php/7.4/apache2/php.ini with new version
Module mpm_event disabled.
Enabling module mpm_prefork.
apache2_switch_mpm Switch to prefork
apache2_invoke: Enable module php7.4
Setting up php-mysql (2:8.4+96+ubuntu24.04.1+deb.sury.org+1) ...
Setting up php7.4 (1:7.4.33-20+ubuntu24.04.1+deb.sury.org+1) ...
Processing triggers for man-db (2.12.0-4build2) ...
Processing triggers for php7.4-cli (1:7.4.33-20+ubuntu24.04.1+deb.sury.org+1) ...
Processing triggers for libapache2-mod-php7.4 (1:7.4.33-20+ubuntu24.04.1+deb.sury.org+1) ...

La pàgina principalment es veuria així:

3. Instal·lació i configuració de Postfix

Postfix és el servidor encarregat de l’enviament dels correus electrònics.

root@ubuntu-matehomeisardDesktop# sudo apt install postfix
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following packages were automatically installed and are no longer required
  gir1.2-snapd-2 libllvm17t64 linux-headers-6.8.0-36 linux-headers-6.8.0-36-generic linux-image-6.8.0-36-generic linux-modules-6.8.0-36-generic linux-modules-extra-6.8.0-36-generic linux-tools-6.8.0-36 linux-tools-6.8.0-36-generic
  python3-netifaces
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed
  libnsl2
Suggested packages
  postfix-cdb postfix-doc postfix-ldap postfix-lmdb postfix-mta-sts-resolver postfix-mysql postfix-pcre postfix-pgsql postfix-sqlite procmail sasl2-bin  dovecot-common
The following NEW packages will be installed
  libnsl2 postfix
0 upgraded, 2 newly installed, 0 to remove and 5 not upgraded.
Need to get 1.296 kB of archives.
After this operation, 4.321 kB of additional disk space will be used.
Do you want to continue [Yn] y
Get1 httpde.archive.ubuntu.comubuntu noblemain amd64 libnsl2 amd64 1.3.0-3build3 [41,4 kB]
Get2 httpde.archive.ubuntu.comubuntu noblemain amd64 postfix amd64 3.8.6-1build2 [1.254 kB]
Fetched 1.296 kB in 0s (4.502 kBs)
Preconfiguring packages ...
Selecting previously unselected package libnsl2amd64.
(Reading database ... 334749 files and directories currently installed.)
Preparing to unpack ...libnsl2_1.3.0-3build3_amd64.deb ...
Unpacking libnsl2amd64 (1.3.0-3build3) ...
Selecting previously unselected package postfix.
Preparing to unpack ...postfix_3.8.6-1build2_amd64.deb ...
Unpacking postfix (3.8.6-1build2) ...
Setting up libnsl2amd64 (1.3.0-3build3) ...
Setting up postfix (3.8.6-1build2) ...
info Selecting GID from range 100 to 999 ...
info Adding group `postfix' (GID 127) ...
info Selecting UID from range 100 to 999 ...

info Adding system user `postfix' (UID 124) ...
info Adding new user postfix' (UID 124) with group postfix' ...
info Not creating home directory `varspoolpostfix'.
Creating etcpostfixdynamicmaps.cf
info Selecting GID from range 100 to 999 ...
info Adding group `postdrop' (GID 128) ...
setting myhostname ubuntu-mate
setting alias maps
setting alias database
changing etcmailname to tso.localhost
setting myorigin
setting destinations $myhostname, tso.localhost, ubuntu-mate, localhost.localdomain, localhost
setting relayhost 
setting mynetworks 127.0.0.08 [ffff127.0.0.0]104 [1]128
setting mailbox_size_limit 0
setting recipient_delimiter +
setting inet_interfaces all
setting inet_protocols all
etcaliases does not exist, creating it.
WARNING etcaliases exists, but does not have a root alias.

Postfix (main.cf) is now set up with a default configuration.  If you need to 
make changes, edit etcpostfixmain.cf (and others) as needed.  To view 
Postfix configuration values, see postconf(1).

After modifying main.cf, be sure to run 'systemctl reload postfix'.

Running newaliases
Created symlink etcsystemdsystemmulti-user.target.wantspostfix.service → usrlibsystemdsystempostfix.service.
Processing triggers for rsyslog (8.2312.0-3ubuntu9.1) ...
Processing triggers for ufw (0.36.2-6) ...
Processing triggers for man-db (2.12.0-4build2) ...
Processing triggers for libc-bin (2.39-0ubuntu8.4) ...

4. Instal·lació de Dovecot

Dovecot permet que els usuaris puguin rebre i llegir els seus correus. Per instal·lar-lo he executat:

root@ubuntu-mate:/home/isard/Desktop# sudo apt install dovecot-imapd dovecot-pop3d
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following packages were automatically installed and are no longer required:
  gir1.2-snapd-2 libllvm17t64 linux-headers-6.8.0-36 linux-headers-6.8.0-36-generic linux-image-6.8.0-36-generic linux-modules-6.8.0-36-generic linux-modules-extra-6.8.0-36-generic linux-tools-6.8.0-36 linux-tools-6.8.0-36-generic
  python3-netifaces
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
  dovecot-core
Suggested packages:
  dovecot-gssapi dovecot-ldap dovecot-lmtpd dovecot-managesieved dovecot-mysql dovecot-pgsql dovecot-sieve dovecot-solr dovecot-sqlite dovecot-submissiond ntp
The following NEW packages will be installed:
  dovecot-core dovecot-imapd dovecot-pop3d
0 upgraded, 3 newly installed, 0 to remove and 5 not upgraded.
Need to get 3.582 kB of archives.
After this operation, 11,5 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://de.archive.ubuntu.com/ubuntu noble-updates/main amd64 dovecot-core amd64 1:2.3.21+dfsg1-2ubuntu6 [3.354 kB]
Get:2 http://de.archive.ubuntu.com/ubuntu noble-updates/main amd64 dovecot-imapd amd64 1:2.3.21+dfsg1-2ubuntu6 [191 kB]
Get:3 http://de.archive.ubuntu.com/ubuntu noble-updates/main amd64 dovecot-pop3d amd64 1:2.3.21+dfsg1-2ubuntu6 [37,3 kB]
Fetched 3.582 kB in 0s (11,4 MB/s)       
Selecting previously unselected package dovecot-core.
(Reading database ... 334953 files and directories currently installed.)
Preparing to unpack .../dovecot-core_1%3a2.3.21+dfsg1-2ubuntu6_amd64.deb ...
Unpacking dovecot-core (1:2.3.21+dfsg1-2ubuntu6) ...
Selecting previously unselected package dovecot-imapd.
Preparing to unpack .../dovecot-imapd_1%3a2.3.21+dfsg1-2ubuntu6_amd64.deb ...
Unpacking dovecot-imapd (1:2.3.21+dfsg1-2ubuntu6) ...
Selecting previously unselected package dovecot-pop3d.
Preparing to unpack .../dovecot-pop3d_1%3a2.3.21+dfsg1-2ubuntu6_amd64.deb ...
Unpacking dovecot-pop3d (1:2.3.21+dfsg1-2ubuntu6) ...
Setting up dovecot-core (1:2.3.21+dfsg1-2ubuntu6) ...

Creating config file /etc/dovecot/dovecot.conf with new version

Creating config file /etc/dovecot/dovecot-dict-auth.conf.ext with new version

Creating config file /etc/dovecot/dovecot-dict-sql.conf.ext with new version

Creating config file /etc/dovecot/dovecot-sql.conf.ext with new version

Creating config file /etc/dovecot/conf.d/10-auth.conf with new version

Creating config file /etc/dovecot/conf.d/10-director.conf with new version

Creating config file /etc/dovecot/conf.d/10-logging.conf with new version

Creating config file /etc/dovecot/conf.d/10-mail.conf with new version

Creating config file /etc/dovecot/conf.d/10-master.conf with new version

Creating config file /etc/dovecot/conf.d/10-ssl.conf with new version

Creating config file /etc/dovecot/conf.d/10-tcpwrapper.conf with new version

Creating config file /etc/dovecot/conf.d/15-lda.conf with new version

Creating config file /etc/dovecot/conf.d/15-mailboxes.conf with new version

Creating config file /etc/dovecot/conf.d/90-acl.conf with new version

Creating config file /etc/dovecot/conf.d/90-plugin.conf with new version

Creating config file /etc/dovecot/conf.d/90-quota.conf with new version

Creating config file /etc/dovecot/conf.d/auth-checkpassword.conf.ext with new version

Creating config file /etc/dovecot/conf.d/auth-deny.conf.ext with new version

Creating config file /etc/dovecot/conf.d/auth-dict.conf.ext with new version

Creating config file /etc/dovecot/conf.d/auth-master.conf.ext with new version

Creating config file /etc/dovecot/conf.d/auth-passwdfile.conf.ext with new version

Creating config file /etc/dovecot/conf.d/auth-sql.conf.ext with new version

Creating config file /etc/dovecot/conf.d/auth-static.conf.ext with new version

Creating config file /etc/dovecot/conf.d/auth-system.conf.ext with new version
Created symlink /etc/systemd/system/multi-user.target.wants/dovecot.service → /usr/lib/systemd/system/dovecot.service.
dovecot.socket is a disabled or a static unit, not starting it.
Setting up dovecot-imapd (1:2.3.21+dfsg1-2ubuntu6) ...

Creating config file /etc/dovecot/conf.d/20-imap.conf with new version
Setting up dovecot-pop3d (1:2.3.21+dfsg1-2ubuntu6) ...

Creating config file /etc/dovecot/conf.d/20-pop3.conf with new version
Processing triggers for man-db (2.12.0-4build2) ...
Processing triggers for ufw (0.36.2-6) ...
Processing triggers for dovecot-core (1:2.3.21+dfsg1-2ubuntu6) ...

Vaig Configurar el dovecot:

5. Creació d’usuaris i proves de correu

He creat alguns usuaris locals al sistema per fer les proves:

El primer ha sigut gerencia:

root@ubuntu-mate:/var/www/html# sudo adduser gerencia
info: Adding user `gerencia' ...
info: Selecting UID/GID from range 1000 to 59999 ...
info: Adding new group `gerencia' (1001) ...
info: Adding new user gerencia' (1001) with group gerencia (1001)' ...
info: Creating home directory `/home/gerencia' ...
info: Copying files from `/etc/skel' ...
New password: 
BAD PASSWORD: The password contains the user name in some form
Retype new password: 
passwd: password updated successfully
Changing the user information for gerencia
Enter the new value, or press ENTER for the default
    Full Name []: gerencia
    Room Number []: 
    Work Phone []: 
    Home Phone []: 
    Other []: 
Is the information correct? [Y/n] y
info: Adding new user gerencia' to supplemental / extra groups users' ...
info: Adding user gerencia' to group users' ...
root@ubuntu-mate:/var/www/html# sudo usermod -m -d /var/www/html/gerencia gerencia
root@ubuntu-mate:/var/www/html# sudo mkdir -p /var/www/html/gerencia/

El segon ha sigut sistemas:

root@ubuntu-mate:/var/www/html# sudo adduser sistemas
info: Adding user `sistemas' ...
info: Selecting UID/GID from range 1000 to 59999 ...
info: Adding new group `sistemas' (1002) ...
info: Adding new user sistemas' (1002) with group sistemas (1002)' ...
info: Creating home directory `/home/sistemas' ...
info: Copying files from `/etc/skel' ...
New password: 
BAD PASSWORD: The password contains the user name in some form
Retype new password: 
passwd: password updated successfully
Changing the user information for sistemas
Enter the new value, or press ENTER for the default
    Full Name []: sistemas
    Room Number []: 
    Work Phone []: 
    Home Phone []: 
    Other []: 
Is the information correct? [Y/n] y
info: Adding new user sistemas' to supplemental / extra groups users' ...
info: Adding user sistemas' to group users' ...
root@ubuntu-mate:/var/www/html# sudo usermod -m -d /var/www/html/sistemas sistemas
root@ubuntu-mate:/var/www/html# sudo mkdir -p /var/www/html/sitemas

6. Comprovacions finals

Un cop tot el sistema està instal·lat i en funcionament, vaig accedir al client web SquirrelMail mitjançant el navegador:

Allà vaig iniciar sessió amb un dels usuaris que havia creat (sistemas)

Des de SquirrelMail vaig fer el següent:

  • Vaig escriure un correu electrònic nou destinat a un altre usuari del sistema
  • Vaig enviar el missatge

Vaig tancar sessió i vaig entrar com a gerencia

Vaig comprovar que el correu s’havia rebut correctament a la safata d’entrada

Utilitzem cookies pròpies i de tercers per millorar la teva experiència de navegació i per oferir-te continguts personalitzats. Pots obtenir més informació o configurar les teves preferències a través de la nostra Política de Cookies.   
Privacidad