<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>ejohansson.se &#187; config</title>
	<atom:link href="http://ejohansson.se/tags/config/feed/" rel="self" type="application/rss+xml" />
	<link>http://ejohansson.se</link>
	<description>Random bits about Linux, programming, computers and occasionally other stuff.</description>
	<lastBuildDate>Sun, 18 Apr 2010 20:23:14 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Wake on LAN with&#160;Debian</title>
		<link>http://ejohansson.se/archives/2009/12/31/wake-on-lan-with-debian/</link>
		<comments>http://ejohansson.se/archives/2009/12/31/wake-on-lan-with-debian/#comments</comments>
		<pubDate>Thu, 31 Dec 2009 13:45:20 +0000</pubDate>
		<dc:creator>Erik Johansson</dc:creator>
				<category><![CDATA[debian]]></category>
		<category><![CDATA[network]]></category>
		<category><![CDATA[config]]></category>
		<category><![CDATA[tips]]></category>

		<guid isPermaLink="false">http://ejohansson.se/?p=309</guid>
		<description><![CDATA[To enable Wake on LAN on a Asus P5E-V motherboard under Debian you can do the following. Since I have a Asus motherboard, that&#8217;s the only one I&#8217;ve tested, but except from the BIOS (which may differ a bit), the instructions should be the same for all motherboards/NIC that supports Wake on LAN.
In the BIOS, [...]]]></description>
			<content:encoded><![CDATA[<p>To enable <a href="http://en.wikipedia.org/wiki/Wake-on-LAN">Wake on LAN</a> on a Asus P5E-V motherboard under Debian you can do the following. Since I have a Asus motherboard, that&#8217;s the only one I&#8217;ve tested, but except from the BIOS (which may differ a bit), the instructions should be the same for all motherboards/NIC that supports Wake on LAN.</p>
<p>In the BIOS, enable &#8220;Power on by PCIE device&#8221;.</p>
<p>In Linux, first install ethtool and then check that Wake on LAN is supported by running the following command:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">root<span style="color: #000000; font-weight: bold;">@</span>host$ ethtool eth0
...
        Supports Wake-on: g
        Wake-on: g
...</pre></div></div>

<p>The output should contain a &#8216;g&#8217; to indicate that the device can be woken by sending it a &#8220;magic packet&#8221;.</p>
<p>Enable Wake-on by running:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">root<span style="color: #000000; font-weight: bold;">@</span>host$ ethtool <span style="color: #660033;">-s</span> eth0 wol g</pre></div></div>

<p>Since this command must be run on every boot, add it to /etc/rc.local.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">root<span style="color: #000000; font-weight: bold;">@</span>host$ <span style="color: #c20cb9; font-weight: bold;">cat</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>rc.local
...
ethtool <span style="color: #660033;">-s</span> eth0 wol g
<span style="color: #7a0874; font-weight: bold;">exit</span> <span style="color: #000000;">0</span></pre></div></div>

<p>As the last step we must make sure that halt doesn&#8217;t disable the network device. This is done by adding this line to /etc/default/halt:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #007800;">NETDOWN</span>=no</pre></div></div>

<p>We also need the MAC address to send the magic packet to.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">root<span style="color: #000000; font-weight: bold;">@</span>host$ <span style="color: #c20cb9; font-weight: bold;">ifconfig</span> eth0
eth0      Link encap:Ethernet  HWaddr 00:1e:8c:cf:d0:bb  
...</pre></div></div>

<p>Then shutdown the computer. On an other computer, install e.g. <a href="http://gsd.di.uminho.pt/jpo/software/wakeonlan/">wakeonlan</a> and run:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">user<span style="color: #000000; font-weight: bold;">@</span>other$ wakeonlan 00:1e:8c:cf:d0:bb</pre></div></div>

<p>The computer should now start.</p>
]]></content:encoded>
			<wfw:commentRss>http://ejohansson.se/archives/2009/12/31/wake-on-lan-with-debian/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>My dspam&#160;configuration</title>
		<link>http://ejohansson.se/archives/2006/07/25/my-dspam-configuration/</link>
		<comments>http://ejohansson.se/archives/2006/07/25/my-dspam-configuration/#comments</comments>
		<pubDate>Tue, 25 Jul 2006 17:45:00 +0000</pubDate>
		<dc:creator>Erik Johansson</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[config]]></category>
		<category><![CDATA[tips]]></category>

		<guid isPermaLink="false">http://ejohansson.se/archives/2006/07/25/my-dspam-configuration/</guid>
		<description><![CDATA[Since I was asked by Adam to give some hints how to setup dspam, I&#8217;m posting snippets from my configuration in hope that it will help at least a bit.
We&#8217;ll start with exim. First of all, we&#8217;ll need a router that will pass all incoming email through dspam. Since I use ldap to store all [...]]]></description>
			<content:encoded><![CDATA[<p>Since I was <a href="http://ejohansson.se/archives/2006/05/14/dspam-sarge-backport/#comment-1810">asked by Adam</a> to give some hints how to setup dspam, I&#8217;m posting snippets from my configuration in hope that it will help at least a bit.</p>
<p>We&#8217;ll start with exim. First of all, we&#8217;ll need a router that will pass all incoming email through dspam. Since I use ldap to store all domains and users, it might look a bit intimidating. But, as always, <a href="http://exim.org/exim-html-4.62/doc/html/spec_html/index.html">the documentation</a> is your friend. Anyhow, the interesting part is the condition.</p>
<pre>
dspam_router:
  driver = accept
  no_verify
  domains = +virtual_domains
  hide local_parts = ${lookup ldap {user=LDAP_USER pass=LDAP_PASS \
    ldap:///dc=${quote_ldap_dn:$domain},ou=domains,dc=ejohansson,dc=se?uid?one?\
    (&#038;(objectClass=posixAccount)(uid=${quote_ldap:$local_part}@$domain))}\
    {${extract{1}{@}{$value}}} fail}
  local_part_suffix = +*
  local_part_suffix_optional

  # When to scan a message :
  # - it isn't already scanned
  # - it isn't local
  # - it is less than 512k in size
  condition = "${if and {\
    {!eq {$received_protocol}{spam-scanned}}\
    {!eq {$received_protocol}{local}}\
    { <= {$message_size}{512k}}\
    } {1}{0}}"
  headers_add = "X-FILTER-DSPAM: by $primary_hostname on $tod_full"
  transport = dspam_spamcheck
</pre>
<p>If the message matched the condition, it will be sent to the dspam_spamcheck transport. Which looks like follows.</p>
<pre>
dspam_spamcheck:
  driver = pipe
  command = "/usr/bin/dspam --deliver=innocent,spam \
    --user '${lc:$local_part}@${lc:$domain}' -- \
    -f '$sender_address' %u"
  home_directory = "/var/spool/dspam"
  current_directory = "/var/spool/dspam"
  user = dspam
  group = dspam
  log_output = true

  return_fail_output = true
  return_path_add = false
  message_prefix =
  message_suffix =
</pre>
<p>This will check the message and then send it to exim, to have it pass through the exim router chain once more. But this time, since we'll be using the spam-scanned protocol, it wont match the condition in dspam_router. But for this to work, we need to set the delivery agent in  dspam.conf.</p>
<pre>
TrustedDeliveryAgent "/usr/sbin/exim4 -oMr spam-scanned"
</pre>
<p>Then we need to give the dspam user right to set the received protocol. We do this by adding dspam to the list of trusted_users in our exim conf.</p>
<p>See the <a href="/files/dspam/">configuration files</a> for more details and the <a href="http://dspamwiki.expass.de/">DSPAM wiki</a> for even some more.</p>
<p>If you have comments or would like me too explain something a bit more, please don't hesitate to leave a comment or drop me a mail.</p>
]]></content:encoded>
			<wfw:commentRss>http://ejohansson.se/archives/2006/07/25/my-dspam-configuration/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
