SPF for Gmail

I had a problem that mail sent from one gmail account to another got bounced back. It shows in the bounced mail that there was a softfail happened.

“mydomain” does not designate xxx.xxx.xxx.xxx as permitted sender

and xxx.xxx.xxx.xxx belongs to one of the gmail’s mail server.

It seems that the gmail server sent the email was not recognized as a valid sender…

Then I found this page,

http://support.google.com/a/bin/answer.py?hl=en&answer=60764

It needs to add “include:_spf.google.com” in the SPF!

bg

To suspend the command just run

Ctrl + Z

Then use bg command to put in the background

Ex.
find / -name “syslog”

>Ctrl + z

[1]+ Stopped find / -name “syslog”

>jobs
[1]+ Stopped find / -name “syslog”

>bg %1
[1]+ find / -name “syslog” &

Setup Lighttpd for Vedio Streaming

Lighttpd is said that much lighter that Apache. I tried to set it up for flv and H.264 streaming. The configuration is relatively easy.

1. Download lighttpd-1.4.29.tar.gz

2. Download lighttpd-1.4.18_mod_h264_streaming-2.2.0.tar.gz
(This is the patch for mod_h264)

3. Open tar ball of lighttpd
tar zxvf lighttpd-1.4.29.tar.gz

4. Patch h264-mod
mv lighttpd-1.4.29 lighttpd-1.4.18
tar zxvf lighttpd-1.4.18_mod_h264_streaming-2.2.0.tar.gz

5. config /etc/lighttpd.conf
basic setup:

server.port = 80
server.username = “lighttpd”
server.groupname = “lighttpd”
server.document-root = “/var/www”
server.tag = “lighttpd”
server.pid-file = “/var/run/lighttpd.pid”
server.errorlog = “/var/log/lighttpd/error.log”
include “conf.d/access_log.conf”
index-file.names += (
“index.html”, “index.htm”, “index.php”
)
include “conf.d/mime.conf”

6. module.conf
server.modules = (
“mod_access”,
“mod_fastcgi”,
“mod_h264_streaming”,
“mod_flv_streaming”,
“mod_rewrite”,
“mod_auth”,
)
h264-streaming.extensions = ( “.mp4” )
flv-streaming.extensions = ( “.flv” )

7. Setup vhost
There’re many samples out there for this part already, so I won’t write any here.

8. FCGI
I had FCGI installed in advance. To have lighttpd uses FCGI, edit

conf.d/fastcgi.conf

fastcgi.server = (
“.php” =>
(( “host” => “127.0.0.1”,
“port” => 81,
“bin-path” => “/usr/local/bin/php”
)),
)
9. restart lighttpd
Then you can see the lighttpd started fcgi process

10. Use jwplayer
download mediaplayer.zip
unzip it and copy “jwplayer.js” and “player.swf” to a folder under docroot of the site
check the “JW Player Quick Start Guide.pdf” in the zip file for how to use javascript to embed jwplayer to stream.

Yum Repo

Setup /etc/yum.conf
“man yum.conf” is useful to learn all the options

Yum repos are located under
/etc/yum.repos.d

$releasever is decided by distroverpkg in /etc/yum.conf
distroverpkg=redhat-release is set as default
how to get value of distroverpkg
yum whatprovides redhat-release

how to change $arch
man setarch

Yum with multiple repos
http://blog.chrisramsay.co.uk/2009/08/14/yum-with-multiple-repos-yum-plugin-priorities-on-centos/