Site update
This commit is contained in:
parent
ad69964e08
commit
d0a1fb7228
16 changed files with 935 additions and 12 deletions
public/blog
|
@ -6,11 +6,72 @@
|
|||
<description>Recent content in Blog on Crony Akatsuki's Website</description>
|
||||
<generator>Hugo -- gohugo.io</generator>
|
||||
<language>en-us</language>
|
||||
<lastBuildDate>Fri, 10 Nov 2023 19:27:27 +0100</lastBuildDate>
|
||||
<lastBuildDate>Sun, 07 Jan 2024 12:15:21 +0100</lastBuildDate>
|
||||
|
||||
<atom:link href="https://cronyakatsuki.xyz/blog/index.xml" rel="self" type="application/rss+xml" />
|
||||
|
||||
|
||||
<item>
|
||||
<title>Using Mblaze</title>
|
||||
<link>https://cronyakatsuki.xyz/blog/using-mblaze/</link>
|
||||
<pubDate>07-01-2024</pubDate>
|
||||
|
||||
<guid>https://cronyakatsuki.xyz/blog/using-mblaze/</guid>
|
||||
<description><p>So you followed my last tutorial on setting up mblaze and friend&rsquo;s for you mail management, but now you are left just looking at it not understanding how to use the power you have been given now. So now I&rsquo;m going to teach you some basic usage that you can have with it.</p>
|
||||
<h1 id="helper-functions">Helper function&rsquo;s</h1>
|
||||
<p>I guess you haven&rsquo;t read my other blog on setting up mblaze and friend&rsquo;s if you need me to type them out here again, so go read it now! Here is the <a href="https://cronyakatsuki.xyz/blog/virgin-mutt-user-meet-mblaze/">link</a>.</p>
|
||||
<h1 id="getting-mail-and-reading-it">Getting mail and reading it</h1>
|
||||
<p>Now after you have actually read my last blog and got the two function&rsquo;s and the script installed and made them usefull, we can start getting and reading our mail.</p>
|
||||
<p>First you will choose what mail you wanna manage, or how I call it profile with my script.</p>
|
||||
<p>After choosing it you will now have to choose if you wan&rsquo;t to see all mail available on the server, or you will be just reading the new mail and based on that run either <code>mall</code> or <code>mnew</code>.</p>
|
||||
<p>Now we have a couple way&rsquo;s of listing and reading mail.</p>
|
||||
<p>We can use the command <code>mscan</code> that will show you simple one line summaries of your mail. The mail with <code>.</code> mean their status is undread.</p>
|
||||
<p>To read a single specific message we can use <code>mshow</code>. By default it will use the mail that when using <code>mscan</code> show&rsquo;s &gt; as <strong>currently choosen</strong> mail. To read another mail you can choose the number of the mail from <code>mscan</code> and use mshow like this <code>mshow N</code> ( N being the number of the mail you wan&rsquo;t to read ).</p>
|
||||
<p>Now onto my favourite way of reading mail with mblaze, it&rsquo;s <code>mless</code>. You just run it and it will run a less instance showing all your mail, and have the ability to change between them with keybindings <code>:p</code> and <code>:n</code> with p going to preview and n going to next message.</p>
|
||||
<h1 id="settings-read-status">Settings read status</h1>
|
||||
<p>To flag mail as read we can use the mflag utiity. We do it by choosing what mail we wanna mark as read and running the command <code>mflag -S N</code>, but after that we need to fix our list because the filename changed because of the fact that we changed the flag to read. To fix that we will run <code>mseq -f : | mseq -S</code>.</p>
|
||||
<p>We can easily alias this sequence of command&rsquo;s into a function to streamline this.</p>
|
||||
<div class="highlight"><pre tabindex="0" style="color:#c6d0f5;background-color:#303446;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span><span style="color:#ca9ee6">function</span> mread<span style="color:#99d1db;font-weight:bold">()</span> <span style="color:#99d1db;font-weight:bold">{</span>
|
||||
</span></span><span style="display:flex;"><span> mflag -S <span style="color:#f2d5cf">$1</span>
|
||||
</span></span><span style="display:flex;"><span> mseq -f : | mseq -S
|
||||
</span></span><span style="display:flex;"><span><span style="color:#99d1db;font-weight:bold">}</span>
|
||||
</span></span></code></pre></div><p>You can place this function anywhere in your shell configuration.</p>
|
||||
<h1 id="sending-mail">Sending mail</h1>
|
||||
<p>To write mail with mblaze we use command called <code>mcom</code>. After running it, it will a file in your editor of choice that looks like this:</p>
|
||||
<pre tabindex="0"><code class="language-devbox" data-lang="devbox">To:
|
||||
Cc:
|
||||
Bcc:
|
||||
Subject:
|
||||
From: John Doe &lt;john@doe.com&gt;
|
||||
Message-Id: &lt;random-id&gt;
|
||||
User-Agent: mblaze/...
|
||||
</code></pre><p>In the <code>To:</code> file you write the name of mail you wan&rsquo;t to send to for example <code>Shit Shittington &lt;shit@shittington.com&gt;</code> and subject to name of the subject like regular mail.</p>
|
||||
<p>After that you type the message in the last empty line at the bottom, of course you can make it as long as you wan&rsquo;t to.</p>
|
||||
<p>If you save the message as draft just run <code>mcom -r</code>. To reply to a message use <code>mrep N</code> to reply to a specific message.</p>
|
||||
<h1 id="extending-mless-functionalitty">Extending mless functionalitty</h1>
|
||||
<p>We can extend the functionality of mless a bit by creating a file with custom keybindings that will go ahead and a few more function&rsquo;s to mless.</p>
|
||||
<p>Save this file to <code>~/.mblaze/mlesskey</code></p>
|
||||
<pre tabindex="0"><code class="language-lesskey" data-lang="lesskey">Q quit \1
|
||||
:cq quit \1
|
||||
[ prev-file
|
||||
] next-file
|
||||
{ noaction E1\n
|
||||
} quit $
|
||||
$ quit $
|
||||
S noaction E//scan\n
|
||||
` noaction E\#\n
|
||||
H quit H
|
||||
N quit N
|
||||
R quit R
|
||||
K quit k
|
||||
d quit d
|
||||
\^ quit \^
|
||||
</code></pre><p>This will add keybindings like <code>]</code> and <code>[</code> for previous and next mail and <code>d</code> for setting read status on mail. Rest you can checkout yourself by looking at this part of mless script on github, <a href="https://github.com/leahneukirchen/mblaze/blob/master/mless#L92">link</a>.</p>
|
||||
<h1 id="conclusion">Conclusion</h1>
|
||||
<p>I guess this is it now, hope this help&rsquo;s you on making your own mail be even more amazing.</p>
|
||||
</description>
|
||||
</item>
|
||||
|
||||
<item>
|
||||
<title>Hardening Level Pro: Notify on SSH Login</title>
|
||||
<link>https://cronyakatsuki.xyz/blog/hardening-level-pro-notify-on-ssh-login/</link>
|
||||
|
@ -184,7 +245,7 @@ Scan-Format: %c%u%r %-3n %10d %17f %t %2i%s
|
|||
<div class="highlight"><pre tabindex="0" style="color:#c6d0f5;background-color:#303446;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span><span style="color:#737994;font-style:italic"># mblaze functions</span>
|
||||
</span></span><span style="display:flex;"><span>
|
||||
</span></span><span style="display:flex;"><span><span style="color:#737994;font-style:italic"># Get new mail for current profile</span>
|
||||
</span></span><span style="display:flex;"><span>mnew <span style="color:#99d1db;font-weight:bold">()</span> <span style="color:#99d1db;font-weight:bold">{</span>
|
||||
</span></span><span style="display:flex;"><span><span style="color:#ca9ee6">function</span> mnew <span style="color:#99d1db;font-weight:bold">()</span> <span style="color:#99d1db;font-weight:bold">{</span>
|
||||
</span></span><span style="display:flex;"><span> <span style="color:#f2d5cf">maildir</span><span style="color:#99d1db;font-weight:bold">=</span><span style="color:#ca9ee6">$(</span>grep <span style="color:#a6d189">&#34;^Maildir:&#34;</span> <span style="color:#f2d5cf">$HOME</span>/.mblaze/profile | cut -d: -f <span style="color:#ef9f76">2</span> | sed <span style="color:#a6d189">&#39;s/ //g&#39;</span><span style="color:#ca9ee6">)</span>
|
||||
</span></span><span style="display:flex;"><span> <span style="color:#f2d5cf">profile</span><span style="color:#99d1db;font-weight:bold">=</span><span style="color:#ca9ee6">$(</span>basename <span style="color:#f2d5cf">$maildir</span><span style="color:#ca9ee6">)</span>
|
||||
</span></span><span style="display:flex;"><span> <span style="color:#ca9ee6">if</span> <span style="color:#99d1db;font-weight:bold">[</span> <span style="color:#a6d189">&#34;</span><span style="color:#f2d5cf">$profile</span><span style="color:#a6d189">&#34;</span> <span style="color:#99d1db;font-weight:bold">=</span> <span style="color:#a6d189">&#34;local&#34;</span> <span style="color:#99d1db;font-weight:bold">]</span>; <span style="color:#ca9ee6">then</span>
|
||||
|
@ -192,11 +253,12 @@ Scan-Format: %c%u%r %-3n %10d %17f %t %2i%s
|
|||
</span></span><span style="display:flex;"><span> <span style="color:#ca9ee6">else</span>
|
||||
</span></span><span style="display:flex;"><span> mbsync -V <span style="color:#f2d5cf">$profile</span>
|
||||
</span></span><span style="display:flex;"><span> mlist -s <span style="color:#a6d189">&#34;</span><span style="color:#f2d5cf">$maildir</span><span style="color:#a6d189">&#34;</span>/INBOX | msort -dr | mseq -S
|
||||
</span></span><span style="display:flex;"><span> minc <span style="color:#a6d189">&#34;</span><span style="color:#f2d5cf">$maildir</span><span style="color:#a6d189">/INBOX&#34;</span> &gt; /dev/null
|
||||
</span></span><span style="display:flex;"><span> <span style="color:#ca9ee6">fi</span>
|
||||
</span></span><span style="display:flex;"><span><span style="color:#99d1db;font-weight:bold">}</span>
|
||||
</span></span><span style="display:flex;"><span>
|
||||
</span></span><span style="display:flex;"><span><span style="color:#737994;font-style:italic"># Get full mail for current profile including threads</span>
|
||||
</span></span><span style="display:flex;"><span>mall <span style="color:#99d1db;font-weight:bold">()</span> <span style="color:#99d1db;font-weight:bold">{</span>
|
||||
</span></span><span style="display:flex;"><span><span style="color:#ca9ee6">function</span> mall <span style="color:#99d1db;font-weight:bold">()</span> <span style="color:#99d1db;font-weight:bold">{</span>
|
||||
</span></span><span style="display:flex;"><span> <span style="color:#f2d5cf">maildir</span><span style="color:#99d1db;font-weight:bold">=</span><span style="color:#ca9ee6">$(</span>grep <span style="color:#a6d189">&#34;^Maildir:&#34;</span> <span style="color:#f2d5cf">$HOME</span>/.mblaze/profile | cut -d: -f <span style="color:#ef9f76">2</span> | sed <span style="color:#a6d189">&#39;s/ //g&#39;</span><span style="color:#ca9ee6">)</span>
|
||||
</span></span><span style="display:flex;"><span> <span style="color:#f2d5cf">sent</span><span style="color:#99d1db;font-weight:bold">=</span><span style="color:#ca9ee6">$(</span>grep <span style="color:#a6d189">&#34;^Outbox:&#34;</span> <span style="color:#f2d5cf">$HOME</span>/.mblaze/profile | cut -d: -f <span style="color:#ef9f76">2</span> | sed <span style="color:#a6d189">&#39;s/ //g&#39;</span><span style="color:#ca9ee6">)</span>
|
||||
</span></span><span style="display:flex;"><span> <span style="color:#f2d5cf">profile</span><span style="color:#99d1db;font-weight:bold">=</span><span style="color:#ca9ee6">$(</span>basename <span style="color:#f2d5cf">$maildir</span><span style="color:#ca9ee6">)</span>
|
||||
|
@ -205,6 +267,7 @@ Scan-Format: %c%u%r %-3n %10d %17f %t %2i%s
|
|||
</span></span><span style="display:flex;"><span> <span style="color:#ca9ee6">else</span>
|
||||
</span></span><span style="display:flex;"><span> mbsync -V <span style="color:#f2d5cf">$profile</span>
|
||||
</span></span><span style="display:flex;"><span> mlist <span style="color:#a6d189">&#34;</span><span style="color:#f2d5cf">$maildir</span><span style="color:#a6d189">&#34;</span>/INBOX | mthread -r -S <span style="color:#a6d189">&#34;</span><span style="color:#f2d5cf">$sent</span><span style="color:#a6d189">&#34;</span> | mseq -S
|
||||
</span></span><span style="display:flex;"><span> minc <span style="color:#a6d189">&#34;</span><span style="color:#f2d5cf">$maildir</span><span style="color:#a6d189">/INBOX&#34;</span> &gt; /dev/null
|
||||
</span></span><span style="display:flex;"><span> <span style="color:#ca9ee6">fi</span>
|
||||
</span></span><span style="display:flex;"><span><span style="color:#99d1db;font-weight:bold">}</span>
|
||||
</span></span></code></pre></div><p>For the rest of usage of mblaze, I really recommend to use <code>man mblaze</code> since the software is really well documented, or you can also watch this <a href="https://piped.cronyakatsuki.xyz/watch?v=5YS8RPC4zwc">video</a> I took the inspiration from for this setup.</p>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue