hongy19’s blog

opensmtpd


 Installation

  • pacman -S opensmtpd, opensmtpd-filter-dkimsign

Basic concept

mailbox

dovecot decide where to store email. it is /var/mail/user for mbox according to mail.local### dkim

dkim use private/public key to sign email. private key used to sign email and public key in DNS record to verify private key.selector is name, you could choose what you want.see smtpd.confregardin how to use opensmtpd-filter-dkimsign to sign dkim. dkimproxy couls also be used but no formal/AUR package in Archlinux.### MAIL FROM and FROM

Read more ⟶

New vultr system


 Archlinux install

  • install pacman-mirrorlist
  • install ntp. systemtcl enable/start ntpd.service
  • set timezone: ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
  • locale: add LANG=en_US.UTF-8 into /etc/locale.gen. command “locale-gen "
  • network configuration
  • ip addr -> enp1s0
  • /etc/systemd/network/20-wired.network
  • systemctl enable/start systemd-networkd
  • add user
  • useradd –create-home –-groups wheel
  • preset all systemctl unit
  • systemctl preset-all (preset unit enable/disable according to /etc/systemd/system-preset)
  • install yay for AUR package

SSH

  • install fail2ban sshguard
  • copy old fail2ban configuration file
  • install openssh
  • update /etc/ssh/sshd_config
  • PasswordAuthentication no
  • AuthenticationMethods publickey
  • copy public key into /home/user/.ssh/authorized_keys

certbox

Nginx

  • install nginx
  • copy old configuration
  • firewall setting with iptables
  • install uwsgi uwsgi-plugin-python
  • copy old configuration
  • use emperor mode and put all *.ini in /etc/uwsgi/vassals
  • sudo systemctl enable uwsgi@emperor.service –now
  • for my application
  • pymoney: python-flask-httpauth python-flask python-matplotlib
  • pyblog:  python-google-api-python-client python-iso8601

Dovecot

  • install dovecot
  • copy old configuration file
  • firewall setting with iptables
  • certification need to be ready with certbot

opensmtpd

  • install s-nail, mutt
  • install opensmtpd
  • install opensmtpd-filter-dkimsign
  • see linklink1link2
  • dkimproxy doesn’t exist in Archlinux anymore, port 10027 doesn’t work link
  • copy old configuration
  • firewall setting with iptables
  • certification need to be ready with certbot
  • port 25 is blocked by default on vultr to avoid spam and need ticket to open it. See link for “Network error on destination MXs” error

Archlinuxcn

  • add archlinuxcn in pacman.conf, see link
  • install archlinuxcn-keyring, otherwise you will see “signature from “xxx xxx@build.archlinuxcn.org” is unknown trust “, see link.
Read more ⟶

2019 Summary


家庭

问题依旧和2018类似。由于平时加班比较多,陪老婆和孩子的时间太少。另外即使周末,和孩子的互动还是不如她妈妈。但今年和妈妈的沟通要比2018年好。

2019年下半年开始中断了记账。这个主要是由于实在没有时间一笔笔的记录。如果能把记账网站做成一个APP,我相信记账的频率会好很多。

工作

2019年主要准备了一系列的system guideline,包括技术,流程和日常工作。希望这些guideline/checklist能对系统长期的工作产生积极影响。另外今年工作的最大变化是PDU radio reorg,这个会对2020的工作产生巨大的影响。

希望自己能静下心来,好好想想过去几年的工作得失和应该努力的方向。

学习和读书

2019年通过微信读书看了不少关于历史,数学,物理,生物的书籍。希望自己以后能多看一些关于大脑科学,数学(特别是数理逻辑),经济和物理的书籍。

还是没有读完Peace and War。

Haskell

这一年在Haskell上基本没有做太多的事情。希望2020年能多写一些关于Haskell的code

Math

哥德尔艾舍尔巴赫——集异璧之大成已经读完了一大半,希望自己能在2020春节后读完这本书。

Computer

Category theory for programmer还是没有读完。对于lamba Calculus 的研究还是没有开始。

2019年通过Opensmtpd的升级和spam事件,对smtp协议有了更深的了解。

2019年删除了百度, 163的账号,现在只剩下QQ的账号还没有删除。

Read more ⟶