When you are using non-LTS Ubuntu your system may become impossible to update very soon. When the system upgrading is not the option you could try to update the content of
I have a free email account on wp.pl server and I use it as a secondary account only for shopping or registration purposes. Everything works just fine and the only issue is the SPAM which wp.pl sends me everyday and this SPAM can not be filtered by the filters defined in the account settings. I am fine with this since I am not paying for anything and it looks like it’s just the price you need to pay for this account.
I have started to look for some command line tool in order to filter and remove these unwanted and annoying messages automatically. I found a tool named ImapFilter. You can define some rules how to deal with the messages and ImapFilter will do everything by itself. The configuration is pretty simple:
… however in my case I was not able to make it running, I was playing around with the settings but every time I was receiving an error like that:
imapfilter: reading data through SSL; EOF in violation of the protocol
So I decided to look for an alternative solution and eventually I found a command line email client Mutt. It’s really powerful and handy utility and without any issues I was able to make it running and apply SPAM filtering.
The configuration is stored in
set imap_user = "email@example.com"
set imap_pass = "somepassword"
set smtp_url = "smtps://firstname.lastname@example.org@smtp.wp.pl:465/"
set smtp_pass = "somepassword"
set from = "email@example.com"
set realname = "AA"
set folder = "imaps://imap.wp.pl:993"
set spoolfile = "+INBOX"
set move = no
To show the messages in Mutt sent by firstname.lastname@example.org one need to define the limit
~f email@example.com. Then to delete the messages one need to press
D and confirm the operation with the key
$. And that’s it.
To make it even faster I defined an alias in
alias wppl='mutt -e "push '"'"'<limit>~f firstname.lastname@example.org<enter>D<enter>'"'"'"'
which opens the mutt with already filtered and tagged to delete messages.
/sbin/iptables -t nat -I PREROUTING -p tcp --dport 80 -j REDIRECT --to-port 8080
I had two disks on my Dell Latitude E6540: HDD (/dev/hda) and SSD (/dev/sdb). These disks had different operating systems and grub was installed only on HDD. The second SSD disk:
was installed in the mSATA slot which in fact was WWAN port at my laptop.
So it happened. One day my HDD stopped working completely it was dead. I was not able to boot my operating system I had on SSD disk because the grub was only on HDD. To fix the problem I installed the grub on SSD using the Live USB Ubuntu.
This was my procedure:
mount the partition with the system (in my case it was /dev/sda1):
sudo mount /dev/sda1 /mnt
bind the following directories:
sudo mount --bind /dev /mnt/dev
sudo mount --bind /dev/pts /mnt/dev/pts
sudo mount --bind /proc /mnt/proc
sudo mount --bind /sys /mnt/sys
change the directory to /mnt with chroot:
sudo chroot /mnt
grub-install --recheck /dev/sda
final clean up:
sudo umount /mnt/sys
sudo umount /mnt/proc
sudo umount /mnt/dev/pts
sudo umount /mnt/dev
sudo umount /mnt
And one more thing. It is really important to check the disk with new grub whether it has set the flag
boot if not the disk will be not bootable. This can be easily done with GParted.
There is a number of methods which allow you to run the process in the background detached from the terminal, e.g.
tmux, nohup, screen. However recently I have started using the most basic unix method I have just forgotten for many years, I mean the combination of
I will use my everyday scenario, I usually start my eclipse from the terminal:
Sometimes I forget to add & at the end but there is a way how to place it to the background and detach from the terminal. You need to press CTRL+Z to suspend the process then list the jobs by typing
to receive the job number, e.g.:
+ Stopped /home/runner/work/eclipse
next you need to move eclipse (job 1) to the background:
$ bg %1
and detach it from the terminal:
when you close the terminal the eclipse will be still working.
Recently I was facing an annoying issue of massive CPU usage of Thunderbird process. In my case the CPU load was ~60%-70% and that could last forever.
Fortunately I have found a solution. It was enough to change
mail.db.idle_limit to 30000000