<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<atom:link href="https://dev1galaxy.org/extern.php?action=feed&amp;tid=4393&amp;type=rss" rel="self" type="application/rss+xml" />
		<title><![CDATA[Dev1 Galaxy Forum / [SOLVED] System mail notifications script]]></title>
		<link>https://dev1galaxy.org/viewtopic.php?id=4393</link>
		<description><![CDATA[The most recent posts in [SOLVED] System mail notifications script.]]></description>
		<lastBuildDate>Sat, 03 Jul 2021 01:45:57 +0000</lastBuildDate>
		<generator>FluxBB</generator>
		<item>
			<title><![CDATA[Re: [SOLVED] System mail notifications script]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=30494#p30494</link>
			<description><![CDATA[<p>Hello:</p><div class="quotebox"><cite>ralph.ronnquist wrote:</cite><blockquote><div><p>mmm you omitted the <span class="bbc">-e</span>...</p></div></blockquote></div><p>I was convinced I had tried it with <em>and</em> without that <span class="bbc">-e</span> there, so I checked again.<br />I was/was not mistaken: the catch is that <span class="bbc">xterm</span> will open <strong>only</strong> if there&#039;s unread mail.</p><p>Clicking on the application icon when it shows mailbox flag in the &#039;down&#039; position will not open <span class="bbc">xterm</span>.&#160; </p><p>So ...</p><div class="codebox"><pre><code>coolmail -v -e &quot;xterm -xrm &#039;XTerm.vt100.allowTitleOps: false&#039; -T &#039;System mail notification&#039; -geometry 120x15-300+150 -e mail&quot;</code></pre></div><p>... works as expected.</p><p>I had spent a whole afternoon atempting various combinations, I actually got it to work ...<br />... but not with <span class="bbc">mail</span>.</p><p>I opened up the configuration file <span class="bbc">/etc/X11/app-defaults/Coolmail</span> and edited some of the default settings to be able to simplify the command stanza.</p><div class="codebox"><pre><code>groucho@devuan:~$ cat /etc/X11/app-defaults/Coolmail
! Coolmail Application Defaults
!
coolmail.soundFile: /usr/local/bin/sounds/ding.au
!coolmail.frameCount: 10
!coolmail.inbox: /var/spool/mail/username
coolmail.mailCommand: xterm -geometry 120x15-300+150 -e mutt
coolmail.monochrome: False
coolmail*geometry: 76x84-1875+350
coolmail.volume: 100
groucho@devuan:~$ </code></pre></div><p>With that configuration file I can start up Coolmail in a terminal with <span class="bbc">:~$coolmail -v</span>.<br />The application&#039;s icon shows up as expected and ~30s after I send myself mail from another terminal, the icon changes.</p><p>Clicking on the icon opens up <span class="bbc">xterm</span> with <span class="bbc">mutt</span> and I can process the new mail.<br />Problem is I really don&#039;t like <span class="bbc">mutt</span> and (for the time being), I only need to read my system mail.<br />I won&#039;t be sending mail to anyone, so a terminal with mail is quite enough.</p><p>With your <em>heads up</em>, I edited the configuration file to <span class="bbc">coolmail.mailCommand: xterm -geometry 120x15-300+150 -e mail</span> and now I can say it works.<br />I worked <em>before</em> but I assumed it did not.&#160; </p><p>As expected, I get an <span class="bbc">xterm</span> window, with the <span class="bbc">mail</span> label which will do well enough.&#160; &#160;<br />Thanks for that, it did not occurr to me there could be a different behaviour when clicking on the application&#039;s icon.</p><p>As the system beep set at 100 by <span class="bbc">coolmail.volume</span> is not loud enough and also confusing, I tried using a <span class="bbc">*.wav</span> file but I got a &quot;Problem opening/dev/audio&quot; error.<br />I looked for /dev/audio but it is not there.</p><div class="codebox"><pre><code>groucho@devuan:~$ ls -l /dev/audio
ls: cannot access &#039;/dev/audio&#039;: No such file or directory
groucho@devuan:~$</code></pre></div><p>I then converted the file to <span class="bbc">*.au</span> but got the same result.</p><p>The thing is that this really cool application is quite dated.<br />It was copyrighted back in 1994, so it uses OSS drivers which were dropped from the Linux kernel not too long ago (4.15?).</p><p>So I installed the <span class="bbc">aoss</span> package. <a href="https://alsa.opensrc.org/Aoss" rel="nofollow">https://alsa.opensrc.org/Aoss</a></p><p>With that package installed, starting the application with <span class="bbc">aoss</span> would solve the sound issue.<br />But no ...</p><div class="codebox"><pre><code>groucho@devuan:~$ aoss coolmail -v
Coolmail 1.3 watching file: /var/spool/mail/groucho
Coolmail: Error writing to /dev/audio.
groucho@devuan:~$ </code></pre></div><p>Now, instead of not being able to <em>open</em> <span class="bbc">/dev/audio</span> it cannot <em>write</em> to <span class="bbc">/dev/audio</span>.<br />Thank you for helping me make some headway here.</p><p>The only thing pending is getting some audio output from <span class="bbc">Coolmail</span>. </p><p>Best,</p><p>A.</p><div class="quotebox"><blockquote><div><p>... the authors&#039; idea of clarity is different from mine.</p></div></blockquote></div><p>A <em>quotable</em> quote if there ever was one.</p>]]></description>
			<author><![CDATA[dummy@example.com (Altoid)]]></author>
			<pubDate>Sat, 03 Jul 2021 01:45:57 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=30494#p30494</guid>
		</item>
		<item>
			<title><![CDATA[Re: [SOLVED] System mail notifications script]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=30492#p30492</link>
			<description><![CDATA[<p>mmm you omitted the <span class="bbc">-e</span>... the last part of the line should read</p><div class="codebox"><pre><code>-geometry 120x15-300+150 -e mail&quot;</code></pre></div><p> at least that&#039;s what the <span class="bbc">man xterm</span> page says. I don&#039;t really know what the significant difference is between nominating a shell at the end (without <span class="bbc">-e</span>) and nominating a program via the <span class="bbc">-e</span> option. The man page has some discussion about it, but the authors&#039; idea of clarity is different from mine.</p>]]></description>
			<author><![CDATA[dummy@example.com (ralph.ronnquist)]]></author>
			<pubDate>Fri, 02 Jul 2021 23:41:44 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=30492#p30492</guid>
		</item>
		<item>
			<title><![CDATA[Re: [SOLVED] System mail notifications script]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=30491#p30491</link>
			<description><![CDATA[<p>Hello:</p><div class="quotebox"><cite>ralph.ronnquist wrote:</cite><blockquote><div><p>... add the <span class="bbc">-e mail</span> option for <span class="bbc">xterm</span> as its last argument within the double-quoted string. Then that will be run instead of a command shell.</p></div></blockquote></div><p>If I use this stanza ...</p><div class="codebox"><pre><code>groucho@devuan:~$ coolmail -v -e &quot;xterm -xrm &#039;XTerm.vt100.allowTitleOps: false&#039; -T &#039;System mail notification&#039; -geometry 120x15-300+150 mail&quot;
Coolmail 1.3 watching file: /var/spool/mail/groucho
^C
groucho@devuan:~$ </code></pre></div><p>... clicking on the icon gets me nothing instead of the <span class="bbc">xterm</span> window.</p><p>If I use this stanza ...</p><div class="codebox"><pre><code>groucho@devuan:~$ coolmail -v -e &quot;xterm -xrm &#039;XTerm.vt100.allowTitleOps: false&#039; -T &#039;System mail notification&#039; -geometry 120x15-300+150 /var/alternatives/mail&quot;
Coolmail 1.3 watching file: /var/spool/mail/groucho
xterm: No absolute path found for shell: /var/alternatives/mail
^C
groucho@devuan:~$ </code></pre></div><p>... is the same, save for the output (because of -v).</p><p>I found some more information here:&#160; <a href="http://www.linuxcertif.com/man/1/coolmail/" rel="nofollow">http://www.linuxcertif.com/man/1/coolmail/</a></p><div class="quotebox"><blockquote><div><p>X DEFAULTS<br />This program understands the core resource names and classes as well as:</p><p>frameCount (class FrameCount)<br />&#160; &#160; Specifies the number of frames to be generated per animation.<br />inbox (class Inbox)<br />&#160; &#160; Specifies the mail inbox that coolmail will watch.</p><p>mailCommand (class MailCommand)&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160;|&#160; &lt;---<br />&#160; &#160; Specifies the command that should be launched to read and write mail.&#160; &#160; |&#160; &lt;---</p><p>monochrome (class Monochrome)<br />&#160; &#160; A Boolean value that enables monochrome mode when true.<br />soundFile (class SoundFile)<br />&#160; &#160; Specifies the audio file to use rather than the standard system beep.<br />volume (class Volume)<br />&#160; &#160; Value between 0 and 100 for the volume setting for both the system beep and the sound file.</p></div></blockquote></div><p>As far as I know, the <span class="bbc">mailCommand</span> can be <span class="bbc">Mail</span>, <span class="bbc">mail</span> or <span class="bbc">mailx</span> ie: the ones present in <span class="bbc">/etc/alternatives</span>, but as they are all linked to <span class="bbc">/usr/bin/bsd-mailx</span>, I also tried this:</p><div class="codebox"><pre><code>coolmail -v -e &quot;xterm -xrm &#039;XTerm.vt100.allowTitleOps: false&#039; -T &#039;System mail notification&#039; -geometry 120x15-300+150 /usr/bin/bsd-mailx&quot;</code></pre></div><p>No cigar ... 8^|</p><p>Thanks for your input.</p><p>Best,</p><p>A.</p>]]></description>
			<author><![CDATA[dummy@example.com (Altoid)]]></author>
			<pubDate>Fri, 02 Jul 2021 14:26:40 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=30491#p30491</guid>
		</item>
		<item>
			<title><![CDATA[Re: [SOLVED] System mail notifications script]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=30490#p30490</link>
			<description><![CDATA[<p>yes; add the <span class="bbc">-e mail</span> option for <span class="bbc">xterm</span> as its last argument within the double-quoted string. Then that will be run instead of a command shell.</p>]]></description>
			<author><![CDATA[dummy@example.com (ralph.ronnquist)]]></author>
			<pubDate>Fri, 02 Jul 2021 13:27:14 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=30490#p30490</guid>
		</item>
		<item>
			<title><![CDATA[Re: [SOLVED] System mail notifications script]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=30489#p30489</link>
			<description><![CDATA[<p>Hello:</p><div class="quotebox"><cite>ralph.ronnquist wrote:</cite><blockquote><div><p>... double-quotes within a double-quoted string, they must be back-slashed... ie</p><div class="codebox"><pre><code>coolmail -e &quot;xterm -xrm &#039;XTerm.vt100.allowTitleOps: false&#039; -T \&quot;System mail notification\&quot;&quot; -geometry 120x15-300+150</code></pre></div><p>An alternative is to use single-quotes, as in the <span class="bbc">-xrm</span> detail.</p></div></blockquote></div><p>As you indicate, with the back-lash or with the single-quotes it worked.<br />I did have to move the last double quote to the end of the stanza. otherwise the <span class="bbc">-geometry</span> bit ie: 120x15 would act upon the application&#039;s icon and reduce it to a slit with what would seem to be a 120x15 size ratio.</p><div class="codebox"><pre><code>coolmail -e &quot;xterm -xrm &#039;XTerm.vt100.allowTitleOps: false&#039; -T &#039;System mail notification&#039; -geometry 120x15-300+150&quot;</code></pre></div><p>The ideal thing would be to have xterm execute mail/mailx as the window opens, but adding <span class="bbc">&amp;&amp; mail</span> does not work, whether I move the last double quote to the end or not.</p><p>More sorcery ... 8^|</p><p>How can I get that done?</p><p>Thanks a lot for your input.</p><p>Best,</p><p>A.</p>]]></description>
			<author><![CDATA[dummy@example.com (Altoid)]]></author>
			<pubDate>Fri, 02 Jul 2021 10:51:48 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=30489#p30489</guid>
		</item>
		<item>
			<title><![CDATA[Re: [SOLVED] System mail notifications script]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=30488#p30488</link>
			<description><![CDATA[<p>To use double-quotes within a double-quoted string, they must be back-slashed... ie</p><div class="codebox"><pre><code>coolmail -e &quot;xterm -xrm &#039;XTerm.vt100.allowTitleOps: false&#039; -T \&quot;System mail notification\&quot;&quot; -geometry 120x15-300+150</code></pre></div><p>An alternative is to use single-quotes, as in the <span class="bbc">-xrm</span> detail.</p>]]></description>
			<author><![CDATA[dummy@example.com (ralph.ronnquist)]]></author>
			<pubDate>Fri, 02 Jul 2021 02:03:40 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=30488#p30488</guid>
		</item>
		<item>
			<title><![CDATA[Re: [SOLVED] System mail notifications script]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=30487#p30487</link>
			<description><![CDATA[<p>Hello:</p><div class="quotebox"><cite>Altoid wrote:</cite><blockquote><div><p>... something for the MTA.</p></div></blockquote></div><p>I think I found something.<br />As it usually happens, a nice simple application which works.</p><p>It is called <span class="bbc">coolmail</span> and it is in the Devuan repository.</p><div class="codebox"><pre><code>groucho@devuan:~$ apt list | grep coolmail

coolmail/stable,now 1.3-12+b1 amd64 [installed]
coolmail/stable 1.3-12+b1 i386
groucho@devuan:~$ </code></pre></div><p>You set it up to run at boot from then on it will poll the mail folder (/var/mail/user or a different one).<br />The polling interval can be set, the default is 20s but I don&#039;t know how high this can go.<br />For <em>me</em> 600s would be just fine.</p><p>If there&#039;s mail, <span class="bbc">coolmail</span> will pop up a notification icon and sound the system beep when something arrives.</p><p>You can choose an audio file instead of the system beep. </p><p>There&#039;s a rather cheesy fluttering penguin (like a dumb cartoon) for the default notification icon but you can use a mailbox with a flag that moves.&#160; <br />Fortunately, you can limit the flag&#039;s movement and my guess is that the mailbox icon can also be changed for something else.</p><p>The good thing is that you can also fire up an application when you double-click on the notification icon.<br />I choose to open <span class="bbc">xterm</span> because I never use it, with a geometry to suit my needs.<br />And because the next thing would be to add a command to execute <span class="bbc">mail</span> when the <span class="bbc">xterm</span> window opens.&#160; </p><p>So the <span class="bbc">coolmail</span> command would be like this:</p><div class="codebox"><pre><code>coolmail -e xterm -geometry 120x15-300+150 -fr 0 -int 20</code></pre></div><p>I&#039;d like to have a title for the <span class="bbc">xterm</span> window, so I searched on how to do that and found this ...</p><div class="codebox"><pre><code>xterm -xrm &#039;XTerm.vt100.allowTitleOps: false&#039; -T &quot;System mail notification&quot;</code></pre></div><p>... which gets me an <span class="bbc">xterm</span> window with the legend &quot;System mail notification&quot; in the tile bar. </p><p>The problem is that I am not being able to fit that command line into the <span class="bbc">coolmail</span> launch command line.</p><p>In the command line options it says:</p><div class="quotebox"><blockquote><div><p>OPTIONS<br />&#160; &#160; -e command<br />&#160; &#160; &#160; &#160; Use the specified command to launch your mail utility.&#160; Command is a string, and should be in quotes if it contains spaces.</p></div></blockquote></div><p>So I write it up like this, placing the command in quotes because it has spaces: </p><div class="codebox"><pre><code>groucho@devuan:~$ coolmail -e &quot;xterm -xrm &#039;XTerm.vt100.allowTitleOps: false&#039; -T &quot;System mail notification&quot;&quot; -geometry 120x15-300+150
Unknown argument: mail
Type coolmail -h for help.
groucho@devuan:~$ </code></pre></div><p>Any idea as to how to merge these two commands so they will work?</p><p>The next thing woud be to add the command <span class="bbc">mail</span> to show me what&#039;s up.</p><p>But this is script sorcery ...&#160; &#160;8^| </p><p>Thanks in advance,</p><p>A.</p>]]></description>
			<author><![CDATA[dummy@example.com (Altoid)]]></author>
			<pubDate>Fri, 02 Jul 2021 01:47:40 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=30487#p30487</guid>
		</item>
		<item>
			<title><![CDATA[Re: [SOLVED] System mail notifications script]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=30485#p30485</link>
			<description><![CDATA[<p>Hello:</p><div class="quotebox"><cite>xinomilo wrote:</cite><blockquote><div><p>i think you just need ...</p></div></blockquote></div><p>What I <em>already</em> have installed: <span class="bbc">exim 4.94.2</span>.&#160; 8^D<br />Sorry, I was not explicit enough about it.</p><p>If interested, you can read about my <em>dealings</em> with it here:&#160; &#160;<a href="https://dev1galaxy.org/viewtopic.php?id=4379" rel="nofollow">https://dev1galaxy.org/viewtopic.php?id=4379</a><br />The last post in the thread sums it up in <span class="bbc">tl;tr:</span> style.</p><p>I don&#039;t need to forward local mail anywhere, just be notified when mail arrives in my <span class="bbc">/var/mail/user</span> folder.<br />Not necessarily in real time (would be nice) just anytime I log in to my desktop.</p><p>My box in not up 24/7 and I boot 3 or 4 times a day, so anytime I log in should suffice.</p><p>Thanks for your input.</p><p>A.</p>]]></description>
			<author><![CDATA[dummy@example.com (Altoid)]]></author>
			<pubDate>Thu, 01 Jul 2021 12:50:57 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=30485#p30485</guid>
		</item>
		<item>
			<title><![CDATA[Re: [SOLVED] System mail notifications script]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=30484#p30484</link>
			<description><![CDATA[<div class="quotebox"><cite>Altoid wrote:</cite><blockquote><div><p>I only want something for the MTA.</p></div></blockquote></div><p>i think you just need an mda for local delivery (&amp; mailutils provides one, iirc) . <br />personally, i&#039;m using msmtp-mta to forward any local cron/other emails to my regular email address hosted online. but i never used msmtp for local delivery, not sure it works that way(?).. it&#039;s just much lighter than running a full featured MTA like exim4/postfix.</p>]]></description>
			<author><![CDATA[dummy@example.com (xinomilo)]]></author>
			<pubDate>Thu, 01 Jul 2021 12:30:05 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=30484#p30484</guid>
		</item>
		<item>
			<title><![CDATA[Re: [SOLVED] System mail notifications script]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=30483#p30483</link>
			<description><![CDATA[<p>Hello:</p><div class="quotebox"><cite>xinomilo wrote:</cite><blockquote><div><p>mailcheck package is still around ...</p></div></blockquote></div><p>Yes, late last night I found the <span class="bbc">irssi-scripts</span> package which (among a huge lot of scripts) has this:</p><div class="quotebox"><blockquote><div><p>mailcheck_imap -- staturbar item which indicates how many new emails<br />mailcheck_mbox_flux -- polls your unix mailbox for new mail<br />mailcheck_pop3_kimmo -- POP3 new mail notificationalong with</p></div></blockquote></div><p>Neat!</p><p>I&#039;ll have a look at the one you suggest.<br />I only want something for the MTA. </p><div class="quotebox"><cite>xinomilo wrote:</cite><blockquote><div><p>maybe this can help : <a href="https://wiki.debian.org/MaildirConfiguration" rel="nofollow">https://wiki.debian.org/MaildirConfiguration</a></p></div></blockquote></div><p>I&#039;ll have a look at it.</p><p>Thank you very much for the heads up.</p><p>Cheers,</p><p>A.</p>]]></description>
			<author><![CDATA[dummy@example.com (Altoid)]]></author>
			<pubDate>Thu, 01 Jul 2021 11:31:36 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=30483#p30483</guid>
		</item>
		<item>
			<title><![CDATA[Re: [SOLVED] System mail notifications script]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=30480#p30480</link>
			<description><![CDATA[<p>mailcheck package is still around (`apt show mailcheck`), used to be default in debian iirc..it&#039;s orphaned now, but still works afaik.</p><p>maybe this can help : <a href="https://wiki.debian.org/MaildirConfiguration" rel="nofollow">https://wiki.debian.org/MaildirConfiguration</a></p>]]></description>
			<author><![CDATA[dummy@example.com (xinomilo)]]></author>
			<pubDate>Thu, 01 Jul 2021 09:17:00 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=30480#p30480</guid>
		</item>
		<item>
			<title><![CDATA[[SOLVED] System mail notifications script]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=30471#p30471</link>
			<description><![CDATA[<p>Hello:</p><p>My recent dealings with <span class="bbc">exim 4.94.2</span> made me realise that I only find out about system mails if/when I open a terminal and check.</p><p>Anyone know of a script that would do this automatically everytime I log into my desktop environment?<br />ie: open a terminal, centered and of a predetermined size informing me that I have mail in my /var/mail/user folder that will inform me of the folder&#039;s status: mail or no mail.</p><p>Something as simple (?) as a well written script.<br />Not an application.</p><p>Thanks in advance,</p><p>A.</p>]]></description>
			<author><![CDATA[dummy@example.com (Altoid)]]></author>
			<pubDate>Wed, 30 Jun 2021 14:13:26 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=30471#p30471</guid>
		</item>
	</channel>
</rss>
