Monday, February 27, 2023

instalasi / migrasi server email dengan Ubuntu 12.04 LTS, postfix dovecot, squirrelmail

 Set network ke yang bisa internetan.

Setel /etc/apt/sources.list agar bisa update, misal ke alamat old-releases.ubuntu.com. untuk ubuntu 12.04:

deb http://old-releases.ubuntu.com/ubuntu/ precise main restricted multiverse universe

deb http://old-releases.ubuntu.com/ubuntu/ precise-updates main restricted multiverse universe

jalankan satu satu :

apt-get update

apt-get upgrade

apt-get install ssh apache2 php5

apt-get install postfix 

Perhatikan setelan dari /etc/postfix/main.cf terutama untuk (asumsi nama domain adalah bagus.com), dengan network lokalnya 192.168.xxx.xxx:

mydomain = bagus.com

myhostname = mail.bagus.com

myorigin = bagus.com

alias_maps = hash:/etc/aliases

alias_database = hash:/etc/aliases

mydestination = localhost, bagus.com

mynetworks = 127.0.0.0/8, 192.168.0.0/16

smtpd_sasl_exceptions_networks = $mynetworks

relay_domains = $mydestination

header_checks = regexp:/etc/postfix/header_checks


file /etc/postfix/header_checks contoh isinya:
/^Subject: .*been hacked/ DISCARD 550 User unknown
/^From: .*SureVoIP/ DISCARD 550 User unknown

Lalu jalankan untuk dovecot
apt-get install dovecot-core dovecot-imapd dovecot-pop3d
dil file /etc/dovecot/conf.d/10-auth.conf kalau tidak ingin pakai TLS:
disable_plaintext_auth = no
auth_mechanisms = plain login
di file /etc/dovecot/conf.d/10-master.conf, hilangkan # di contohnya IMAPS:
inet_listener imaps {
    #port = 993
    #ssl = yes
  }


di file /etc/dovecot/conf.d/10-mail.conf boleh pakai:

mail_location = mbox:~/mail:INBOX=/var/mail/%u


Jalankan perintah 

squirrelmail-configure

Terutama untuk bagian server, pilih model dovecot untuk IMAP servernya. Lalu jalankan:

cp /etc/squirrelmail/apache.conf /etc/apache2/sites-available/squirrelmail.conf

a2ensite squirrelmail.conf

service apache2 reload

Jalankan squirrelmail lewat http://alamatnya/squirrelmail

Kalau misal migrasi, bisa copykan isi /etc/passwd dan /etc/shadow ke komputer yang baru, tapi editnya pakai vi . 

Karena user baru nggak ada home, maka setel:

chmod 777 /home

chmod 777 /var/mail


kalau untuk forward port dari luar bisa pakai /etc/iptables.rules

# Generated by iptables-save v1.3.3 on Fri Nov 15 13:32:49 2013

*nat

:PREROUTING ACCEPT [428:47001]

:POSTROUTING ACCEPT [5:559]

:OUTPUT ACCEPT [5:559]

-A PREROUTING -i eth1 -p tcp -m tcp --dport 1110 -j REDIRECT --to-ports 110

-A PREROUTING -i eth1 -p tcp -m tcp --dport 3310 -j REDIRECT --to-ports 110

-A PREROUTING -i eth1:1 -p tcp -m tcp --dport 1110 -j REDIRECT --to-ports 110

-A PREROUTING -i eth1:1 -p tcp -m tcp --dport 3110 -j REDIRECT --to-ports 110

-A INPUT -s 80.94.95.204 -j DROP

-A INPUT -s 176.111.173.25 -j DROP

COMMIT

# Completed on Fri Nov 15 13:32:49 2013



Sumber:
https://www.alibabacloud.com/blog/how-to-setup-email-server-with-postfix%2C-dovecot%2C-directmail-and-squirrelmail-on-ubuntu-16-04-alibaba-ecs_594092


Thursday, February 23, 2023

Install applikasi yang bisa membuat Windows 10 lebih enteng, winutil / win debloater

Jalankan perintah berikut di powershellnya windows di mode administrator

iwr -useb https://christitus.com/win | iex

Atau:

irm christitus.com/win | iex

Kalau gagal di atas:

[Net.ServicePointManager]::SecurityProtocol=[Net.SecurityProtocolType]::Tls12;iex(New-Object Net.WebClient).DownloadString('https://raw.githubusercontent.com/ChrisTitusTech/winutil/main/winutil.ps1')


Kalau misal ada error

Set-ExecutionPolicy Unrestricted -Scope Process -Force

Saturday, September 17, 2022

cara defrag paksa SSD, fragmentasi terlalu parah bisa membuat windows errror

 Ada info di

https://www.hanselman.com/blog/the-real-and-complete-story-does-windows-defragment-your-ssd

Bahwa fragmentasi harddisk harus dibatasi untuk mencegah error:

Actually Scott and Vadim are both wrong. Storage Optimizer will defrag an SSD once a month if volume snapshots are enabled. This is by design and necessary due to slow volsnap copy on write performance on fragmented SSD volumes. It’s also somewhat of a misconception that fragmentation is not a problem on SSDs. If an SSD gets too fragmented you can hit maximum file fragmentation (when the metadata can’t represent any more file fragments) which will result in errors when you try to write/extend a file. Furthermore, more file fragments means more metadata to process while reading/writing a file, which can lead to slower performance.

As far as Retrim is concerned, this command should run on the schedule specified in the dfrgui UI. Retrim is necessary because of the way TRIM is processed in the file systems. Due to the varying performance of hardware responding to TRIM, TRIM is processed asynchronously by the file system. When a file is deleted or space is otherwise freed, the file system queues the trim request to be processed. To limit the peek resource usage this queue may only grow to a maximum number of trim requests. If the queue is of max size, incoming TRIM requests may be dropped. This is okay because we will periodically come through and do a Retrim with Storage Optimizer. The Retrim is done at a granularity that should avoid hitting the maximum TRIM request queue size where TRIMs are dropped.



Disebut windows secara otomatis akan mencegah ini bila volume shadow copy atau system restore aktif. Sayangnya banyak program defrag sekarang yang menolak defrag SSD. Solusinya adalah pakai program defrag lama yang belum support SSD.


Cara lain adalah dengan menggunakan smart defrag, dan setelah dijalankan pertama, edit file berikut:

C:\Users\Dani\AppData\Roaming\IObit\DriveDetection.ini


rubah angka deteksi drivenya jadi 1. Contoh:

[DriveType]

C=1

D=1


Thursday, September 15, 2022

Cara install font ttf di ubuntu

 copy file ttf di direktori:
/usr/local/share/fonts

atau
/usr/share/fonts

jalankan:

fc-cache -f -v


cek dengan
fc-list | grep "<name-of-font>"


Monday, August 29, 2022

Cara skip harus masukkan akun microsoft saat masuk pertama windows 11

 tekan Shift+F10 untuk mengeluarkan command prompt d layar berikut:


akan keluar berikut ini, jalankan perintah "netsh interface show interface" untuk tahu nama interface yang konek internet. matikan dengan perintah disable sesuai contoh dengan nama sesuai ditunjukkan.



setelah itu back, akan langsung bisa pakai akun lokal.

video lengkapnya di:


untuk bypass kebutuhan konek internet:
  1. At the “Lets connect you to a network” step, press Shift + F10 on your keyboard,
  2. At the Command prompt window that opens, type taskmgr press Enter on your keyboard,
  3. Expand Task Manager to More details,
  4. Find ‘Network Connection Flow‘,
  5. Select it, then right click and choose End task,
  6. Now go back to the Setup and continue to add a local account.

Tuesday, July 19, 2022

Problem install driver sound card realtek error code -0001, solusi

 Problem terjadi bisa karena audio dikenali sebagai microsoft HD Audio. Software bisa diinstal bia microsoft hd audio di uninstall dulu. Harus dibuat bagaimana caranya agar microsoft hd audio menjadi realtek hd audio.

Wednesday, April 20, 2022

Windows 7 terlalu lama waiting saat welcome setelah login di jaringan

Penyebabnya adalah komputer tidak bisa mendapatkan group policy. 

Banyak yang coba coba tapi gagal:
https://social.technet.microsoft.com/Forums/ie/en-US/ee7cb4e4-7d14-4f1c-86a6-c93463acd9d3/group-policy-failure-on-windows-7-computer?forum=winserverGP


Cara yang terbukti efektif adalah dengan mematikan service untuk group policy. Bisa lewat registry.

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\gpsvc]

Merubah "Start" menjadi "4". harus dirubah permissionnya dan di take ownership dulu sebelum merubah.


Namun ini berarti policy yang diterapkan di jaringan tidak akan diterapkan di komputer yang dirubah.


Saran lain adalah membuat waktu menunggu menjadi 5 detik dengan memberi nilai lima pada:

Computer Configuration/Administrative Templates/System/Group Policy/Startup policy processing wait time


diakses dari policy editor, lewat menjalankan gpedit.msc. Namun cara ini tidak berhasil membuat start lebih cepat.