Disable systemd-resolved
systemctl disable --now systemd-resolved.service
root@server-email:~# systemctl disable --now systemd-resolved.service Removed /etc/systemd/system/multi-user.target.wants/systemd-resolved.service. Removed /etc/systemd/system/dbus-org.freedesktop.resolve1.service. root@server-email:~#
Ganti alamat dns sementara ke dns publik
root@svr01:~# cat /etc/resolv.conf # This is /run/systemd/resolve/stub-resolv.conf managed by man:systemd-resolved(8). # Do not edit. # # This file might be symlinked as /etc/resolv.conf. If you're looking at # /etc/resolv.conf and seeing this text, you have followed the symlink. # # This is a dynamic resolv.conf file for connecting local clients to the # internal DNS stub resolver of systemd-resolved. This file lists all # configured search domains. # # Run "resolvectl status" to see details about the uplink DNS servers # currently in use. # # Third party programs should typically not access this file directly, but only # through the symlink at /etc/resolv.conf. To manage man:resolv.conf(5) in a # different way, replace this symlink by a static file or a different symlink. # # See man:systemd-resolved.service(8) for details about the supported modes of # operation for /etc/resolv.conf. #nameserver 127.0.0.53 nameserver 1.1.1.1 options edns0 trust-ad search dnstech.co.id root@svr01:~#
Install dnsmasq dan screen
sudo apt install dnsmasq screen nano libnet-ldap-perl dialog libssl-dev
root@server-email:~# apt install dnsmasq screen Reading package lists... Done Building dependency tree Reading state information... Done screen is already the newest version (4.8.0-1ubuntu0.1). screen set to manually installed. Suggested packages: resolvconf The following NEW packages will be installed: dnsmasq 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. Need to get 16.7 kB of archives. After this operation, 76.8 kB of additional disk space will be used. Do you want to continue? [Y/n] Y Get:1 http://id.archive.ubuntu.com/ubuntu focal-updates/universe amd64 dnsmasq all 2.90-0ubuntu0.20.04.1 [16.7 kB] Fetched 16.7 kB in 1s (22.6 kB/s) Selecting previously unselected package dnsmasq. (Reading database ... 135387 files and directories currently installed.) Preparing to unpack .../dnsmasq_2.90-0ubuntu0.20.04.1_all.deb ... Unpacking dnsmasq (2.90-0ubuntu0.20.04.1) ... Setting up dnsmasq (2.90-0ubuntu0.20.04.1) ... Created symlink /etc/systemd/system/multi-user.target.wants/dnsmasq.service → /lib/systemd/system/dnsmasq.service. Processing triggers for systemd (245.4-4ubuntu3.23) ... root@server-email:~#
Membackup konfigurasi dnsmasq
sudo mv /etc/dnsmasq.conf{,-original}
root@server-email:~# mv /etc/dnsmasq.conf{,-original} root@server-email:~#
Melakukan konfigurasi dsnmasq
root@server-email:~# nano /etc/dnsmasq.conf root@server-email:~# root@server-email:~# systemctl enable --now dnsmasq Synchronizing state of dnsmasq.service with SysV service script with /lib/systemd/systemd-sysv-install. Executing: /lib/systemd/systemd-sysv-install enable dnsmasq root@server-email:~# root@server-email:~# systemctl restart dnsmasq root@server-email:~#
Isi dari file /etc/dnsmasq.conf
server=8.8.8.8 mx-host=wachid.web.id,mail.wachid.web.id,10 host-record=wachid.web.id,192.168.10.129 host-record=mail.wachid.web.id,192.168.10.129
Pengujian dns
root@server-email:~# host -t MX wachid.web.id wachid.web.id mail is handled by 10 mail.wachid.web.id. root@server-email:~# root@server-email:~# host -t A mail.wachid.web.id mail.wachid.web.id has address 192.168.10.129 root@server-email:~#
Atur etc host ke alamat dnsmasq
myadmin@mail:~$ cat /etc/resolv.conf # Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8) # DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN # 127.0.0.53 is the systemd-resolved stub resolver. # run "systemd-resolve --status" to see details about the actual nameservers. nameserver 127.0.0.1 search wachid.web.id options edns0 trust-ad myadmin@mail:~$
Download zextrans installer repository
root@server-email:~# wget https://repo.zextras.io/inst_repo_ubuntu.sh --2024-09-13 13:53:09-- https://repo.zextras.io/inst_repo_ubuntu.sh Resolving repo.zextras.io (repo.zextras.io)... 18.244.51.124, 18.244.51.84, 18.244.51.46, ... Connecting to repo.zextras.io (repo.zextras.io)|18.244.51.124|:443... connected. HTTP request sent, awaiting response... 200 OK Length: 965 [text/x-sh] Saving to: 'inst_repo_ubuntu.sh' inst_repo_ubuntu.sh 100%[======================================================================================================>] 965 --.-KB/s in 0s 2024-09-13 13:53:10 (2.84 MB/s) - 'inst_repo_ubuntu.sh' saved [965/965] root@server-email:~# ls -l total 12 -rw-r--r-- 1 root root 965 Mar 18 17:24 inst_repo_ubuntu.sh drwx------ 5 root root 4096 Sep 13 09:41 snap root@server-email:~#
root@server-email:~# chmod +x inst_repo_ubuntu.sh root@server-email:~#
root@server-email:~# wget https://docs.zextras.com/carbonio-ce/html/_downloads/bed211d6fc1b9ca35f15be01eb9aa3fc/install_carbonio_ce_singleserver_ubuntu.sh --2024-09-13 13:49:02-- https://docs.zextras.com/carbonio-ce/html/_downloads/bed211d6fc1b9ca35f15be01eb9aa3fc/install_carbonio_ce_singleserver_ubuntu.sh Resolving docs.zextras.com (docs.zextras.com)... 18.161.111.80, 18.161.111.59, 18.161.111.50, ... Connecting to docs.zextras.com (docs.zextras.com)|18.161.111.80|:443... connected. HTTP request sent, awaiting response... 200 OK Length: 3900 (3.8K) [application/x-sh] Saving to: 'install_carbonio_ce_singleserver_ubuntu.sh' install_carbonio_ce_singleserver_ubuntu.sh 100%[======================================================================================================>] 3.81K --.-KB/s in 0s 2024-09-13 13:49:03 (382 MB/s) - 'install_carbonio_ce_singleserver_ubuntu.sh' saved [3900/3900] root@server-email:~# ls -l total 8 -rw-r--r-- 1 root root 3900 Sep 5 09:37 install_carbonio_ce_singleserver_ubuntu.sh drwx------ 5 root root 4096 Sep 13 09:41 snap root@server-email:~# root@server-email:~# chmod +x install_carbonio_ce_singleserver_ubuntu.sh root@server-email:~#
root@server-email:~# ./install_carbonio_ce_singleserver_ubuntu.sh Carbonio will be installed on mail.dartair.co.id, using dartair.co.id as default domain and 192.168.10.129 as public IP Hit:1 https://repo.zextras.io/release/ubuntu focal InRelease Hit:2 http://id.archive.ubuntu.com/ubuntu focal InRelease Hit:3 http://id.archive.ubuntu.com/ubuntu focal-updates InRelease Hit:4 http://id.archive.ubuntu.com/ubuntu focal-backports InRelease Hit:5 http://id.archive.ubuntu.com/ubuntu focal-security InRelease Reading package lists... Done Building dependency tree Reading state information... Done All packages are up to date. Start Carbonio installation --2024-09-13 13:53:37-- https://www.postgresql.org/media/keys/ACCC4CF8.asc Resolving www.postgresql.org (www.postgresql.org)... 217.196.149.50, 87.238.57.232, 72.32.157.230, ... Connecting to www.postgresql.org (www.postgresql.org)|217.196.149.50|:443... connected. HTTP request sent, awaiting response... 200 OK Length: 4812 (4.7K) [application/octet-stream] Saving to: 'STDOUT' - 100%[======================================================================================================>] 4.70K --.-KB/s in 0s 2024-09-13 13:53:39 (504 MB/s) - written to stdout [4812/4812] Hit:1 https://repo.zextras.io/release/ubuntu focal InRelease Hit:2 http://id.archive.ubuntu.com/ubuntu focal InRelease Hit:3 http://id.archive.ubuntu.com/ubuntu focal-updates InRelease Hit:4 http://id.archive.ubuntu.com/ubuntu focal-backports InRelease Hit:5 http://id.archive.ubuntu.com/ubuntu focal-security InRelease Get:6 https://apt.postgresql.org/pub/repos/apt focal-pgdg InRelease [129 kB] Get:7 https://apt.postgresql.org/pub/repos/apt focal-pgdg/main amd64 Packages [340 kB] Fetched 469 kB in 3s (163 kB/s) Reading package lists... Building dependency tree... Reading state information... All packages are up to date. Reading package lists... ... ... Executing /etc/zextras/pending-setups.d/carbonio-message-dispatcher.sh Insert the cluster credential password: Config entry written: service-defaults/carbonio-message-dispatcher-http Config entry written: service-intentions/carbonio-message-dispatcher-http Config entry written: service-defaults/carbonio-message-dispatcher-xmpp Config entry written: service-intentions/carbonio-message-dispatcher-xmpp Success! Data written to: carbonio-message-dispatcher/api/username Success! Data written to: carbonio-message-dispatcher/api/password Configuration reload triggered ======================================================================================= Carbonio Message Dispatcher correctly set! You must run carbonio-message-dispatcher-migration to check database consistency. Syntax: [PGPASSWORD=password] carbonio-message-dispatcher-migration username [host] [port] ======================================================================================= Setup successful, moving carbonio-message-dispatcher.sh to /etc/zextras/pending-setups.d/done/ -------------------------------------------------------------------------------- There are no pending-setups to run. Exiting! The service-discover password is: gsdgshettwzsfrtfhd You can find it in file /var/lib/service-discover/password. The PostgreSQL passowrd (DB_ADM_PWD) is: etwq5fsdgsdgsgdg Please store it in a safe place, otherwise you will need to reset it! root@server-email:~# root@server-email:~# su - zextras zextras@mail:~$
Membuat password admin
root@server-email:~# su - zextras zextras@mail:~$ zextras@mail:~$ zmprov setpassword [email protected] MyPassWd@Mails# zextras@mail:~$
Halaman admin carbonio
Halaman login client