cronyakatsuki.xyz/public/blog/using-mblaze/index.html
2024-10-30 20:19:32 +01:00

173 lines
10 KiB
HTML
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link href="/css/style.css" rel="stylesheet" />
<script defer data-domain="cronyakatsuki.xyz" src="https://plausible.cronyakatsuki.xyz/js/script.js"></script>
<title>
Using Mblaze - Crony Akatsuki
</title>
<meta property="og:url" content="https://cronyakatsuki.xyz/blog/using-mblaze/">
<meta property="og:site_name" content="Crony Akatsuki&#39;s Website">
<meta property="og:title" content="Using Mblaze">
<meta property="og:description" content="So you followed my last tutorial on setting up mblaze and friends 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 Im going to teach you some basic usage that you can have with it.
Helper functions I guess you havent read my other blog on setting up mblaze and friends if you need me to type them out here again, so go read it now! Here is the link.">
<meta property="og:locale" content="en_us">
<meta property="og:type" content="article">
<meta property="article:section" content="blog">
<meta property="article:published_time" content="2024-01-07T12:15:21+01:00">
<meta property="article:modified_time" content="2024-01-07T12:15:21+01:00">
<meta property="article:tag" content="Linux">
<meta property="article:tag" content="Mblaze">
<meta property="article:tag" content="Mail">
</head>
<body>
<header>
<h1>Crony Akatsuki</h1>
<nav>
<span><a href="/">Home</a></span>
<span>|</span>
<span><a href="/about">About</a></span>
<span>|</span>
<span><a href="/blog">Blog</a></span>
<span>|</span>
<span><a href="/services">Services</a></span>
</nav>
</header>
<main>
<div id="content">
<h1>Using Mblaze</h1>
<div id="blog-meta">
<p id="date">07-01-2024</p>
<p>
<span>|</span>
<a href="https://cronyakatsuki.xyz/tags/linux/">linux</a> <span>|</span>
<a href="https://cronyakatsuki.xyz/tags/mblaze/">mblaze</a> <span>|</span>
<a href="https://cronyakatsuki.xyz/tags/mail/">mail</a></p>
<hr>
</div>
<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>
</div>
</main>
<footer>
<div id="links">
<span><a href="https://code.cronyakatsuki.xyz">Code</a></span>
<span>|</span>
<span><a href="https://steamcommunity.com/id/CronyAkatsuki/">Steam</a></span>
<span>|</span>
<span><a href="https://osu.ppy.sh/users/18953565">Osu!</a></span>
<span>|</span>
<span><a href="https://anilist.co/user/CronyAkatsuki/">Anilist</a></span>
<span>|</span>
<span><a href="https://trakt.tv/users/cronyakatsuki">Trakt.tv</a></span>
<span>|</span>
<span><a href="https://www.last.fm/user/Crony-Akatsuki">Last.fm</a></span>
<span>|</span>
<span><a href="https://youtube.com/channel/UClFdlNlUipHG5Kit8GbFz5Q">Gaming Channel</a></span>
<span>|</span>
<span><a href="https://uptime.cronyakatsuki.xyz/status/public">Services Status</a></span>
<span>|</span>
<span><a href="https://lemmy.cronyakatsuki.xyz/u/crony">Lemmy</a></span>
<span>|</span>
<span><a href="https://sharkey.cronyakatsuki.xyz/u/crony">Sharkey</a></span>
<span>|</span>
<span><a href="https://plausible.cronyakatsuki.xyz/cronyakatsuki.xyz">Selfhosted Plausible Analytics</a></span>
</div>
<div id="banners">
<a rel="noreferrer" href="/" target="_blank"><img src="/88x31.png"
alt="Me" title="Me" /></a>
<a rel="noreferrer" href="https://kernel.org" target="_blank"><img src="https://cyber.dabamos.de/88x31/linux_powered.gif"
alt="linux kernel" title="Best kernel in the world" /></a>
<a rel="noreferrer" href="https://debian.org" target="_blank"><img src="https://cyber.dabamos.de/88x31/debian.gif"
alt="debian" title="This website run's on debian" /></a>
<a rel="noreferrer" href="https://bitwarden.com" target="_blank"><img src="https://cyber.dabamos.de/88x31/bitwarden.gif"
alt="Bitwarden" title="Bitwarden/Vaultwarden for the win" /></a>
<a rel="noreferrer" target="_blank"><img src="https://cyber.dabamos.de/88x31/free.gif"
alt="foss" title="Foss is the way" /></a>
<a rel="noreferrer" href="https://neovim.io" target="_blank"><img src="/assets/badges/neovim.gif"
alt="Neovim" title="Written in neovim" /></a>
<a rel="noreferrer" href="https://landchad.net" target="_blank"><img src="https://landchad.net/pix/landchad.gif"
alt="LandChad" title="Get A Website!" /></a>
<a rel="noreferrer" href="https://poggerer.xyz" target="_blank"><img src="https://poggerer.xyz/88x31.png"
alt="Tulg" title="Tulg" /></a>
<a rel="noreferrer" href="https://arthurmelton.com" target="_blank"><img src="https://arthurmelton.com/88x31.png"
alt="AMTitan" title="AMTitan" /></a>
<a rel="noreferrer" href="https://aadi.net.in" target="_blank"><img src="https://aadi.net.in/88x31.png"
alt="Aadi" title="Aadi" /></a>
<a rel="noreferrer" href="https://bear.oops.wtf/" target="_blank"><img src="https://bear.oops.wtf/download/88x31.png"
alt="Bear" title="Bear" /></a>
</div>
</footer>
</body>
</html>