Whitelist Hosts or IP addresses in Postfix.

To prevent a mail server in your own network (e.g. for sending alerts) from being blocked by the mail scanners/filters on your main Postfix mail server it is best to whitelist it Create a new file “rbl_override”. #vi /etc/postfix/rbl_override Add the IP addresses and host names you want to whitelist. 1.2.3.4 OK 1.2.3.5 OK [2a02:c123:1234:5a88::1]…

|

Adding domains to existing Letsencrypt certificate using Certbot.

If you want to add one or more (sub)domains to an existing Letsencrypt certificate, you can use Certbot with the “–cert-name” option to accomplish this. # certbot certonly –cert-name existing-domain.com –webroot -w /var/www/virtual/existing-domain.com/htdocs/ -d existing-domain.com -d www.existing-domain.com -d first-new-domain.com -d www.first-new-domain.com -d second-new-domain.net -d www.second-new-domain.net -d third-new-domain.org -d www.third-new-domain.org Make sure you have added all…

|

Fix “dataset is busy” error when deleting container in LXD.

If you try to delete a LXD container, you may get a “dataset is busy” error message because the dataset the container uses in the ZFS storage pool remains mounted in the namespace used by LXD. In this example, we will simulate this problem by trying to delete a container “alpine”. # lxc delete alpine…

|

Copy files and directories between host and a LXD container?

In this tutorial, we will show you how to use the “push” and “pull” command to easily copy files and directories between a host server and a LXC container and visa versa. In this example, on the host server, we will first create a file “myfile.txt” in the “tmp” directory. # touch /tmp/myfile.txt Now copy…