<?xml version="1.0" encoding="utf-8"?>

<feed xmlns="http://www.w3.org/2005/Atom">
<title>blog/tags/debian</title>
<link href="http://ressukka.net/blog/tags/debian/"/>
<link href="http://ressukka.net/blog/tags/debian/index.atom" rel="self" type="application/atom+xml"/>
<author>

<name>Ressukka.Net</name>

</author>




<id>http://ressukka.net/blog/tags/debian/</id>

<subtitle type="html">Ressukka.Net</subtitle>
<generator uri="http://ikiwiki.info/" version="3.20100815.7">ikiwiki</generator>
<updated>2012-01-08T10:08:53Z</updated>
<entry>
	<title>Bacula &#x26; OpenERP</title>

	<id>http://ressukka.net/blog/posts/20100614_Bacula_and_OpenERP/</id>

	<link href="http://ressukka.net/blog/posts/20100614_Bacula_and_OpenERP/"/>






	<category term="tags/debian" />

	<category term="tags/sysadmin" />


	<updated>2012-01-08T10:08:53Z</updated>
	<published>2010-06-14T18:13:05Z</published>

	<content type="html" xml:lang="en">
	&lt;p&gt;I&#39;ve been working on setting up &lt;a href=
&quot;http://openerp.com/&quot;&gt;OpenERP&lt;/a&gt; for my needs and today I decided
it was time to work on backing up the beast. Since I&#39;ve been
running &lt;a href=&quot;http://bacula.org/&quot;&gt;bacula&lt;/a&gt; at home to backup
my environment, it was time to tweak it so that it made reasonable
backups of &lt;a href=&quot;http://openerp.com/&quot;&gt;OpenERP&lt;/a&gt; too.&lt;/p&gt;
&lt;p&gt;In the end I was able to build a really elegant solution for
backing it all up. I decided to go for the bpipe plugin that allows
one to pipe programs directly to the bacula file daemon. This
allowed me to do a live dump of the database with pg_dump and store
it directly to the backup set without writing it to the disk.&lt;/p&gt;
&lt;p&gt;Since the other examples in &lt;a href=
&quot;http://wiki.bacula.org/doku.php?id=application_specific_backups:postgresql&quot;&gt;
bacula wiki&lt;/a&gt; define methods that either use files or FIFO to do
the backup, I &lt;a href=
&quot;http://wiki.bacula.org/doku.php?id=application_specific_backups:postgresql#single_pass_backup_with_bpipe&quot;&gt;
documented&lt;/a&gt; my setup there too.&lt;/p&gt;
&lt;p&gt;The only thing that was left was to add the directories specific
for OpenERP to the backup and I was all set.&lt;/p&gt;


	</content>


	<link rel="comments" href="http://ressukka.net/blog/posts/20100614_Bacula_and_OpenERP/#comments" type="text/html" />


	<link rel="comments" href="http://ressukka.net/blog/posts/20100614_Bacula_and_OpenERP/comments.atom" type="application/atom+xml" />

</entry>
<entry>
	<title>SELinux and me...</title>

	<id>http://ressukka.net/blog/posts/20090713_SELinux_and_me/</id>

	<link href="http://ressukka.net/blog/posts/20090713_SELinux_and_me/"/>






	<category term="tags/debian" />


	<updated>2010-02-27T19:27:13Z</updated>
	<published>2009-07-12T21:04:02Z</published>

	<content type="html" xml:lang="en">
	&lt;p&gt;Once in a while I get this urge to use &lt;a href=
&quot;http://en.wikipedia.org/wiki/Selinux&quot; title=
&quot;Security-Enhanced Linux&quot;&gt;SELinux&lt;/a&gt; on some of the servers I
manage, but almost always run in to something that puts me back
enough to never finish the project. This time I managed to figure
out the last few glitches. In the end, SELinux still has a really
steep learning curve, so it&#39;s not for the impatient ones. Even
though &lt;a href=&quot;http://wiki.debian.org/SELinux/Setup&quot; title=
&quot;SELinux/Setup - Debian Wiki&quot;&gt;enabling SELinux in Debian&lt;/a&gt; has
become a lot easier since the first time I tried to get things
running, it&#39;s still just the tip of the iceberg. In Debian it is
just a matter of installing the right packages and running a few
commands, but that&#39;s just where the troubles start.&lt;/p&gt;
&lt;p&gt;Most of the howtos focus on single user or shared installations
where all users are created locally. Also most howtos fail to
mention that you need to relabel files in certain cases.&lt;/p&gt;
&lt;p&gt;One of the most annoying problem I ran in to was changing all
non-system users away from the unconfined_u class. This is of
course done like this (&lt;a href=
&quot;http://selinux-mac.blogspot.com/2009/06/selinux-lockdown-part-one-confined.html&quot;&gt;found
here&lt;/a&gt;):&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;semanage -m -s user_u __default__
&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;The problem here is that it changes the existing user as well
and you start to get errors like these:&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;denied  { read } for  pid=32258 comm=&quot;bash&quot; name=&quot;.profile&quot; dev=dm-5 ino=185474 scontext=user_u:user_r:user_t:s0 tcontext=unconfined_u:object_r:unconfined_home_t:s0 tclass=file
&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;The problem here is that the home directory for the user is
still labeled for the wrong class. The fix is to relabel the home.
Sadly this is something that you just need to know, it&#39;s not
explained anywhere. At least I haven&#39;t found an explanation
anywhere. Another good thing to do before you continue is to change
the already existing user to the staff class. Staff class has a bit
more relaxed security controls and you get to change the security
roles (&lt;a href=
&quot;http://selinux-mac.blogspot.com/2009/06/selinux-lockdown-part-one-confined.html&quot;&gt;details
here&lt;/a&gt;).&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;semanage login -m -s staff_u myuser
fixfiles relabel /home/myuser
&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;This gets you a semi working setup, next problem usually is that
some daemons are denied access to parts of your system. For me,
this was postfix trying to access my home directory that was
mounted over NFS. For such cases, you should persuade the maker of
the module package to update the global policy if it&#39;s a common use
case. Or you need to create a policy package that allows access to
the given files.&lt;/p&gt;
&lt;p&gt;The process itself is documented in the audit2access manual
page. In general you should study the audit2why and audit2allow
packages. The former tells you if there is an easier way to fix
something (like enable a boolean) and latter will create the
required policy lines. Only problem is to compile the policy and
load it. The only problem here was to find the right tool and the
right lines from the manual.&lt;/p&gt;
&lt;p&gt;In general the SELinux learning curve is way too steep. It&#39;s a
system that works pretty well once you learn all the tricks and
start to completely understand the toolset. The community should
continue working on lowering the bar for new users. There has been
some major improvements since I first tried SELinux, so it&#39;s the
right direction.&lt;/p&gt;


	</content>


	<link rel="comments" href="http://ressukka.net/blog/posts/20090713_SELinux_and_me/#comments" type="text/html" />


	<link rel="comments" href="http://ressukka.net/blog/posts/20090713_SELinux_and_me/comments.atom" type="application/atom+xml" />

</entry>
<entry>
	<title>Configuring split DNS</title>

	<id>http://ressukka.net/blog/posts/20090323_split_dns/</id>

	<link href="http://ressukka.net/blog/posts/20090323_split_dns/"/>






	<category term="tags/debian" />

	<category term="tags/sysadmin" />

	<category term="tags/ubuntu" />


	<updated>2009-03-23T20:38:37Z</updated>
	<published>2009-03-23T20:38:37Z</published>

	<content type="html" xml:lang="en">
	&lt;p&gt;Since I &lt;a href=&quot;http://ressukka.net/blog/tags/debian/../../posts/20090323_ikiwiki_and_comments/&quot;&gt;enabled comments&lt;/a&gt;
in this blog, I finally needed to configure a split DNS for my
network.&lt;/p&gt;
&lt;p&gt;There are various reasons why one needs a split DNS and as it&#39;s
usually pointed out, the reasons are usually non-technical. In my
case the reasons are technical: I have a NAT in my local network
that allows me to host this website locally. What causes problems
is that the domain name &lt;code&gt;ressukka.net&lt;/code&gt; points to the
external IP address and that doesn&#39;t work from the inside. So split
DNS it is.&lt;/p&gt;
&lt;p&gt;There are various ways of building a split DNS, one can use the
views feature in &lt;a href=
&quot;https://www.isc.org/software/bind&quot;&gt;bind9&lt;/a&gt; or you can set up 2
separate DNS servers that provide different information (and
redirect your local resolver to use the internal server). The
latter is more secure if the internal zone is sensitive.&lt;/p&gt;
&lt;p&gt;I decided to use a hybrid solution. I already knew that &lt;a href=
&quot;http://downloads.powerdns.com/documentation/html/built-in-recursor.html&quot;&gt;
PowerDNS Recursor&lt;/a&gt; was capable of serving authoritative zones
(think pre-cached) so I decided to leverage on that. Setting this
up turned out to be simpler than I expected.&lt;/p&gt;
&lt;p&gt;First I made a copy of the existing zone and edited it to fit my
needs. I changed the IP address of &lt;code&gt;ressukka.net&lt;/code&gt; to
point to the IP address on the local network. I also adjusted some
other entries that pointed to the local network.&lt;/p&gt;
&lt;p&gt;Next I modified bind to listen on the external IP address. This
can be accomplished by adding a &lt;code&gt;listen-on { 1.2.3.4;
};&lt;/code&gt; to the options in the configuration. I also disabled the
resolver by adding &lt;code&gt;recursion no;&lt;/code&gt;, this forces the bind
to work as authoritative only.&lt;/p&gt;
&lt;p&gt;Then I installed the PowerDNS Recursor
(&lt;code&gt;pdns-recursor&lt;/code&gt; package in debian) and configured it to
listen on the internal address only
(&lt;code&gt;local-address=10.0.0.1&lt;/code&gt;) and added the pre-cached zone
to the configuration with
&lt;code&gt;auth-zones=ressukka.net=/path/to/internal-zone&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Now, after restarting both daemons, I had a working split DNS
with minimal configuration. I was also able to change the external
DNS to authoritative only mode, which is a good idea in any
case.&lt;/p&gt;


	</content>


	<link rel="comments" href="http://ressukka.net/blog/posts/20090323_split_dns/#comments" type="text/html" />


	<link rel="comments" href="http://ressukka.net/blog/posts/20090323_split_dns/comments.atom" type="application/atom+xml" />

</entry>
<entry>
	<title>XenServer and non citrix kernels</title>

	<id>http://ressukka.net/blog/posts/20090305_XenServer_and_non_citrix_kernels/</id>

	<link href="http://ressukka.net/blog/posts/20090305_XenServer_and_non_citrix_kernels/"/>






	<category term="tags/debian" />

	<category term="tags/sysadmin" />

	<category term="tags/ubuntu" />


	<updated>2009-03-22T22:27:30Z</updated>
	<published>2009-03-05T15:26:28Z</published>

	<content type="html" xml:lang="en">
	&lt;p&gt;For some time I&#39;ve suffered from the infamous clocksource
problem with all Linux hosts that aren&#39;t running the Citrix
provided kernels. I&#39;m bit old fashioned and I want to run Debian
provided kernels instead the Citrix ones, mostly because the Debian
kernel receives security updates.&lt;/p&gt;
&lt;p&gt;During the fight with &lt;a href=&quot;http://ressukka.net/blog/tags/debian/../../posts/20090217_Xen_domU_upgrades/&quot;&gt;my own server&lt;/a&gt; last
night, it finally dawned to me.&lt;/p&gt;
&lt;p&gt;The clocksource problem appears after you suspend a Linux host
and the kernel in the virtual machine starts spewing this:&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;Mar  5 09:24:17 co kernel: [461562.007153] clocksource/0: Time went backwards: ret=f03d318c7db9 delta=-200458290723043 shadow=f03d1d566f4a offset=143675d9
&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;I&#39;ve been trying to figure out what is different with Citrix and
Debian kernels, because the problem doesn&#39;t occur with the Citrix
provided kernel.&lt;/p&gt;
&lt;p&gt;The final hint to solving this problem came from &lt;a href=
&quot;http://wiki.debian.org/Xen#head-2994c37779fecc0d4d17a00bbdbd7e018b598874&quot;&gt;
Debian wiki&lt;/a&gt;. The same issue is mentioned there, but the
workaround is not something I like. I perfer making sure that the
host server has the correct time and the virtual machine just
follows that time.&lt;/p&gt;
&lt;p&gt;But the real clue was the clocksource line. It turns out that
the Citrix kernel uses jiffies as the clocksource per default,
while Debian uses the xen clocksource. It would make sense that the
xen clocksource is more accurate since it&#39;s native to the
hypervisor.&lt;/p&gt;
&lt;p&gt;So by just running this on the domU fixes the problem:&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;echo &quot;jiffies&quot;&amp;gt; /sys/devices/system/clocksource/clocksource0/current_clocksource
&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;There is no need to decouple the clock from the host, which is
exactly what I needed. To make this change permanent, you need to
add &lt;code&gt;clocksource=jiffies&lt;/code&gt; to the bootparameters of your
domU kernel.&lt;/p&gt;
&lt;p&gt;You can do this by modifying grub configuration and adding
&lt;code&gt;clocksource=jiffies&lt;/code&gt; to the kopt line and running
update-grub. Or you can use XenCenter and modify the virtual
machine parameters and &lt;code&gt;clocksource=jiffies&lt;/code&gt; to boot
parameters.&lt;/p&gt;
&lt;p&gt;It&#39;s also worth noting that this problem does apply to plain
vanilla Debian installations as well, so reading that whole
&lt;a href=&quot;http://wiki.debian.org/Xen#head-2994c37779fecc0d4d17a00bbdbd7e018b598874&quot;&gt;
wiki page&lt;/a&gt; is a good idea.&lt;/p&gt;


	</content>


	<link rel="comments" href="http://ressukka.net/blog/posts/20090305_XenServer_and_non_citrix_kernels/#comments" type="text/html" />


	<link rel="comments" href="http://ressukka.net/blog/posts/20090305_XenServer_and_non_citrix_kernels/comments.atom" type="application/atom+xml" />

</entry>
<entry>
	<title>Debian Xen dom0 Upgrade woes</title>

	<id>http://ressukka.net/blog/posts/20090305_Xen_Upgrade/</id>

	<link href="http://ressukka.net/blog/posts/20090305_Xen_Upgrade/"/>






	<category term="tags/Debian" />

	<category term="tags/sysadmin" />


	<updated>2009-03-05T15:34:40Z</updated>
	<published>2009-03-05T15:11:39Z</published>

	<content type="html" xml:lang="en">
	&lt;p&gt;I finally decided that it&#39;s time for me to upgrade my Xen
installation. It used to run etch with backported Xen, because the
etch version was increasingly difficult to work with.&lt;/p&gt;
&lt;p&gt;I also acknowledge that some of the issues I&#39;ve been having are
simply caused by yours truly, but even still the Debian Xen
installation is way too fragile to my taste. I&#39;ve already
considered installing XenServer Express locally and running the
hosts on it. The big drawback has been that XenCenter (the tool
that is used to manage XenServer) is windows only and it doesn&#39;t
work with wine.&lt;/p&gt;
&lt;p&gt;So you can imagine my desperation...&lt;/p&gt;
&lt;p&gt;Anyway, the latest upgrade from etch to lenny was painful as
usual. The first part went smoothly, bit of sed magic on
sources.list and a few upgrade commands (carefully picking the Xen
packages out of the upgrade set). So in the end I had a working
lenny installation with backported Xen.&lt;/p&gt;
&lt;p&gt;Next I made sure that there was nothing major going on in my
network (one of the virtual machines acts as my local firewall) and
took a deep breath before upgrading the rest of the packages. I
knew to be careful about xendomains -script which has reliably
restored my virtual machines after reboot to a broken host so I had
always ended up restarting my virtual machines after reboot.&lt;/p&gt;
&lt;p&gt;I carefully cleared &lt;code&gt;XENDOMAINS_AUTO&lt;/code&gt; and set
&lt;code&gt;XENDOMAINS_RESTORE&lt;/code&gt; to false in
&lt;code&gt;/etc/default/xendomains&lt;/code&gt; so that the virtual machines
would be saved but not restored or restarted on reboot.&lt;/p&gt;
&lt;p&gt;After the normal pre-boot checks I went for it.&lt;/p&gt;
&lt;p&gt;Oddly enough everything worked normally and the system came up
after a bit of waiting. I checked the bridges and everything
appeared normal, so it was time to try and restore a single domain
to see that everything actually did work as planned.&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;Hydrogen:~# xm restore /var/lib/xen/save/Aluminium
Error: Device 0 (vif) could not be connected. Hotplug scripts not working.
&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;Oof, Googling for the issue revealed that there were others that
had suffered from the same problem on various different platforms
the problems were caused by different things. One would assume that
the problem is in the &lt;code&gt;vif-bridge&lt;/code&gt; script that is
mentioned in the &lt;code&gt;xend-config.sxp&lt;/code&gt; file as the script
that brings up the vif, but after many hours of tial and error and
pointless googling (over gprs connection), I couldn&#39;t find any
solution to the problem. It was time to call it a day (it was
almost 3 am already...)&lt;/p&gt;
&lt;p&gt;During the night I had a new idea about the possible cause. What
if the problem isn&#39;t in xend, but somewhere else. I fired up
&lt;code&gt;udevadm monitor&lt;/code&gt; to see what udev saw and it wasn&#39;t
much. I&#39;m not an expert with udev, but from previous encounters I
had a vague feeling that there was supposed to be more events
flying around.&lt;/p&gt;
&lt;p&gt;I wasn&#39;t able to pinpoint what was wrong so I decided to purge
xen-utils, of which I had 2 versions installed: 3.2-1 and 3.0.2. I
also removed everything related to xenstore. After reinstalling the
current versions and restoring my configuration files the first
host came up just fine.&lt;/p&gt;
&lt;p&gt;I still had problems resuming the virtual machines and I ended
up rebooting them again, which was nothing new, but at least they
were running again.&lt;/p&gt;
&lt;p&gt;In the end I don&#39;t know what was the actual cause for udev not
handling the devices properly, but I&#39;m happy to have them all
running again. And I learned a valuable lesson of all this: udev is
an important part of Xen, make sure it works properly.&lt;/p&gt;


	</content>


	<link rel="comments" href="http://ressukka.net/blog/posts/20090305_Xen_Upgrade/#comments" type="text/html" />


	<link rel="comments" href="http://ressukka.net/blog/posts/20090305_Xen_Upgrade/comments.atom" type="application/atom+xml" />

</entry>
<entry>
	<title>Xen domU and grub</title>

	<id>http://ressukka.net/blog/posts/20090217_Xen_domU_upgrades/</id>

	<link href="http://ressukka.net/blog/posts/20090217_Xen_domU_upgrades/"/>






	<category term="tags/debian" />

	<category term="tags/sysadmin" />

	<category term="tags/ubuntu" />


	<updated>2009-02-17T05:57:53Z</updated>
	<published>2009-02-17T05:57:53Z</published>

	<content type="html" xml:lang="en">
	&lt;p&gt;I&#39;ve been bitten by grub upgrades and installations on Debian
family domU servers. Apparently there are &lt;a href=
&quot;http://orangesquash.org.uk/2009/02/16/now-running-lenny-and-a-workaround-for-a-grub-bug/&quot;&gt;
others&lt;/a&gt; out there who have been bitten too.&lt;/p&gt;
&lt;p&gt;The bug itself is caused by a missing device entry, probably
because of udev. Anyway, grub-probe tries to discover the root
device so that update-grub can properly generate a menu.lst. In
certain scenarios the root device itself doesn&#39;t exist. Here is an
example from a configuration generated with xen-tools:&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;Hydrogen:/etc/xen# grep phy Neon.cfg 
disk    = [ &#39;phy:Local1/Neon-disk,sda1,w&#39;, &#39;phy:Local1/Neon-swap,sda2,w&#39; ]
&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;While this is a valid configuration, the device sda doesn&#39;t
exists within the virtual machine. As a workaround the &lt;a href=
&quot;http://orangesquash.org.uk/2009/02/16/now-running-lenny-and-a-workaround-for-a-grub-bug/&quot;&gt;
above blog entry&lt;/a&gt; suggests manually adding the sda device and
the device entry in device.map.&lt;/p&gt;
&lt;p&gt;This solution does work, but it will fail with the next upgrade.
The proper solution is to adjust the Xen configuration so that the
root device is created. And since Xen uses different naming scheme
for devices we can upgrade to that too. So the above example
becomes:&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;Hydrogen:/etc/xen# grep phy Neon.cfg 
disk    = [ &#39;phy:Local1/Neon-disk,xvda,w&#39;, &#39;phy:Local1/Neon-swap,xvdb,w&#39; ]
&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;You also need to adjust the existing grub configuration and
fstab within the domU. It&#39;s a bit more work and requires an
additional reboot, but it gives you a peace of mind that the next
upgrade will work without a hitch.&lt;/p&gt;


	</content>


	<link rel="comments" href="http://ressukka.net/blog/posts/20090217_Xen_domU_upgrades/#comments" type="text/html" />


	<link rel="comments" href="http://ressukka.net/blog/posts/20090217_Xen_domU_upgrades/comments.atom" type="application/atom+xml" />

</entry>
<entry>
	<title>Know you upgrades, apt-listchanges</title>

	<id>http://ressukka.net/blog/posts/20090215_apt-listchanges/</id>

	<link href="http://ressukka.net/blog/posts/20090215_apt-listchanges/"/>






	<category term="tags/debian" />

	<category term="tags/sysadmin" />

	<category term="tags/ubuntu" />


	<updated>2009-02-17T06:02:21Z</updated>
	<published>2009-02-15T20:35:57Z</published>

	<content type="html" xml:lang="en">
	&lt;p&gt;As an obligatory note, Debian Lenny was &lt;a href=
&quot;http://debian.org/News/2009/20090214&quot;&gt;released&lt;/a&gt; earlier today.
Which means that sysadmins all over the world are starting to
upgrade their servers.&lt;/p&gt;
&lt;p&gt;There is an oddly little known tool that each and every sysadmin
should install on at least one server they maintain, called
&lt;a href=&quot;http://packages.debian.org/stable/utils/apt-listchanges&quot;&gt;apt-listchanges&lt;/a&gt;.
It lists changes made to packages since the currently installed
version. Sure that information will be overwhelming on major
upgrades, but what is useful even on major upgrades is the
capability to parse News files in the same way.&lt;/p&gt;
&lt;p&gt;News files contain important information about the package in
question. For example a maintainer could list known upgrade
problems there, like is done in the lighttpd package. Or list
changes in package specific default behaviour, like is done in Vim
package.&lt;/p&gt;
&lt;p&gt;Sure, you will notice these in time, but it&#39;s nice to get a
heads up before a problem bites you.&lt;/p&gt;


	</content>


	<link rel="comments" href="http://ressukka.net/blog/posts/20090215_apt-listchanges/#comments" type="text/html" />


	<link rel="comments" href="http://ressukka.net/blog/posts/20090215_apt-listchanges/comments.atom" type="application/atom+xml" />

</entry>
<entry>
	<title>Purging postfix queue</title>

	<id>http://ressukka.net/blog/posts/20090125_Postfix_queue_purging/</id>

	<link href="http://ressukka.net/blog/posts/20090125_Postfix_queue_purging/"/>






	<category term="tags/debian" />

	<category term="tags/sysadmin" />

	<category term="tags/ubuntu" />


	<updated>2009-01-25T09:30:58Z</updated>
	<published>2009-01-25T09:23:36Z</published>

	<content type="html" xml:lang="en">
	&lt;p&gt;Since I keep ending up in situations where I need to clean up
&lt;a href=&quot;http://postfix.org/&quot;&gt;postfix&lt;/a&gt; queue from mails sent by
a single host and always forget the command, I&#39;m posting it here.
Maybe someone else will find it useful as well.&lt;/p&gt;
&lt;p&gt;To begin with, you need to determine the IP address of the
culprit you want to eliminate. How you do this, is up to you.
Grepping logs or examining the files in the queue both work. But
for some reason there doesn&#39;t appear to be a good tool to get
statistics on the sending IP addresses, only the origin and
destination domains.&lt;/p&gt;
&lt;p&gt;Once you have determined the IP address which you want to purge,
you can use the following spell. You might have to repeat the same
line for active and incoming queues as well, but usually deferred
is the queue I have the most mails.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;grep -lrE &#39;10.20.30.4&#39; /var/spool/postfix/deferred | xargs
-r -n1 basename | postsuper -d -&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;It&#39;s important that the IP address has escaped dots, because
dots can account for any character. In the worst case it will end
up matching a lot of wrong IP addresses. Another important bits are
the &#39;[^0-9]&#39; groups in both ends of the pattern. Those make the IP
address only match that particular IP address. Without that extra
limitation 1.1.1.1 would match anything that has 1 as the last
number in the first octet and 1 as the first number of the last
octet. For example: 211.1.1.154 would be a valid match.&lt;/p&gt;
&lt;p&gt;The other important bit, yet oddly unknown, is the postsuper
command. Postsuper modifies the queue and -d flag makes it delete
files in the queue by QueueID. For some reason I keep on seeing all
sorts of &lt;code&gt;find -exec rm {}&lt;/code&gt; spells all over, which isn&#39;t
really that nice for the daemon itself.&lt;/p&gt;
&lt;p&gt;So here it is, one more tidbit I&#39;ve been meaning to write up for
quite some time now. Enjoy!&lt;/p&gt;


	</content>


	<link rel="comments" href="http://ressukka.net/blog/posts/20090125_Postfix_queue_purging/#comments" type="text/html" />


	<link rel="comments" href="http://ressukka.net/blog/posts/20090125_Postfix_queue_purging/comments.atom" type="application/atom+xml" />

</entry>
<entry>
	<title>New tricks</title>

	<id>http://ressukka.net/blog/posts/20090124_New_Tricks/</id>

	<link href="http://ressukka.net/blog/posts/20090124_New_Tricks/"/>






	<category term="tags/debian" />

	<category term="tags/ubuntu" />


	<updated>2009-01-24T18:43:40Z</updated>
	<published>2009-01-24T17:50:34Z</published>

	<content type="html" xml:lang="en">
	&lt;p&gt;&quot;You never call, you never write. I hardly know you
anymore.&quot;&lt;/p&gt;
&lt;p&gt;Yes, I&#39;ve been meaning to write up on several things. For some
time now, I&#39;ve been a happy &lt;a href=&quot;http://www.vim.org/&quot; title=
&quot;Vi IMproved&quot;&gt;VIM&lt;/a&gt; user and a while back I ran in to a blog post
where someone mentioned a new feature they found in &lt;a href=
&quot;http://www.vim.org/&quot; title=&quot;Vi IMproved&quot;&gt;VIM&lt;/a&gt; which got me to
explore the &lt;a href=
&quot;http://packages.debian.org/vim-scripts&quot;&gt;vim-scripts&lt;/a&gt;
package.&lt;/p&gt;
&lt;p&gt;There are a lot of scripts out there that extend &lt;a href=
&quot;http://www.vim.org/&quot; title=&quot;Vi IMproved&quot;&gt;VIM&lt;/a&gt; far beyond what
it can do by default. And it&#39;s quite powerful even without the
scripts. One of the neat little scripts I decided to install by
default was &lt;a href=
&quot;http://www.vim.org/scripts/script.php?script_id=1697&quot;&gt;surround&lt;/a&gt;,
it allows one to easily replace surrounding parenthesis, tags or
quotation marks.&lt;/p&gt;
&lt;p&gt;There are a lot of scripts in the &lt;a href=
&quot;http://packages.debian.org/vim-scripts&quot;&gt;vim-scripts&lt;/a&gt; package,
but it&#39;s not always clear how to enable the scripts. Thats where
&lt;a href=
&quot;http://packages.debian.org/vim-addon-manager&quot;&gt;vim-addon-manager&lt;/a&gt;
comes to play, it provides a vim-addon command that allows you to
easily enable or disable the scripts.&lt;/p&gt;
&lt;p&gt;I&#39;m still trying to grasp the full potential of all the new
commands available, but it certainly appears that I&#39;ll be having
even more fun writing stuff. It&#39;s kind of odd, at first when you
start to use vi-like editors, you struggle. But in the end it&#39;s
just such a convenient way of editing files that it really does
grow on you.&lt;/p&gt;


	</content>


	<link rel="comments" href="http://ressukka.net/blog/posts/20090124_New_Tricks/#comments" type="text/html" />


	<link rel="comments" href="http://ressukka.net/blog/posts/20090124_New_Tricks/comments.atom" type="application/atom+xml" />

</entry>
<entry>
	<title>About Usability</title>

	<id>http://ressukka.net/blog/posts/20090104_About_Usability/</id>

	<link href="http://ressukka.net/blog/posts/20090104_About_Usability/"/>






	<category term="tags/bogus" />

	<category term="tags/debian" />

	<category term="tags/devel" />

	<category term="tags/ubuntu" />


	<updated>2009-01-04T11:51:18Z</updated>
	<published>2009-01-04T11:48:56Z</published>

	<content type="html" xml:lang="en">
	&lt;p&gt;Some people consider the &lt;a href=
&quot;http://library.gnome.org/devel/hig-book/stable/&quot;&gt;gnome usability
guidelines&lt;/a&gt; a nuisance and some consider certain applications
way too simplistic. While it is really hard to get the usability
right, it&#39;s well worth it.&lt;/p&gt;
&lt;p&gt;We need to keep in mind that as computer oriented people we tend
to see things differently. Things that are simple to us aren&#39;t
really that simple to the &quot;normal people&quot;. But one of the simple
things we can do the insure that the software we write serve the
people it&#39;s designed for is to remove all not needed pop-ups and
questions.&lt;/p&gt;
&lt;p&gt;A good way to detect these would be to ask yourself why would a
user choose anything else but the most logical option. It&#39;s kind of
hard to explain, so lets pick an example:&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://www.mozilla.com/en-US/firefox/&quot;&gt;Firefox&lt;/a&gt; is
updated, the first question it usually asks after upgrade is about
incompatible extensions. The user is presented with choices, check
for updates or cancel. Now, we are dealing with internet browser so
the user should be connected to the internet so there is no problem
with checking for the updates, we can rule out that scenario. The
other scenario that I can come up with is that a developer doesn&#39;t
want to update some certain extension.&lt;/p&gt;
&lt;p&gt;So at least I can&#39;t come up with any reasonable scenario why
someone would want to select anything else but to upgrade the main
option of upgrading the extensions. Why not just leave out the
option and instead do the upgrade automatically. If you wish to be
transparent, you can show the user that you are doing the upgrade.
Or you can do like some applications do and just do it without
bothering the user with the options.&lt;/p&gt;
&lt;p&gt;I know I sound like a Google fanboy, but Google generally gets
this right. Their applications skip out all upgrade related notices
and just do the upgrade. Regular user doesn&#39;t want to upgrade
because the user has been scared with incompatibility notices and
upgrade checklists for so long. Just going ahead with the upgrade
in complete silence keeps their software up to date as well.&lt;/p&gt;
&lt;p&gt;Another example would be from few years back: The &lt;a href=
&quot;http://www.ubuntu.com/&quot;&gt;Ubuntu&lt;/a&gt; installation. Back in the day
&lt;a href=&quot;http://www.debian.org/&quot;&gt;Debian&lt;/a&gt; was working on Debian
Installer, which is also used as the main installer in &lt;a href=
&quot;http://www.ubuntu.com/&quot;&gt;Ubuntu&lt;/a&gt; alternative installation media.
Debian Installer is capable of doing most things silently, but with
&lt;a href=&quot;http://www.debian.org/&quot;&gt;Debian&lt;/a&gt; it by default asks a
lot of questions. It doesn&#39;t matter, since most people who install
&lt;a href=&quot;http://www.debian.org/&quot;&gt;Debian&lt;/a&gt; can be categorized as
developers. But in my opinion, the thing that made &lt;a href=
&quot;http://www.ubuntu.com/&quot;&gt;Ubuntu&lt;/a&gt; a success was that it doesn&#39;t
ask the questions that can be answered without asking the user.&lt;/p&gt;
&lt;p&gt;So, back to usability. There are basically 2 camps, the &quot;normal&quot;
users and the developers. Developers want and need to see a lot of
the backend behaviour, just to debug problems. Currently a lot of
the open source software is focused towards developers while they
are gaining grounds on the &quot;normal&quot; population as well. We should
start focusing on the users for a change.&lt;/p&gt;


	</content>


	<link rel="comments" href="http://ressukka.net/blog/posts/20090104_About_Usability/#comments" type="text/html" />


	<link rel="comments" href="http://ressukka.net/blog/posts/20090104_About_Usability/comments.atom" type="application/atom+xml" />

</entry>

</feed>
