<?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>Werk &#187; osx</title>
	<atom:link href="http://werk.feub.net/tag/osx/feed/" rel="self" type="application/rss+xml" />
	<link>http://werk.feub.net</link>
	<description>Pourquoi Werk? ^.^</description>
	<lastBuildDate>Tue, 06 Dec 2011 14:18:13 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Changer le port SSH par défaut d’OS X</title>
		<link>http://werk.feub.net/2011/01/changer-le-port-ssh-par-defaut-d%e2%80%99os-x/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=changer-le-port-ssh-par-defaut-d%25e2%2580%2599os-x</link>
		<comments>http://werk.feub.net/2011/01/changer-le-port-ssh-par-defaut-d%e2%80%99os-x/#comments</comments>
		<pubDate>Sun, 16 Jan 2011 13:13:28 +0000</pubDate>
		<dc:creator>Fabien</dc:creator>
				<category><![CDATA[mac]]></category>
		<category><![CDATA[osx]]></category>
		<category><![CDATA[ssh]]></category>

		<guid isPermaLink="false">http://werk.feub.net/?p=608</guid>
		<description><![CDATA[Ce n’est pas nouveau, mais depuis Tiger, et maintenant sous Snow Leopard, la gestion de SSH est reléguée au démon launchd et non plus à xinetd. Ainsi pour changer le numéro de port de SSH, une petite gymnastique s’impose. Comme beaucoup de démons sous OS X, le fichier de configuration se trouve sous /System/Library/LaunchDaemons et [...]]]></description>
			<content:encoded><![CDATA[<p>
<img src="http://werk.feub.net/medias/2010/03/finder-logo_64.png" alt="" title="" width="64" height="64" class="floatleft" />Ce n’est pas nouveau, mais depuis Tiger, et maintenant sous <a title="apple.com" target="_blank" href="http://www.apple.com/fr/macosx/">Snow Leopard</a>, la gestion de SSH est reléguée au démon <a title="apple.com" target="_blank" href="http://developer.apple.com/MacOsX/launchd.html">launchd</a> et non plus à <a title="Wikipedia : xinetd" target="_blank" href="http://fr.wikipedia.org/wiki/Xinetd">xinetd</a>. Ainsi pour changer le numéro de port de SSH, une petite gymnastique s’impose.
</p>
<p>Comme beaucoup de démons sous OS X, le fichier de configuration se trouve sous <code>/System/Library/LaunchDaemons</code> et celui qui nous intéresse se nomme naturellement <code>ssh.plist</code>.
</p>
<p><span id="more-608"></span></p>
<p>
Lorsque l’on édite ce fichier de configuration, on peut trouver ces lignes qui renseignent sur le port du service ssh.
</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;</span>key<span style="color: #000000; font-weight: bold;">&gt;</span>SockServiceName<span style="color: #000000; font-weight: bold;">&lt;/</span>key<span style="color: #000000; font-weight: bold;">&gt;</span>
<span style="color: #000000; font-weight: bold;">&lt;</span>string<span style="color: #000000; font-weight: bold;">&gt;</span><span style="color: #c20cb9; font-weight: bold;">ssh</span><span style="color: #000000; font-weight: bold;">&lt;/</span>string<span style="color: #000000; font-weight: bold;">&gt;</span></pre></div></div>

<p>
Oui, mais cela ne ressemble pas à un numéro de port. Juste. En fait, pourquoi faire simple quand on peut compliquer un petit peu, la chaîne ssh renvoie au fichier <code>/etc/services</code>, et on trouve bien que SSH est sur le port standard 22 (en UDP et TCP).
</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">ssh</span>              <span style="color: #000000;">22</span><span style="color: #000000; font-weight: bold;">/</span>udp     <span style="color: #666666; font-style: italic;"># SSH Remote Login Protocol</span>
<span style="color: #c20cb9; font-weight: bold;">ssh</span>              <span style="color: #000000;">22</span><span style="color: #000000; font-weight: bold;">/</span>tcp     <span style="color: #666666; font-style: italic;"># SSH Remote Login Protocol</span></pre></div></div>

<p>
Il suffit donc de rajouter un nouveau nom avec le port correspondant, par exemple si l’on veut utiliser SSH sur le port 2222 au lieu de 22 :
</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">ssh2              <span style="color: #000000;">2222</span><span style="color: #000000; font-weight: bold;">/</span>udp     <span style="color: #666666; font-style: italic;"># SSH Remote Login Protocol</span>
ssh2              <span style="color: #000000;">2222</span><span style="color: #000000; font-weight: bold;">/</span>tcp     <span style="color: #666666; font-style: italic;"># SSH Remote Login Protocol</span></pre></div></div>

<p>
Et d’aller bien sur renommer la chaîne correspondant au SockServiceName dans le <code>ssh.plist</code>, comme ceci :
</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;</span>key<span style="color: #000000; font-weight: bold;">&gt;</span>SockServiceName<span style="color: #000000; font-weight: bold;">&lt;/</span>key<span style="color: #000000; font-weight: bold;">&gt;</span>
<span style="color: #000000; font-weight: bold;">&lt;</span>string<span style="color: #000000; font-weight: bold;">&gt;</span>ssh2<span style="color: #000000; font-weight: bold;">&lt;/</span>string<span style="color: #000000; font-weight: bold;">&gt;</span></pre></div></div>

<p>
On relance le service :
</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># launchctl stop /System/Library/LaunchDaemons/ssh.plist</span>
<span style="color: #666666; font-style: italic;"># launchctl start /System/Library/LaunchDaemons/ssh.plist</span></pre></div></div>

<p>
Et le tour est joué. Il suffit de bien penser à se connecter sur le bon port désormais : <code>$ ssh -p 2222</code>.
</p>
<p>​</p>
<hr />
<p>
<em>Cette article est la mise-à-jour d&#8217;un billet de juillet 2008.</em></p>
]]></content:encoded>
			<wfw:commentRss>http://werk.feub.net/2011/01/changer-le-port-ssh-par-defaut-d%e2%80%99os-x/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Activer Postfix sous Mac OS X</title>
		<link>http://werk.feub.net/2011/01/activer-postfix-sous-mac-os-x/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=activer-postfix-sous-mac-os-x</link>
		<comments>http://werk.feub.net/2011/01/activer-postfix-sous-mac-os-x/#comments</comments>
		<pubDate>Sun, 16 Jan 2011 09:20:57 +0000</pubDate>
		<dc:creator>Fabien</dc:creator>
				<category><![CDATA[mac]]></category>
		<category><![CDATA[messagerie]]></category>
		<category><![CDATA[osx]]></category>
		<category><![CDATA[postfix]]></category>
		<category><![CDATA[smtp]]></category>

		<guid isPermaLink="false">http://werk.feub.net/?p=35</guid>
		<description><![CDATA[Envoyer des emails avec le serveur de messagerie de Tiger et Leopard]]></description>
			<content:encoded><![CDATA[<p>
<img src="http://werk.feub.net/medias/2010/03/finder-logo_64.png" alt="" title="" width="64" height="64" class="floatleft" />Il se peut que vous désiriez envoyer des emails en local avec le serveur SMTP de votre Mac. Les raisons peuvent être diverses, avec un portable hors de chez vous, certains fournisseurs d&#8217;accès refusent les emails sortants depuis certaines IP ou vous avez des scripts qui nécessitent l&#8217;envoi d&#8217;emails (de logs par exemple, c&#8217;est mon cas), donc il vous faut pouvoir les envoyer localement.
</p>
<p>
Mac OS X (depuis Panther) possède un serveur de messagerie, le renommé <a href="http://www.postfix.org/" title="Postfix">Postfix</a>. Nous allons voir comment le faire tourner grâce au daemon <a href="http://en.wikipedia.org/wiki/Launchd" title="Wikipedia EN">launchd</a>.<br />
Ce document décrit la mise en route de Postfix, mais ne traite pas de sa configuration, voir sa <a href="http://www.postfix.org/" title="Postfix">documentation</a> pour aller plus loin.
</p>
<p><span id="more-35"></span></p>
<p>
Les opérations suivantes doivent être réalisées en tant que <strong>root</strong>. En ce qui me concerne, j&#8217;utiliserai l&#8217;éditeur <a href="http://fr.wikipedia.org/wiki/Vim" title="Wikipedia">VIM</a>.
</p>
<h4>main.cf</h4>
<p>
La première chose à faire et d&#8217;éditer <code>main.cf</code>, le principal fichier de configuration de Postfix qui se trouve sous <code>/etc/postfix/</code>. Au préalable, il est bon de faire une copie du fichier présent.
</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># mv /etc/postfix/main.cf /etc/postfix/main.cf.fab</span>
<span style="color: #666666; font-style: italic;"># vim /etc/postfix/main.cf</span></pre></div></div>

<p>
Les paramètres <em>myhostname</em>, <em>mydomain</em>, <em>myorigin</em> et <em>mynetworks_style</em> doivent être renseignés. Le premier <em>myhostname</em> désigne la machine sur lequel tourne Postfix, il est tout à fait possible de laisser la valeur générique <em>localhost.localdomain</em>, mais je vais renseigner le <a href="http://fr.wikipedia.org/wiki/FQDN" title="Wikipedia">FQDN</a> de mon iBook sur mon réseau, représenté par le nom de la machine et du nom de domaine :
</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">myhostname = osgiliath.feub.net</pre></div></div>

<p>
Ensuite, <em>mydomain</em> comme son nom l&#8217;indique représente le (les) nom de domaine pour lequel Postfix officiera. En général, il s&#8217;agit de la partie domaine du myhostname :
</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">mydomain = feub.net</pre></div></div>

<p>
<em>myorigin</em> est le nom de domaine qui apparait dans le courrier envoyé à partir de ma machine. Il est usuel de mettre </em>myhostname</em> voir <em>mydomain</em> :
</p>

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

<p>
Postfix ne relaie le courrier que des clients autorisés, il est donc bon de lui dire de qui avec le paramètre<br />
<em>mynetworks_style</em>. Dans mon mon cas, j&#8217;autorise les machines du sous-réseau :
</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">mynetworks_style = subnet</pre></div></div>

<p>
A noter que <em>mynetworks</em> pourrait être utilisé en spécifiant une adresse de réseau autorisée à la place d&#8217;un <em>style</em>. Par exemple :
</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">mynetworks = 192.168.1.0<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">24</span></pre></div></div>

<p>
C&#8217;est l&#8217;un ou l&#8217;autre, si les deux paramètres <em>mynetworks_style</em> et <em>mynetworks</em> sont renseignés, <em>mynetworks</em> sera pris en compte.<br />
Voilà pour la configuration du <em>main.cf</em>.
</p>
<p>
Enfin, pour relayer les courriers sortants, le paramètre <em>relayhost</em> doit être renseigné avec un serveur SMTP valide sur internet, par exemple celui d&#8217;Orange :
</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">relayhost = <span style="color: #7a0874; font-weight: bold;">&#91;</span>smtp.orange.fr<span style="color: #7a0874; font-weight: bold;">&#93;</span></pre></div></div>

<h4>org.isc.named.plist</h4>
<p>
Nous allons maintenant éditer le fichier plist de lancement de Postfix. Par défaut, celui-ci n&#8217;est pas démarré, il est en mode <em>on demand</em>, et nous voulons qu&#8217;il tourne toujours. Nous allons donc éditer le fichier <code>org.postfix.master.plist</code> qui se situe sous <code>/System/Library/LaunchDaemons/</code> (il est bon d&#8217;en faire une copie de sauvegarde avant de le modifier) :
</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;</span>?xml <span style="color: #007800;">version</span>=<span style="color: #ff0000;">&quot;1.0&quot;</span> <span style="color: #007800;">encoding</span>=<span style="color: #ff0000;">&quot;UTF-8&quot;</span>?<span style="color: #000000; font-weight: bold;">&gt;</span>
<span style="color: #000000; font-weight: bold;">&lt;!</span>DOCTYPE plist PUBLIC <span style="color: #ff0000;">&quot;-//Apple Computer//DTD PLIST 1.0//EN&quot;</span>
<span style="color: #ff0000;">&quot;http://www.apple.com/DTDs/PropertyList-1.0.dtd&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span>
<span style="color: #000000; font-weight: bold;">&lt;</span>plist <span style="color: #007800;">version</span>=<span style="color: #ff0000;">&quot;1.0&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span>
<span style="color: #000000; font-weight: bold;">&lt;</span>dict<span style="color: #000000; font-weight: bold;">&gt;</span>
	<span style="color: #000000; font-weight: bold;">&lt;</span>key<span style="color: #000000; font-weight: bold;">&gt;</span>Label<span style="color: #000000; font-weight: bold;">&lt;/</span>key<span style="color: #000000; font-weight: bold;">&gt;</span>	
	<span style="color: #000000; font-weight: bold;">&lt;</span>string<span style="color: #000000; font-weight: bold;">&gt;</span>org.postfix.master<span style="color: #000000; font-weight: bold;">&lt;/</span>string<span style="color: #000000; font-weight: bold;">&gt;</span>
	<span style="color: #000000; font-weight: bold;">&lt;</span>key<span style="color: #000000; font-weight: bold;">&gt;</span>Program<span style="color: #000000; font-weight: bold;">&lt;/</span>key<span style="color: #000000; font-weight: bold;">&gt;</span>
	<span style="color: #000000; font-weight: bold;">&lt;</span>string<span style="color: #000000; font-weight: bold;">&gt;/</span>usr<span style="color: #000000; font-weight: bold;">/</span>libexec<span style="color: #000000; font-weight: bold;">/</span>postfix<span style="color: #000000; font-weight: bold;">/</span>master<span style="color: #000000; font-weight: bold;">&lt;/</span>string<span style="color: #000000; font-weight: bold;">&gt;</span>
	<span style="color: #000000; font-weight: bold;">&lt;</span>key<span style="color: #000000; font-weight: bold;">&gt;</span>ProgramArguments<span style="color: #000000; font-weight: bold;">&lt;/</span>key<span style="color: #000000; font-weight: bold;">&gt;</span>
	<span style="color: #000000; font-weight: bold;">&lt;</span>array<span style="color: #000000; font-weight: bold;">&gt;</span>
		<span style="color: #000000; font-weight: bold;">&lt;</span>string<span style="color: #000000; font-weight: bold;">&gt;</span>master<span style="color: #000000; font-weight: bold;">&lt;/</span>string<span style="color: #000000; font-weight: bold;">&gt;</span>
		<span style="color: #000000; font-weight: bold;">&lt;</span>string<span style="color: #000000; font-weight: bold;">&gt;</span>-e<span style="color: #000000; font-weight: bold;">&lt;/</span>string<span style="color: #000000; font-weight: bold;">&gt;</span>
		<span style="color: #000000; font-weight: bold;">&lt;</span>string<span style="color: #000000; font-weight: bold;">&gt;</span><span style="color: #000000;">60</span><span style="color: #000000; font-weight: bold;">&lt;/</span>string<span style="color: #000000; font-weight: bold;">&gt;</span>
	<span style="color: #000000; font-weight: bold;">&lt;/</span>array<span style="color: #000000; font-weight: bold;">&gt;</span>
	<span style="color: #000000; font-weight: bold;">&lt;</span>key<span style="color: #000000; font-weight: bold;">&gt;</span>QueueDirectories<span style="color: #000000; font-weight: bold;">&lt;/</span>key<span style="color: #000000; font-weight: bold;">&gt;</span>
	<span style="color: #000000; font-weight: bold;">&lt;</span>array<span style="color: #000000; font-weight: bold;">&gt;</span>
	<span style="color: #000000; font-weight: bold;">&lt;</span>string<span style="color: #000000; font-weight: bold;">&gt;/</span>var<span style="color: #000000; font-weight: bold;">/</span>spool<span style="color: #000000; font-weight: bold;">/</span>postfix<span style="color: #000000; font-weight: bold;">/</span>maildrop<span style="color: #000000; font-weight: bold;">&lt;/</span>string<span style="color: #000000; font-weight: bold;">&gt;</span>
	<span style="color: #000000; font-weight: bold;">&lt;/</span>array<span style="color: #000000; font-weight: bold;">&gt;</span>
	<span style="color: #000000; font-weight: bold;">&lt;</span>key<span style="color: #000000; font-weight: bold;">&gt;</span>OnDemand<span style="color: #000000; font-weight: bold;">&lt;/</span>key<span style="color: #000000; font-weight: bold;">&gt;</span>
	<span style="color: #000000; font-weight: bold;">&lt;</span>true<span style="color: #000000; font-weight: bold;">/&gt;</span>
<span style="color: #000000; font-weight: bold;">&lt;/</span>dict<span style="color: #000000; font-weight: bold;">&gt;</span>
<span style="color: #000000; font-weight: bold;">&lt;/</span>plist<span style="color: #000000; font-weight: bold;">&gt;</span></pre></div></div>

<p>
Il faut supprimer les paramètres <em>-e 60</em> et dire au daemon qu&#8217;on ne veut pas le démarrer <em>OnDemand</em>, mais en <em>RunAtLoad</em>, car on veut qu&#8217;il soit toujours en fonctionnement. Voici donc le fichier modifié :
</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;</span>?xml <span style="color: #007800;">version</span>=<span style="color: #ff0000;">&quot;1.0&quot;</span> <span style="color: #007800;">encoding</span>=<span style="color: #ff0000;">&quot;UTF-8&quot;</span>?<span style="color: #000000; font-weight: bold;">&gt;</span>
<span style="color: #000000; font-weight: bold;">&lt;!</span>DOCTYPE plist PUBLIC <span style="color: #ff0000;">&quot;-//Apple Computer//DTD PLIST 1.0//EN&quot;</span>
<span style="color: #ff0000;">&quot;http://www.apple.com/DTDs/PropertyList-1.0.dtd&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span>
<span style="color: #000000; font-weight: bold;">&lt;</span>plist <span style="color: #007800;">version</span>=<span style="color: #ff0000;">&quot;1.0&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span>
<span style="color: #000000; font-weight: bold;">&lt;</span>dict<span style="color: #000000; font-weight: bold;">&gt;</span>
	<span style="color: #000000; font-weight: bold;">&lt;</span>key<span style="color: #000000; font-weight: bold;">&gt;</span>Label<span style="color: #000000; font-weight: bold;">&lt;/</span>key<span style="color: #000000; font-weight: bold;">&gt;</span>
  	<span style="color: #000000; font-weight: bold;">&lt;</span>string<span style="color: #000000; font-weight: bold;">&gt;</span>org.postfix.master<span style="color: #000000; font-weight: bold;">&lt;/</span>string<span style="color: #000000; font-weight: bold;">&gt;</span>
  	<span style="color: #000000; font-weight: bold;">&lt;</span>key<span style="color: #000000; font-weight: bold;">&gt;</span>Program<span style="color: #000000; font-weight: bold;">&lt;/</span>key<span style="color: #000000; font-weight: bold;">&gt;</span>
  	<span style="color: #000000; font-weight: bold;">&lt;</span>string<span style="color: #000000; font-weight: bold;">&gt;/</span>usr<span style="color: #000000; font-weight: bold;">/</span>libexec<span style="color: #000000; font-weight: bold;">/</span>postfix<span style="color: #000000; font-weight: bold;">/</span>master<span style="color: #000000; font-weight: bold;">&lt;/</span>string<span style="color: #000000; font-weight: bold;">&gt;</span>
  	<span style="color: #000000; font-weight: bold;">&lt;</span>key<span style="color: #000000; font-weight: bold;">&gt;</span>ProgramArguments<span style="color: #000000; font-weight: bold;">&lt;/</span>key<span style="color: #000000; font-weight: bold;">&gt;</span>
  	<span style="color: #000000; font-weight: bold;">&lt;</span>array<span style="color: #000000; font-weight: bold;">&gt;</span>
  		<span style="color: #000000; font-weight: bold;">&lt;</span>string<span style="color: #000000; font-weight: bold;">&gt;</span>master<span style="color: #000000; font-weight: bold;">&lt;/</span>string<span style="color: #000000; font-weight: bold;">&gt;</span>
  	<span style="color: #000000; font-weight: bold;">&lt;/</span>array<span style="color: #000000; font-weight: bold;">&gt;</span>
  	<span style="color: #000000; font-weight: bold;">&lt;</span>key<span style="color: #000000; font-weight: bold;">&gt;</span>QueueDirectories<span style="color: #000000; font-weight: bold;">&lt;/</span>key<span style="color: #000000; font-weight: bold;">&gt;</span>
  	<span style="color: #000000; font-weight: bold;">&lt;</span>array<span style="color: #000000; font-weight: bold;">&gt;</span>
  		<span style="color: #000000; font-weight: bold;">&lt;</span>string<span style="color: #000000; font-weight: bold;">&gt;/</span>var<span style="color: #000000; font-weight: bold;">/</span>spool<span style="color: #000000; font-weight: bold;">/</span>postfix<span style="color: #000000; font-weight: bold;">/</span>maildrop<span style="color: #000000; font-weight: bold;">&lt;/</span>string<span style="color: #000000; font-weight: bold;">&gt;</span>
  	<span style="color: #000000; font-weight: bold;">&lt;/</span>array<span style="color: #000000; font-weight: bold;">&gt;</span>
  	<span style="color: #000000; font-weight: bold;">&lt;</span>key<span style="color: #000000; font-weight: bold;">&gt;</span>RunAtLoad<span style="color: #000000; font-weight: bold;">&lt;/</span>key<span style="color: #000000; font-weight: bold;">&gt;</span>
	<span style="color: #000000; font-weight: bold;">&lt;</span>true<span style="color: #000000; font-weight: bold;">/&gt;</span>
<span style="color: #000000; font-weight: bold;">&lt;/</span>dict<span style="color: #000000; font-weight: bold;">&gt;</span>
<span style="color: #000000; font-weight: bold;">&lt;/</span>plist<span style="color: #000000; font-weight: bold;">&gt;</span></pre></div></div>

<p>
Il faut maintenant démarrer ou redémarrer Postfix à l&#8217;aide de launchd :
</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># launchctl stop org.postfix.master</span>
<span style="color: #666666; font-style: italic;"># launchctl start org.postfix.master</span></pre></div></div>

<p>
Pour voir si Postfix fonctionne, envoyer un email comme ceci :
</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># date | mail -s test nom @ mon@adresse.net</span></pre></div></div>

<p>
Si cela ne fonctionne pas, voir les logs sous <em>/var/log/mail.log</em>.
</pre>
<h4>Utiliser le serveur comme SMTP local</h4>
<p>
Il est maintenant possible d'utiliser Postfix comme serveur SMTP pour le courrier sortant. Pour ce faire, il faut mettre <em>localhost</em> comme serveur SMTP dans Mail.app ou tout autre client de messagerie.
</p>
<hr />
<p>
<em>Cette article est la mise-à-jour d'un billet du 22 juillet 2008.</em></p>
]]></content:encoded>
			<wfw:commentRss>http://werk.feub.net/2011/01/activer-postfix-sous-mac-os-x/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Activer SNMP sous Leopard</title>
		<link>http://werk.feub.net/2008/07/activer-snmp-sous-leopard/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=activer-snmp-sous-leopard</link>
		<comments>http://werk.feub.net/2008/07/activer-snmp-sous-leopard/#comments</comments>
		<pubDate>Fri, 04 Jul 2008 05:58:02 +0000</pubDate>
		<dc:creator>Fabien</dc:creator>
				<category><![CDATA[mac]]></category>
		<category><![CDATA[leopard]]></category>
		<category><![CDATA[osx]]></category>
		<category><![CDATA[snmp]]></category>

		<guid isPermaLink="false">http://werk.feub.net/?p=41</guid>
		<description><![CDATA[Rendre votre Mac monitorable]]></description>
			<content:encoded><![CDATA[<p>
<a href="http://fr.wikipedia.org/wiki/Snmp" title="Wikipedia">SNMP</a> est l&#8217;acronyme pour Simple Network Management Protocol, un protocole réseau qui permet de surveiller et de gérer des équipements réseaux (pour peu que ceux-ci prennent en charge ce protocole). Pour une vue plus détaillée de SNMP, je vous renvoie à des sources sures, comme le site de <a href="http://christian.caleca.free.fr/snmp/" title="Christian Caleca">Christian Caleca</a>, car ici nous allons juste voir comment activer le daemon SNMP sous <a href="http://www.apple.com/fr/macosx/" title="Apple">Mac OS X 10.5</a>.
</p>
<p>
Sous Mac OS X 10.5, SNMP est géré par le programme de démarrage système <a href="http://developer.apple.com/macosx/launchd.html" title="Apple">launchd</a>, celui-ci se manipule avec la commande launchctl, nous allons donc charger le daemon SNMP comme suit :
</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># launchctl load /System/Library/LaunchDaemons/org.net-snmp.snmpd.plist</span></pre></div></div>

<p>
Mais il existe un utilitaire GUI fort pratique pour manipuler les programmes gérés par launchd, il s&#8217;agit de <a href="http://lingon.sourceforge.net/" title="Peter Berg">Lingon</a>. Une fois lancé, déplier <i>System Daemons</i> et sélectionner <i>org.net-snmp.snmpd</i>, cocher <i>Enabled</i> et <i>Keep it running all the time no matter what happens</i> pour que le daemon tourne au démarrage de la machine quoi qu&#8217;il arrive. Sauvegarder et quitter Lingon.
</p>
<div class="image">
<img src="http://werk.feub.net/medias/2008/07/20080704-lingon-540.png" alt="20080704-lingon-540" width="540" height="505" /><br />
Lingon
</div>
<p>
Pour vérifier que le daemon tourne :
</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># ps ax | grep snmpd</span></pre></div></div>

<p>
Qui doit retourner quelque chose comme : <code>2223   ??  Ss     0:00.06 snmpd -f</code>.<br />
Pour stopper snmpd, utiliser la même commande launchctl mais avec <code>unload</code>. S&#8217;il ne tourne pas, rebooter la machine.</p>
]]></content:encoded>
			<wfw:commentRss>http://werk.feub.net/2008/07/activer-snmp-sous-leopard/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using apc (Feed is rejected)
Page Caching using apc
Object Caching 306/330 objects using memcached

Served from: werk.feub.net @ 2012-02-05 21:14:38 -->
