]> git.xolatile.top Git - emil-xolatile.top.git/commitdiff
blooging
authorEmil Williams <emilemilemil@cock.li>
Tue, 5 Aug 2025 01:26:37 +0000 (01:26 +0000)
committerEmil Williams <emilemilemil@cock.li>
Tue, 5 Aug 2025 01:26:37 +0000 (01:26 +0000)
20250804.html
bloog/bloog.pl
bloog/orig/20250617
bloog/orig/20250804

index 177705c564f5791d0afd0cb4742a7fd4af7c7e3f..d9fdb131d50672ef41c50c00bfedcc7adf24e4d4 100644 (file)
@@ -23,7 +23,84 @@ Perl Is My Abusive GF
 On Abusing Perl To Minimize Work
 </center>
 <p>
-I wanted to simplify the bloog thingy, by centralizing the <a href="/feed.xml">RSS</a> & <a href="/bloog">Index</a>. This is done by a generator written in Perl using <a href="https://template-toolkit.org/docs/index.html">Template</a>.
+I wanted to simplify the bloog thingy, by centralizing the <a href="/feed.xml">RSS</a> & <a href="/bloog">Index</a>. This is done by a generator written in Perl using <a href="https://template-toolkit.org/docs/index.html">Template</a>. I wrote some templates and some itemizing code for those templates, this isn't actually needed and all the template stuff could be merged into one monolithic file but I didn't want to spend the time figuring out how to do hashmaps/arrays in Template again, not the best compromise.
+</p>
+<p>
+Files are read in order they passed to the CLI. This is not ideal and I could sort them, however I decided to just designate this to bash which gives it some scriptability. The issue here is dating, which was relatively simple to deal with in perl considering string comparisons can properly order well formed RFC 5322 dates. The format is simple in that it takes a certain set of lines:
+</p>
+<pre>
+Date, usually same as the filename
+Author
+RSS Plaintext Title
+HTML-Enabled Title
+Description and Headline
+First paragraph .....
+
+Newline Newline, second paragraph.
+
+This continues. BOL #+BEGIN_SRC and BOL #+END_SRC for preformatted text.
+</pre>
+<p>
+As for special cases, like having a &lt;center&gt; you will need to use #+BEGIN_RAW <div> with a #+END_RAW </div>. The End prevents any paragraphing, the beginning doesn't actually do anything past in itself being pruned. note that these are discarded effectively if it doesn't begin with a < after the initial space. God forgive me, I should of used YACC or some shit. This is a complete mess internally with a billion edge cases I've yet to even think about but it works as long as you don't fuck with it. (this is also true for software handling currently-flying-planes, banks and nuclear silos. Or maybe those have yet to run on Javascript?)
+</p>
+<p>
+Sause is at the <a href="https://git.xolatile.top/emil/xolatile.top">Git</a> and in innate deployment <a href="/bloog/bloog.pl">here</a>.
+</p>
+<p>
+I do not like Perl. But it is better than other verymuchso high level languages I've used. Best part is, if I don't <code>use strict</code> it does what I say, like any computer should.
+</p>
+<div style="color: green">
+> NOOOO, YOU CAN'T SHOOT YOURSELF IN THE FOOT
+</div>
+<div style="color: green">
+> NOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO
+</div>
+<p>
+That's all there's to say about Perl and this shitty script.
+<hr>
+</p>
+<p>
+Mail now supports all my domains (<a href="https://xolatile.top">Xolatile.Top</a>, <a href="https://3chen.org">3chen.org</a>), not JUST <a href="https://chud.cyou">chud.cyou</a>. Which was performed by demonic sacrifice and investing my soul in one of Satan's Pain Production Corporations and Suffering Marketing Agencies.
+</p>
+<pre>
+submission_header_checks ->
+
+/^X-Originating-IP:/        IGNORE
+/^X-Mailer:/                IGNORE
+/^Mime-Version:/            IGNORE
+/^Received: .*/ REPLACE Recieved: hidden
+
+main.cf ->
+header_checks = regexp:/etc/postfix/submission_header_checks
+mime_header_checks = regexp:/etc/postfix/submission_header_checks
+</pre>
+<p>
+This provides a very useful censor, preventing certain information from being leaked, such as IP. Perhaps I have some other option that populates things like Recieved instead of dropping it like the prior configuration.
+</p>
+<pre>
+sender_login_maps ->
+@chud.cyou       emil
+etc.
+
+exampleaccount@chud.cyou exampleaccount
+
+main.cf ->
+smtpd_sender_login_maps = hash:/etc/postfix/sender_login_maps
+</pre>
+<p>
+I use the authentication system provided by Dovecot. Postfix then matches that to an account. In the above, emil can log into everything everywhere no matter what. While exampleaccount is cucked into only having that handle.
+</p>
+<pre>
+main.cf ->
+anvil_rate_time_unit = 86400
+smtp_sender_rate_limit = 50
+message_size_limit = 104857600
+</pre>
+<p>
+This limits email size and quantity in 24 hours (though this may not actually be by the period of the day, but rather whenever Postfix is restarted, but I can't tell which.) All of the domains point their mx. domain to mx.chud.cyou as to minimize the need for several certs in one program, which is a rare treat anyhow.
+</p>
+<p>
+I'm leaving out a bunch of shit because I did this all last month but just know that there's way more to it and it's going to explode if you fuck with it. Overall the server is doing decently and still not rapidly degenerating. Give it twenty two seconds.
 </p>
 <br/><center>
 <a href="https://xolatile.top/feed.xml">
index 9ef3c7dac13e50fa819c18bb14cece972a241ceb..e474b71a7f0fa75ba9fc93e012af33242ec5084c 100755 (executable)
@@ -80,9 +80,11 @@ sub html_write {
         } elsif (substreq($short, '#+END_SRC')) {
             $pre = 0;
             $buffer .= "</pre>\n";
-        } elsif (substreq($short, '#+RAW')) {
+        } elsif (substreq($short, '#+BEGIN_RAW')) {
+            $buffer .= substr($line, length('#+BEGIN_RAW '));
+        } elsif (substreq($short, '#+END_RAW')) {
             $rawline = 1;
-            $buffer .= substr($line, length('#+RAW '));
+            $buffer .= substr($line, length('#+END_RAW '));
         } else {
             $buffer .= $line;
         }
index ebf1dafb88e4db15a74be05956f08095cff813a7..aea6ba5ef7d43790c970709ad47447c6347e6c1c 100644 (file)
@@ -95,9 +95,10 @@ location = / {
 
 Ideally the Firewall would be the BSD pf, however I've yet to <a href="https://git.xolatile.top/emil/bake">bake</a> my own kernel with it sprinkled in. IPTables confuses and angers me, and pf is comparitively divine. For now, there is no strict fail2ban configuration or firewall - All I've done is make sure that all bindings are correctly oriented. However I'm not sure if this is sane, and I'm sure it is not fool-proof.
 
-#+RAW <center>
+#+BEGIN_RAW <center>
 The server has yet to explode.
-#+RAW </center>
-#+RAW <center>
+#+END_RAW </center>
+
+#+BEGIN_RAW <center>
 Nothing ever happens.
-#+RAW </center>
+#+END_RAW </center>
index c2b6acce681d4ba1525700bce2ab8f385cea97ca..e5d9c340a33f95ed9e232f6e564a1c89077347cc 100644 (file)
@@ -3,4 +3,88 @@ Emil
 Perl Is My Abusive GF
 Perl Is My Abusive GF
 On Abusing Perl To Minimize Work
-I wanted to simplify the bloog thingy, by centralizing the <a href="/feed.xml">RSS</a> & <a href="/bloog">Index</a>. This is done by a generator written in Perl using <a href="https://template-toolkit.org/docs/index.html">Template</a>.
+I wanted to simplify the bloog thingy, by centralizing the <a href="/feed.xml">RSS</a> & <a href="/bloog">Index</a>. This is done by a generator written in Perl using <a href="https://template-toolkit.org/docs/index.html">Template</a>. I wrote some templates and some itemizing code for those templates, this isn't actually needed and all the template stuff could be merged into one monolithic file but I didn't want to spend the time figuring out how to do hashmaps/arrays in Template again, not the best compromise.
+
+Files are read in order they passed to the CLI. This is not ideal and I could sort them, however I decided to just designate this to bash which gives it some scriptability. The issue here is dating, which was relatively simple to deal with in perl considering string comparisons can properly order well formed RFC 5322 dates. The format is simple in that it takes a certain set of lines:
+
+#+BEGIN_SRC
+Date, usually same as the filename
+Author
+RSS Plaintext Title
+HTML-Enabled Title
+Description and Headline
+First paragraph .....
+
+Newline Newline, second paragraph.
+
+This continues. BOL #+BEGIN_SRC and BOL #+END_SRC for preformatted text.
+#+END_SRC
+
+As for special cases, like having a &lt;center&gt; you will need to use #+BEGIN_RAW <div> with a #+END_RAW </div>. The End prevents any paragraphing, the beginning doesn't actually do anything past in itself being pruned. note that these are discarded effectively if it doesn't begin with a < after the initial space. God forgive me, I should of used YACC or some shit. This is a complete mess internally with a billion edge cases I've yet to even think about but it works as long as you don't fuck with it. (this is also true for software handling currently-flying-planes, banks and nuclear silos. Or maybe those have yet to run on Javascript?)
+
+Sause is at the <a href="https://git.xolatile.top/emil/xolatile.top">Git</a> and in innate deployment <a href="/bloog/bloog.pl">here</a>.
+
+I do not like Perl. But it is better than other verymuchso high level languages I've used. Best part is, if I don't <code>use strict</code> it does what I say, like any computer should.
+
+#+BEGIN_RAW <div style="color: green">
+> NOOOO, YOU CAN'T SHOOT YOURSELF IN THE FOOT
+#+END_RAW </div>
+
+#+BEGIN_RAW <div style="color: green">
+> NOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO
+#+END_RAW </div>
+
+That's all there's to say about Perl and this shitty script.
+<hr>
+
+Mail now supports all my domains (<a href="https://xolatile.top">Xolatile.Top</a>, <a href="https://3chen.org">3chen.org</a>), not JUST <a href="https://chud.cyou">chud.cyou</a>. Which was performed by demonic sacrifice and investing my soul in one of Satan's Pain Production Corporations and Suffering Marketing Agencies.
+
+#+BEGIN_SRC
+submission_header_checks ->
+
+/^X-Originating-IP:/        IGNORE
+/^X-Mailer:/                IGNORE
+/^Mime-Version:/            IGNORE
+/^Received: .*/ REPLACE Recieved: hidden
+
+main.cf ->
+header_checks = regexp:/etc/postfix/submission_header_checks
+mime_header_checks = regexp:/etc/postfix/submission_header_checks
+#+END_SRC
+
+This provides a very useful censor, preventing certain information from being leaked, such as IP. Perhaps I have some other option that populates things like Recieved instead of dropping it like the prior configuration.
+
+#+BEGIN_SRC
+sender_login_maps ->
+@chud.cyou       emil
+etc.
+
+exampleaccount@chud.cyou exampleaccount
+
+main.cf ->
+smtpd_sender_login_maps = hash:/etc/postfix/sender_login_maps
+#+END_SRC
+
+I use the authentication system provided by Dovecot. Postfix then matches that to an account. In the above, emil can log into everything everywhere no matter what. While exampleaccount is cucked into only having that handle. I've thought about setting up an account management page, but I also like torturing people into using extremely long passwords. If you don't use a password manager you deserve pain and suffering.
+
+#+BEGIN_SRC
+main.cf ->
+anvil_rate_time_unit = 86400
+smtp_sender_rate_limit = 50
+message_size_limit = 104857600
+#+END_SRC
+
+This limits email size and quantity in 24 hours (though this may not actually be by the period of the day, but rather whenever Postfix is restarted, but I can't tell which.) All of the domains point their mx. domain to mx.chud.cyou as to minimize the need for several certs in one program, which is a rare treat anyhow.
+
+Some loser on the IRC didn't make backups, lost all of his shit. He was also using Windows, and he caused the fault in his system by fucking with Windows. Make backups. Here's the shitty backup script the server runs:
+
+#+BEGIN_SRC
+#!/bin/sh
+dir=$(date +"%y%m%d")
+mkdir -p $dir
+cp -a ../etc ../home ../opt ../root ../srv ../var $dir/
+apt list --installed > $dir/installed
+echo done.
+#+END_SRC
+
+I'm leaving out a bunch of shit because I did this all last month but just know that there's way more to it and it's going to explode if you fuck with it. Overall the server is doing decently and still not rapidly degenerating. Give it twenty two seconds.