DNS records for autoconfigure mail clients
_imaps._tcp.rotmanka.eu. IN SRV 0 1 993 bull.rotmanka.pl.
_submission._tcp.rotmanka.eu. IN SRV 0 1 587 bull.rotmanka.pl.
_pop3s._tcp.rotmanka.eu. IN SRV 0 1 995 bull.rotmanka.pl.
_imaps._tcp.rotmanka.eu. IN SRV 0 1 993 bull.rotmanka.pl.
_submission._tcp.rotmanka.eu. IN SRV 0 1 587 bull.rotmanka.pl.
_pop3s._tcp.rotmanka.eu. IN SRV 0 1 995 bull.rotmanka.pl.
chattr +i /etc/resolv.conf
chattr -i /etc/resolv.conf
For RSA 2048
rspamadm dkim_keygen -b 2048 -s rsa -d domain.com -k /var/lib/rspamd/dkim/domain.com/rsa.key > /var/lib/rspamd/dkim/domain.com/rsa.pub
For key ED2551
rspamadm dkim_keygen -t ed25519 -s ed25519 -d domain.com -k /var/lib/rspamd/dkim/domain.com/ed25519.key > /var/lib/rspamd/dkim/domain.com/ed25519.pub
chown _rspamd:_rspamd -R /var/lib/rspamd/dkim/domain.com/
add to /var/lib/bind/domain.com.hosts
rsa._domainkey.domain.com. IN TXT (
"v=DKIM1; k=rsa; "
"p={PASTE_KEY_FROM rsa.pub}"
)
ed25519._domainkey.domain.com. IN TXT (
"v=DKIM1; k=ed25519;"
"p={PASTE_KEY_FROM ed25519.pub}"
)
/etc/rspamd/local.d/dkim_signing.conf
/etc/rspamd/local.d/dkim_signing.conf
domain {
…
domain.com {
selectors [
{
selector = “rsa”;
path = “/var/lib/rspamd/dkim/domain.com/rsa.key”;
},
{
selector = “ed25519”;
path = “/var/lib/rspamd/dkim/domain.com/ed25519.key”;
}
]
}
}
Rebuild .venv
rm -rf .venv
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
Create disk on hypervisor
qemu-img create -f qcow2 -o preallocation=metadata /var/lib/libvirt/images/bull-vmail2.qcow2 320G
Attach disk in console or virt-manager
virsh attach-disk bull /var/lib/libvirt/images/bull-vmail2.qcow2 vde \
--cache writeback \
--discard ignore \
--persistent
Create partition on attached disk
parted /dev/vde --script mklabel gpt
parted /dev/vde --script mkpart primary xfs 0% 100%
Format disk
mkfs.xfs -f -m reflink=0 /dev/vde1
Add entry to /etc/fstab
blkid
/dev/vde1: UUID="75c7522e-f196-442d-bd07-f997bed7d0cc" BLOCK_SIZE="512" TYPE="xfs" PARTLABEL="primary" PARTUUID="9b0f0bfe-1c6f-4d17-ab75-11de67a177da"
UUID=75c7522e-f196-442d-bd07-f997bed7d0cc /tmp/vmail xfs noatime,nodiratime,inode64,logbufs=8,allocsize=1m 0 0
apt install msmtp msmtp-mta
Config file /etc/msmtprc
defaults
auth on
tls on
tls_trust_file /etc/ssl/certs/ca-certificates.crt
logfile /var/log/msmtp.log
account default
host smtp.gmail.com
port 587
from twojemail@gmail.com
user twojemail@gmail.com
password "<secret>"
chmod 600 /etc/msmtprc
Test
echo "Test msmtp" | mail -s "Test" someone@gmail.com
Logs
tail -f /var/log/msmtp.log
→ wymusza przeliczenie quota i zapis do clone.
doveadm quota recalc -u user@example.com
→ uruchom z verbose, aby zobaczyć szczegółowe operacje pluginów.
doveadm -Dv
To dual boot with Windows, it is recommended to configure Windows to use UTC, rather than Linux to use localtime. (Windows by default uses localtime)
It can be done by a simple registry fix: Open regedit and add a DWORD value with hexadecimal value 1 to the registry HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\TimeZoneInformation\RealTimeIsUniversal
You can do this from an Administrator Command Prompt running:
C:\>reg add "HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\TimeZoneInformation" /v RealTimeIsUniversal /d 1 /t REG_DWORD /f
pacman upgrade packages in ArchLinux
sudo pacman -Syu
-S – Synchronizes packages
-y – Refreshes the package database
-u – Upgrades all installed packages
Remove a package (keep dependencies)
sudo pacman -R package_name
Remove a package and unneeded dependencies
sudo pacman -Rns package_name
Remove orphaned packages (unneeded dependencies)
sudo pacman -Rns $(pacman -Qdtq)
Remove a package and ignore dependencies
sudo pacman -Rdd package_name
Remove a package and its cache (free up disk space)
sudo pacman -R package_name && sudo pacman -Sc
For a more aggressive cleanup, remove all cached package files:
sudo pacman -R package_name && sudo pacman -Scc
To install packages from a previously saved list of packages, while not reinstalling previously installed packages that are already up-to-date, run:
pacman -S --needed - < pkglist.txt
To delete a menu entry using efibootmgr
first list the current boot entries with sudo efibootmgr
Identify the boot number of the entry you want to delete, then use the command:
sudo efibootmgr -b XXXX -B
replacing XXXX with the boot number of the entry you wish to remove.
To add a menu entry using efibootmgr, use the following command format:
sudo efibootmgr -c -d /dev/sdX -p NN -L "Label" -l "\EFI\path\to\boot\file.efi"
where /dev/sdX is your disk, NN is the partition number,
“Label” is the name you want for the boot entry,
and \EFI\path\to\boot\file.efi is the path to the EFI executable.