Skip to content

Instantly share code, notes, and snippets.

💭
Working on https://github.com/dlangille/thin_to_thick

Dan Langille dlangille

View GitHub Profile
@dlangille
dlangille / Steps
Last active Apr 12, 2019
Moving from private IMAP to third party IMAP
View Steps
* Convert from maildrop to seive: https://www.mail-archive.com/dovecot@dovecot.org/msg40469.html
* Configure MX: https://www.fastmail.com/help/receive/domains-setup-mxonly.html
* imapsync
* deltest account let it keep forwarding to mailjail.langille.org
If I do the imapsync, will I lose the Fastmail mail?
View gist:ec0b4c35f63d41bf148d67cb411df218
Encryption + Installing FreeBSD
When we want to install FreeBSD we can encrypt the disks here. Our standard OS install is on two hard drives in
the back of the server or attached to the motherboard.
The image above is from the Internet does not have our standard setup options so let's change the options.
Our standard setup is the following settings:
T Pool Type - mirror 2 disk
@dlangille
dlangille / 1 - update works
Last active Apr 10, 2019
iocage Version 1.2 RC
View 1 - update works
[dan@x8dtu:~] $ sudo iocage restart mailjail2-x8dtu.langille.org
* Stopping mailjail2-x8dtu_langille_org
+ Executing prestop OK
+ Stopping services OK
+ Removing devfs_ruleset: 14 OK
+ Removing jail process OK
+ Executing poststop OK
* Ruleset 14 does not exist, using defaults
* Starting mailjail2-x8dtu_langille_org
+ Started OK
View gist:08a1ef69d3f1bf2472af7ae163a0580f
[dan@supernews:~] $ telnet avacs1.vrt.sourcefire.com 25
Trying 2620:28:c000:a2::209...
Connected to avacs1.vrt.sourcefire.com.
Escape character is '^]'.
220-mail.vrt.sourcefire.com ESMTP Postfix
220 mail.vrt.sourcefire.com ESMTP Postfix
^C^[[A^]
telnet> quit
Connection closed.
[dan@supernews:~] $ telnet -4 avacs1.vrt.sourcefire.com 25
View 405.pkg-base-audit
[dan@slocum:~] $ sudo /usr/local/etc/periodic/security/405.pkg-base-audit
Checking for security vulnerabilities in base (userland & kernel):
Host system:
Database fetched: Sun Mar 17 14:29:28 UTC 2019
0 problem(s) in the installed packages found.
0 problem(s) in the installed packages found.
jail: test_nginx01
vulnxml file up-to-date
@dlangille
dlangille / 1 - the filesystem
Last active Mar 21, 2019
FreshPorts working directory ZFS tunables
View 1 - the filesystem
The sync=disabled is more appropriate for the repo dataset mentioned below.
I usually have atime off on all ZFS datasets.
sudo zfs create -o sync=disabled -o atime=off -o recordsize=32K tank_fast/freshports
sudo zfs create tank_fast/freshports/dev
sudo zfs create tank_fast/freshports/test
sudo zfs create tank_fast/freshports/stage
What goes in there? The following outline what sits in /var/db/freshports of a given dev/test/stage environment.
View details
$ sudo ls -l /var/spool/postfix/defer/B/B251C2BDE /var/spool/postfix/corrupt/B251C2BDE
-rwx------ 1 postfix wheel 2140 Sep 22 2017 /var/spool/postfix/corrupt/B251C2BDE
-rw------- 1 postfix postfix 309 Sep 22 2017 /var/spool/postfix/defer/B/B251C2BDE
[dan@zuul:~] $ sudo rm /var/spool/postfix/defer/B/B251C2BDE /var/spool/postfix/corrupt/B251C2BDE
View new
[dan@slocum:~] $ zfs get all system/iocage/jails/fileserver/root
NAME PROPERTY VALUE SOURCE
system/iocage/jails/fileserver/root type filesystem -
system/iocage/jails/fileserver/root creation Thu Mar 14 2:04 2019 -
system/iocage/jails/fileserver/root used 208G -
system/iocage/jails/fileserver/root available 13.1T -
system/iocage/jails/fileserver/root referenced 208G -
system/iocage/jails/fileserver/root compressratio 1.04x -
system/iocage/jails/fileserver/root mounted yes -
system/iocage/jails/fileserver/root quota none default
View gist:9b8fa8e2c85d55cf9eaa3254ad89bbd6
[dan@r710-01:/usr/local/poudriere/ports/default/dvl/FreshPorts-Scripts] $ grep cache pkg-plist
libexec/freshports/cache-refresh.sh
@dir(www,freshports,755) %%FP_DATADIR%%/cache
@dir(www,freshports,775) %%FP_DATADIR%%/cache/daily
@dir(www,freshports,775) %%FP_DATADIR%%/cache/general
@dir(freshports,freshports,755) %%FP_DATADIR%%/cache/html
@dir(www,freshports,775) %%FP_DATADIR%%/cache/news
@dir(www,freshports,755) %%FP_DATADIR%%/cache/pages
@dir(www,freshports,755) %%FP_DATADIR%%/cache/ports
@dir(www,freshports,775) %%FP_DATADIR%%/cache/spooling
@dlangille
dlangille / the SQL
Last active Mar 18, 2019
PGCon 2019 list of talks
View the SQL
pentabarf_pgcon=# SELECT DISTINCT E.title, string_agg(S.name,', ') as name
FROM event E, view_event_person P, view_mail_all_speaker S
WHERE E.event_id = P.event_id
AND P.person_id = S.person_id
AND E.conference_id = 15
and E.event_state = 'accepted'
and P.event_role_name = 'Speaker' and P.event_role_state_name = 'confirmed'
group by E.title order by 1;
title | name
---------------------------------------------------------------------------------------------+-----------------------------------
You can’t perform that action at this time.