Outlook Disable “reply-to-all/forward”

A long time I was enthusiastic about the fact that with Lotus Notes you were able to disable “reply-to-all” in a mail. After some search on Google, I noticed, that is also possible with MS Outlook. Scott Hanselman wrote a nice article on his weblog:

http://www.hanselman.com/blog/HowToEasilyDisableReplyToAllAndForwardInOutlook.aspx

To make it more user friendly, I modified the code a little bit:

Sub NoReplyAll()
‘——————————————————————–
‘Disable reply to all/forward options from a mail
‘This code is taken from

‘ http://www.hanselman.com/blog/HowToEasilyDisableReplyToAllAndForwardInOutlook.aspx

‘and some small modifications are applied by Pieter de Rijk

‘ http://blog.adslweb.net
‘——————————————————————–

If ActiveInspector.CurrentItem.Actions(“Reply to All”).Enabled = True Then

‘Check the status if Reply-to-All is enabled, so we disable it
ActiveInspector.CurrentItem.Actions(“Reply to All”).Enabled = False
ActiveInspector.CurrentItem.Actions(“Forward”).Enabled = False

‘Give a prompt that it is disabled
MsgBox “Reply to all/Forward is disabled”, vbInformation, “Reply to all/Forward”
Else
‘The Reply-to-All is disabled, so enable it again
ActiveInspector.CurrentItem.Actions(“Reply to All”).Enabled = True
ActiveInspector.CurrentItem.Actions(“Forward”).Enabled = True
‘Prompt that we enabled it again
MsgBox “Reply to all/Forward is enabled”, vbExclamation, “Reply to all/Forward”
End If

End Sub

RaspBMC not creating view/triggers on MySQL

To offload my RaspBerry Pi with RaspBMC, I move away from the internal SQLite database to my MySQL server (as described on the XBMC Wiki).

After adding new sources and scraping the content… nothing showed up in the Movies overview… while the tables were populated…

In the xbmc.log file I found the following clue:

21:06:59 T:2928669760   ERROR: SQL: The table does not exist
                                      Query: select * from movieview
21:06:59 T:2928669760   ERROR: GetMoviesByWhere failed

 And after investigation, I noticed that there were no views defined in the schema.

To do a quick analysis on the sqllite database, I installed the SQLite Manager plugin for Firefox and found 4 views… and there I found the create statement for these views… so I simply copy-and-paste it into mysql… and it worked…

Unfortunately I was not able to insert the triggers that way… still have to find it out..

According to Bug ticket #13959 on the XBMC-Trac site, this was caused because I was a MySQL version < 5.16…. which was true… it was 5.0.something, so I upgraded my MySQL to version 5.1.67, and guess what… that did not work either…

So something goes “weird”, but looking into the source code didn’t gave me a clue so far… so up for further investigation…


The code to create the views:

CREATE VIEW episodeview AS SELECT   episode.*,  files.strFileName AS
strFileName,  path.strPath AS strPath,  files.playCount AS playCount, 
files.lastPlayed AS lastPlayed,  files.dateAdded AS dateAdded, 
tvshow.c00 AS strTitle,  tvshow.c14 AS strStudio,  tvshow.c05 AS
premiered,  tvshow.c13 AS mpaa,  tvshow.c16 AS strShowPath,  
bookmark.timeInSeconds AS resumeTimeInSeconds,  
bookmark.totalTimeInSeconds AS totalTimeInSeconds,   seasons.idSeason AS
idSeason FROM episode  JOIN files ON    files.idFile=episode.idFile 
JOIN tvshow ON    tvshow.idShow=episode.idShow  LEFT JOIN seasons ON   
seasons.idShow=episode.idShow AND seasons.season=episode.c12  JOIN path
ON    files.idPath=path.idPath  LEFT JOIN bookmark ON   
bookmark.idFile=episode.idFile AND bookmark.type=1;

CREATE VIEW
movieview AS SELECT  movie.*,  sets.strSet AS strSet,  files.strFileName
AS strFileName,  path.strPath AS strPath,  files.playCount AS
playCount,  files.lastPlayed AS lastPlayed,   files.dateAdded AS
dateAdded,   bookmark.timeInSeconds AS resumeTimeInSeconds,  
bookmark.totalTimeInSeconds AS totalTimeInSeconds FROM movie  LEFT JOIN
sets ON    sets.idSet = movie.idSet  JOIN files ON   
files.idFile=movie.idFile  JOIN path ON    path.idPath=files.idPath 
LEFT JOIN bookmark ON    bookmark.idFile=movie.idFile AND
bookmark.type=1;

CREATE VIEW movieview AS SELECT  movie.*, 
sets.strSet AS strSet,  files.strFileName AS strFileName,  path.strPath
AS strPath,  files.playCount AS playCount,  files.lastPlayed AS
lastPlayed,   files.dateAdded AS dateAdded,   bookmark.timeInSeconds AS
resumeTimeInSeconds,   bookmark.totalTimeInSeconds AS totalTimeInSeconds
FROM movie  LEFT JOIN sets ON    sets.idSet = movie.idSet  JOIN files
ON    files.idFile=movie.idFile  JOIN path ON   
path.idPath=files.idPath  LEFT JOIN bookmark ON   
bookmark.idFile=movie.idFile AND bookmark.type=1;

CREATE VIEW
tvshowview AS SELECT   tvshow.*,  path.strPath AS strPath, 
path.dateAdded AS dateAdded,  MAX(files.lastPlayed) AS lastPlayed, 
NULLIF(COUNT(episode.c12), 0) AS totalCount,  COUNT(files.playCount) AS
watchedcount,  NULLIF(COUNT(DISTINCT(episode.c12)), 0) AS totalSeasons
FROM tvshow  LEFT JOIN tvshowlinkpath ON   
tvshowlinkpath.idShow=tvshow.idShow  LEFT JOIN path ON   
path.idPath=tvshowlinkpath.idPath  LEFT JOIN episode ON   
episode.idShow=tvshow.idShow  LEFT JOIN files ON   
files.idFile=episode.idFile GROUP BY tvshow.idShow;

Splunk authentication scripts – missing the e-mail field

Recently I have been playing with Splunk’s Authenticationscript to retrieve information via Centrify DC, alhtough I noticed that an item for a user which is available in the webinterface for new users, is not available for users “created” via an authentication script.

If you read the specification the output of getUserInfo is:

--status=success|fail --userInfo=<userId>;<username>;<realname>;<roles> 

So for example:

--status=success|fail --userInfo=;pieter;Pieter de Rijk;admin

While in the webinterface you can also enter an e-mail address, so I raised a request with Splunk to get the e-mail address also populated via the authenticationscript-feature and it is picked up as an enhancement request. :-)

I proposed the following output, so the authenticationscript stays backwards compatible:

--status=success|fail --userInfo=<userId>;<username>;<realname>:<mail-addres>;<roles>

So some output like (no comma, because that is used within a lot of companies with the DisplayName attribute like: “Rijk, Pieter de”):

--status=success|fail --userInfo=;pieter;Pieter de Rijk:[email protected];admin

Gluster replace a brick that is replicated

I currently have a GlusterFS setup where the bricks are replicated, although brick 8 was having bad-sector issues, so should get replaced asap. After some searching I did not find how to do it… but is it pretty simple…

 gluster volume replace-brick GlusterVolume node1:/usr/glusterfs/brick_1_8 node1:/usr/glusterfs/brick_1_13 start

Depending on the speed of the disks (2TB USB disks in my case) it takes some while, you can monitor the status via:

gluster volume replace-brick GlusterVolume node1:/usr/glusterfs/brick_1_8 node1:/usr/glusterfs/brick_1_13 status

Once the replacing is “done” you simply do a commit to finalize the replacing:

gluster volume replace-brick GlusterVolume node1:/usr/glusterfs/brick_1_8 node1:/usr/glusterfs/brick_1_13 commit

That’s all :-)

YUM repo fails with koji/mock when base URL is used

Recently I started playing around with Koji for package building.

Everything was set-up pretty fast… but the first attempts to build a build-root failed…

After some troubleshooting I found the cause…

If you use the repo-data as available on an installation ISO (served via a webserver) and use mergerepos the location of an RPM will look like:

<location xml:base="CentOS" href="pam-0.99.6.2-6.el5_5.2.x86_64.rpm"/>

The entry as available on the ISO is:

<location xml:base="media://1330913492.861127#1" href="CentOS/pam-0.99.6.2-6.el5_5.2.x86_64.rpm"/>

The way to workaround this issue, is be recreated the repodata using createrepo:

# createrepo -u http://172.16.3.240/repo/centos/5.8/base/x86_64/-o ${WEBSERVERPATH}/new-repo/ /media/cd/

And then the entry will look like:

<location xml:base=”http://172.16.3.240/repo/centos/5.8/base/x86_64/CentOS” href=”pam-0.99.6.2-6.el5_5.2.x86_64.rpm”/>

The bug can be found in bugzilla.

SSL Chain

I’ve ordered via http://www.cheapssls.com/ a simple SSL-certificate signed by Comodo for use with apache… although a lot of browsers (Firefox on Mac OS X, all browsers in Linux) didn’t accepted it (CA was not know…)
After some discussion with …

Upgrade packages on Centos 4 for WordPress 3.3

Recently I had to upgrade MySQL and PHP to enable the latest and greatest version of WordPress on a server.

The server is currently still running CentOS 4, but didn’t want to upgrade it to a newer major version. Thanks to the builds of Jason Litka for RHEL4/CentOS 4, I was able to upgrade the packages…

Finally I was able to upgrade the following packages:

  • MySQL from version 4.1.22 to 5.1.58
  • PHP from version 4.3.9 to 5.2.17
  • Apache from version 2.0.52 to 2.2.21

You can easily enable the repo by adding a .repo file to /etc/yum.repos.d/ on your box with the following content:

[utterramblings]
name=Jason's Utter Ramblings Repo
baseurl=http://www.jasonlitka.com/media/EL$releasever/$basearch/
enabled=1
gpgcheck=1
gpgkey=http://www.jasonlitka.com/media/RPM-GPG-KEY-jlitka

Please note that some modules are changed if you upgrade Apache from 2.0 to 2.2, for example mod_access functionality moved into mod_authz_host.

Another “weird” thing was that the dovecot package had a dependency on /usr/lib/mysql/libmysqlclient.so.14,  this can be solved by installing the mysqlclient14.i386 rpm. :-)

Block mail from certain countries with sendmail

If you have your own MTA running… you are probably known with the spam-problems… Once you’ve tuned the filters, you have to do it again… because a new spam-run comes in. I also blocked whole /8 subnets in different countries (India/China/…)… but that is not a “real” solution… aka I want to block the whole country…

 The “DNSBL” countries.nerd.dk  allows you to do so… the map ip-adresses to countries based on whois-information… so on my MTAs I added the following lines to the mc sendmail file:

FEATURE(dnsbl,`br.countries.nerd.dk', `554 - Rejected - SPAM from Brazil:$&{client_addr} rejected')dnl
FEATURE(dnsbl,`in.countries.nerd.dk', `554 - Rejected - SPAM from India:$&{client_addr} rejected')dnl
FEATURE(dnsbl,`kr.countries.nerd.dk', `554 - Rejected - SPAM from Korea:$&{client_addr} rejected')dnl
FEATURE(dnsbl,`cn.countries.nerd.dk', `554 - Rejected - SPAM from China:$&{client_addr} rejected')dnl
FEATURE(dnsbl,`ro.countries.nerd.dk', `554 - Rejected - SPAM from Romenia:$&{client_addr} rejected')dnl
FEATURE(dnsbl,`co.countries.nerd.dk', `554 - Rejected - SPAM from Colombia:$&{client_addr} rejected')dnl
FEATURE(dnsbl,`mk.countries.nerd.dk', `554 - Rejected - SPAM from Macedonia:$&{client_addr} rejected')dnl
FEATURE(dnsbl,`vn.countries.nerd.dk', `554 - Rejected - SPAM from Vietnam:$&{client_addr} rejected')dnl
FEATURE(dnsbl,`ru.countries.nerd.dk', `554 - Rejected - SPAM from Russia:$&{client_addr} rejected')dnl

And within a few hours the first are already blocked… I hope this will reduce the amount of incomming spam at the “front door”. Because simply… I don’t know people in these countries…