<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[iRedMail — trackLastLogin.sh doesn't update all fields with mysql]]></title>
		<link>http://www.iredmail.org/forum/topic522-tracklastloginsh-doesnt-update-all-fields-with-mysql.html</link>
		<atom:link href="http://www.iredmail.org/forum/feed-rss-topic522.xml" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in trackLastLogin.sh doesn't update all fields with mysql.]]></description>
		<lastBuildDate>Sat, 02 Jan 2010 10:20:46 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[trackLastLogin.sh doesn't update all fields with mysql]]></title>
			<link>http://www.iredmail.org/forum/post2204.html#p2204</link>
			<description><![CDATA[<p>the provided script here <a href="http://iredmail.googlecode.com/hg/extra/trackLastLogin.sh">http://iredmail.googlecode.com/hg/extra … stLogin.sh</a> has a problem with mysql. the fields `lastlogindate`and `lastloginipv4` are not set due to the &quot;&quot; around the two functions in the update statement.&nbsp; </p><p>the following should be changed</p><p><strong>old</strong><br /></p><div class="codebox"><pre><code>#if [ X&quot;${USER}&quot; != X&quot;dump-capability&quot; ]; then 
#   mysql -u${MYSQL_USER} -p${PASSWD} ${VMAIL_DB_NAME} &gt;/dev/null 2&gt;&amp;1 &lt;&lt;EOF 
#       UPDATE mailbox SET \ 
#       lastloginipv4=&quot;INET_ATON(&#039;$IP&#039;)&quot;, \ 
#       lastlogindate=&quot;NOW()&quot;, \ 
#       lastloginprotocol=&quot;${1}&quot; \ 
#       WHERE username=&#039;$USER&#039;; 
#EOF 
#fi</code></pre></div><p><strong>new</strong><br /></p><div class="codebox"><pre><code>#if [ X&quot;${USER}&quot; != X&quot;dump-capability&quot; ]; then 
#   mysql -u${MYSQL_USER} -p${PASSWD} ${VMAIL_DB_NAME} &gt;/dev/null 2&gt;&amp;1 &lt;&lt;EOF 
#       UPDATE mailbox SET \ 
#       lastloginipv4=INET_ATON(&#039;$IP&#039;), \ 
#       lastlogindate=NOW(), \ 
#       lastloginprotocol=&quot;${1}&quot; \ 
#       WHERE username=&#039;$USER&#039;; 
#EOF 
#fi</code></pre></div><p>now the both fields are updated right, else they are not updated at all only `lastloginprotocol`is updated else</p>]]></description>
			<author><![CDATA[null@example.com (BigMichi1)]]></author>
			<pubDate>Sat, 02 Jan 2010 10:20:46 +0000</pubDate>
			<guid>http://www.iredmail.org/forum/post2204.html#p2204</guid>
		</item>
	</channel>
</rss>
