<?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>Linux and Virtualization &#187; google</title>
	<atom:link href="http://fclose.com/b/linux/tag/google/feed/" rel="self" type="application/rss+xml" />
	<link>http://fclose.com/b/linux</link>
	<description>Clear solutions, tutorials and tips on Linux and virtualization from the author&#039;s experience with clusters.</description>
	<lastBuildDate>Sat, 04 Feb 2012 04:40:21 +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>Using Google Apps Account for GTalk in Pidgin</title>
		<link>http://fclose.com/b/linux/1641/using-google-apps-account-for-gtalk-in-pidgin/</link>
		<comments>http://fclose.com/b/linux/1641/using-google-apps-account-for-gtalk-in-pidgin/#comments</comments>
		<pubDate>Tue, 11 May 2010 06:01:05 +0000</pubDate>
		<dc:creator>Zhiqiang Ma</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Client config]]></category>
		<category><![CDATA[Fedora]]></category>
		<category><![CDATA[gnome]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[Tutorial]]></category>

		<guid isPermaLink="false">http://zhiqiangma.info/?p=1641</guid>
		<description><![CDATA[I believe many users are using pidgin and google apps. Google apps support Google Talk. Can we use it in Pidgin? The answer is yes. How to use Google apps account for Google Talk in Pidgin will be introduced in this post. Let&#8217;s use my email address as the exapmle: eric[at]zhiqiangma.info First add a new [...]]]></description>
			<content:encoded><![CDATA[<p>I believe many users are using pidgin and google apps. Google apps support Google Talk. Can we use it in Pidgin? The answer is yes. How to use Google apps account for Google Talk in Pidgin will be introduced in this post.</p>
<p>Let&#8217;s use my email address as the exapmle: eric[at]zhiqiangma.info<br />
First add a new account in Pidgin. The configure the new account like this:<br />
Basic Tab:</p>
<pre>Protocol: XMPP
Username: eric (First half of Email address)
Domain: zhiqiangma.info (Second half of Email address)
Resource: gmail.com
</pre>
<p>Advanced Tab:</p>
<pre>Connect port: 5222
Connect server: talk.google.com
File transfer proxies: proxy.eu.jabber.org
</pre>
]]></content:encoded>
			<wfw:commentRss>http://fclose.com/b/linux/1641/using-google-apps-account-for-gtalk-in-pidgin/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Sending Email from mailx Command in Linux Using Gmail’s SMTP</title>
		<link>http://fclose.com/b/linux/1411/sending-email-from-mailx-command-in-linux-using-gmails-smtp/</link>
		<comments>http://fclose.com/b/linux/1411/sending-email-from-mailx-command-in-linux-using-gmails-smtp/#comments</comments>
		<pubDate>Wed, 10 Mar 2010 13:24:46 +0000</pubDate>
		<dc:creator>Zhiqiang Ma</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Bash]]></category>
		<category><![CDATA[Client config]]></category>
		<category><![CDATA[Command line]]></category>
		<category><![CDATA[Fedora]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[Server config]]></category>
		<category><![CDATA[Tutorial]]></category>

		<guid isPermaLink="false">http://zhiqiangma.info/?p=1411</guid>
		<description><![CDATA[mailx or mail command in Linux is still providing service for guys like me, especially when we need to send email automatically by script. gmail is great. Now, how to use gmail&#8217;s smtp in mailx/mail? gmail is a little special since gmail&#8217;s smtp server requires tls authorization. The good news is that mailx supports it. [...]]]></description>
			<content:encoded><![CDATA[<p>mailx or mail command in Linux is still providing service for guys like me, especially when we need to send email automatically by script. gmail is great. Now, how to use gmail&#8217;s smtp in mailx/mail? gmail is a little special since gmail&#8217;s smtp server requires tls authorization. The good news is that mailx supports it. Let&#8217;s look at how to use it.</p>
<p>First, find out Fixforx&#8217;s profile directory in the home directory (I believe most of the users on Linux use Firefox. If you are not using Firefox, what you need to do is try it ;) . It has a format like this:</p>
<pre>~/.mozilla/firefox/xxxxxxxx.default</pre>
<p>xxxxxxxx is a random string that&#8217;s different for different users. You can easily find it out by looking into the directory <em>~/.mozilla/firefox</em>.</p>
<p>There are two ways to do this: using all-in-one command or putting configurations into profile. The all-in-one-command way needs no other configurations except the command line itself, while the way using configuration has a clearer command.</p>
<h3>All-in-one command</h3>
<p>This is an all-in-one command that sends email to $TO_EMAIL_ADDRESS</p>
<pre>mailx -v -s "$EMAIL_SUBJECT"
-S smtp-use-starttls
-S ssl-verify=ignore
-S smtp-auth=login
-S smtp=smtp://smtp.gmail.com:587
-S from="$FROM_EMAIL_ADDRESS($FRIENDLY_NAME)"
-S smtp-auth-user=$FROM_EMAIL_ADDRESS
-S smtp-auth-password=$EMAIL_ACCOUNT_PASSWORD
-S ssl-verify=ignore
-S nss-config-dir=~/.mozilla/firefox/xxxxxxxx.default/
$TO_EMAIL_ADDRESS</pre>
<p>Replace the $XXX with the value that is actually used. The meaning is obvious. And remember to change xxxxxxxx to the string that&#8217;s part of the Firefox profile directory.</p>
<p>This command will ask for the email content. Type in the mail content and after finishing the email, use &#8220;Ctrl+d&#8221; to tell mailx you have finished. Then this mail will be sent out through gmail&#8217;s smtp server. You can also use pipe like this:</p>
<pre>echo "The mail content" | mail -v -s ...</pre>
<h3>Use configuration file</h3>
<p>There are too many options in the above command? Yes&#8230; I must confess so. We can write most of them into mailx/mail&#8217;s configuration file <em>~/.mailrc</em></p>
<pre>set smtp-use-starttls
set nss-config-dir=~/.mozilla/firefox/xxxxxxxx.default/
set ssl-verify=ignore
set smtp=smtp://smtp.gmail.com:587
set smtp-auth=login
set smtp-auth-user=$FROM_EMAIL_ADDRESS
set smtp-auth-password=$EMAIL_ACCOUNT_PASSWORD
set from="$FROM_EMAIL_ADDRESS($FRIENDLY_NAME)"</pre>
<p>Change the $XXX and xxxxxxx to the right value for you. When sending mails, use this command:</p>
<pre>mailx -v -s "$EMAIL_SUBJECT" $TO_EMAIL_ADDRESS</pre>
<p>Then, time to enjoy it!</p>
<p><span style="font-size: x-small;"><strong>Update history </strong>Mar. 11 2010 Apr. 29 2010. Add title. Jul. 12, 2010. Revise the article. Jul. 26, 2010. Add highlight colour to pre tags.<br />
</span></p>
]]></content:encoded>
			<wfw:commentRss>http://fclose.com/b/linux/1411/sending-email-from-mailx-command-in-linux-using-gmails-smtp/feed/</wfw:commentRss>
		<slash:comments>16</slash:comments>
		</item>
		<item>
		<title>Configure mailx to Use Gmail’s smtp</title>
		<link>http://fclose.com/b/linux/125/%e9%85%8d%e7%bd%aemailx%e4%bd%bf%e7%94%a8gmail%e7%9a%84smtp/</link>
		<comments>http://fclose.com/b/linux/125/%e9%85%8d%e7%bd%aemailx%e4%bd%bf%e7%94%a8gmail%e7%9a%84smtp/#comments</comments>
		<pubDate>Tue, 10 Mar 2009 02:20:00 +0000</pubDate>
		<dc:creator>Zhiqiang Ma</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Client config]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[mailx]]></category>
		<category><![CDATA[Server config]]></category>
		<category><![CDATA[smtp]]></category>

		<guid isPermaLink="false">http://zhiqiangma.info/%e9%85%8d%e7%bd%aemailx%e4%bd%bf%e7%94%a8gmail%e7%9a%84smtp/</guid>
		<description><![CDATA[The updated English version of this post: sending-email-from-mailx-command-in-linux-using-gmails-smtp/ 在~/.mailrc中设置如下: set smtp-use-starttls set nss-config-dir=~/.mozilla/firefox/9jkisjeo.default set ssl-verify=ignore set smtp=smtp://smtp.gmail.com:587 set smtp-auth=login set smtp-auth-user=USER_NAME@gmail.com set smtp-auth-password=PASSWORD set from="USERNAME@gmail.com(NAME)" # sendwait nss-config-dir中设置为自己相关的firefox目录, 要使用到其中的cert8.db等几个文件. 很明显了. ========================== 其实我配置smtp.gmail.com主要看中可能利用shell来批量发送邮件. 这是我的一个批量上传文件的脚本: #!/bin/bash # transfer many files via attachment # you must set up mailx to be able to email # author Eric Z.Q. [...]]]></description>
			<content:encoded><![CDATA[<p>The updated English version of this post:</p>
<p><a href="1411/sending-email-from-mailx-command-in-linux-using-gmails-smtp/">sending-email-from-mailx-command-in-linux-using-gmails-smtp/</a></p>
<p>在~/.mailrc中设置如下:</p>
<pre>set smtp-use-starttls
set nss-config-dir=~/.mozilla/firefox/9jkisjeo.default
set ssl-verify=ignore
set smtp=smtp://smtp.gmail.com:587
set smtp-auth=login
set smtp-auth-user=USER_NAME@gmail.com
set smtp-auth-password=PASSWORD
set from="USERNAME@gmail.com(NAME)"
# sendwait</pre>
<p>nss-config-dir中设置为自己相关的firefox目录, 要使用到其中的cert8.db等几个文件.<br />
很明显了.</p>
<p>==========================</p>
<p>其实我配置smtp.gmail.com主要看中可能利用shell来批量发送邮件.<br />
这是我的一个批量上传文件的脚本:</p>
<pre><span style="color: #000099">#!/bin/bash

# transfer many files via attachment
# you must set up mailx to be able to email

# author Eric Z.Q. Ma eric.zq.ma@gmail.com
# Feb. 25 2009
</span>
echo<span style="color: #009900"> "Please enter the message sent with mail:"</span>
read message
echo<span style="color: #009900"> "Please enter the email address you mail to:"</span>
read address<span style="color: #000099">
# echo Please enter the email address to reply:
# read reply
</span><span style="color: #ff0000">
if</span><strong><span style="color: #663300"> [[</span></strong> $address<strong><span style="color: #663300"> ==</span></strong><span style="color: #009900"> ""</span><strong><span style="color: #663300"> ]]</span></strong>
then
    address<strong><span style="color: #663300">=</span></strong><span style="color: #009900">"username@gmail.com"</span>
fi<span style="color: #000099">

# if [[ $reply == "" ]]
# then
#     rreply=""
# else
#    rreply="-r $reply"
# fi
</span>
echo<span style="color: #009900"> "Please select the transfer type:"</span>
echo<span style="color: #009900"> "1. wait for the last email transferred before transfer another one."</span>
echo<span style="color: #009900"> "2. transfer several emails at one time and wait a constant time."</span>
read transferType                                                                                                                                    

WAIT_COUNT<strong><span style="color: #663300">=-</span></strong><span style="color: #999900">1</span>
WAIT_TIME<strong><span style="color: #663300">=</span></strong><span style="color: #999900">0</span><span style="color: #000099">
# set envs
</span>sendwait<strong><span style="color: #663300">=</span></strong>no<span style="color: #ff0000">

if</span><strong><span style="color: #663300"> [[</span></strong> $transferType<strong><span style="color: #663300"> ==</span></strong><span style="color: #999900"> 2</span><strong><span style="color: #663300"> ]]</span></strong>
then
    echo<span style="color: #009900"> "Please enter the number of mails transfer at one time:"</span>
    read WAIT_COUNT
    echo<span style="color: #009900"> "Please enter the time for waiting (s):"</span>
    read WAIT_TIME<span style="color: #000099">
# set envs
</span>    sendwait<strong><span style="color: #663300">=</span></strong>yes
fi

echo<span style="color: #009900"> "Transfer begins."</span>

count<strong><span style="color: #663300">=</span></strong><span style="color: #999900">0</span>

until<strong><span style="color: #663300"> [[</span></strong> $<span style="color: #999900">1</span><strong><span style="color: #663300"> ==</span></strong><span style="color: #009900"> ""</span><strong><span style="color: #663300"> ]]</span></strong><span style="color: #ff0000">
do</span>
    file<strong><span style="color: #663300">=</span></strong><span style="color: #009900">"$1"</span><span style="color: #000099">
    # echo $file
</span><span style="color: #ff0000">    if</span><strong><span style="color: #663300"> [ -</span></strong>f<span style="color: #009900"> "$file"</span><strong><span style="color: #663300"> ]</span></strong>
    then
        echo<span style="color: #009900"> "mail  $file  to  $address"</span>  # from  $reply<span style="color: #000099">
#       echo "$file -- $message" | mailx -s "$file -- $message" -a "$file"  $rreply $address
</span>        echo<span style="color: #009900"> "$file -- $message"</span><strong><span style="color: #663300"> |</span></strong> env sendwait<strong><span style="color: #663300">=</span></strong>$sendwait mailx<strong><span style="color: #663300"> -</span></strong>s<span style="color: #009900"> "$file -- $message"</span><strong><span style="color: #663300"> -</span></strong>a<span style="color: #009900"> "$file"</span> $address
    fi
    let<span style="color: #009900"> "count=count+1"</span><span style="color: #ff0000">
    if</span><strong><span style="color: #663300"> [[</span></strong> $count<strong><span style="color: #663300"> ==</span></strong> $WAIT_COUNT<strong><span style="color: #663300"> ]]</span></strong>
    then
        count<strong><span style="color: #663300">=</span></strong><span style="color: #999900">0</span>
        echo<span style="color: #009900"> "Wait $WAIT_TIME seconds to transfer the last $WAIT_COUNT mails."</span>
        echo<span style="color: #009900"> ""</span>
        sleep $WAIT_TIME
    fi
    shift
done</pre>
]]></content:encoded>
			<wfw:commentRss>http://fclose.com/b/linux/125/%e9%85%8d%e7%bd%aemailx%e4%bd%bf%e7%94%a8gmail%e7%9a%84smtp/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

