HubiC on Raspberry pi

sync your data with HubiC.

Install it on your Raspberry, just download the last package:

http://mir7.ovh.net/ovh-applications/hubic/hubiC-Linux/1.2.5/

Install it:

sudo dpkg -i -R hubiC-Linux-1.2.5.38-linux.deb

finalize the installation as for the dependancies:

sudo apt-get -f install

Before running it, you need to reed the bus:

dbus-launch --sh-syntax

Copy/paste the bus data address and export the settings (change ‘xxxx’ with your own data from the previous command output:

export DBUS_SESSION_BUS_ADDRESS='unix:abstract=/tmp/dbus-xxxx,guid=xxxx'

And run hubiC with the login you have created on the website:

mkdir /home/pi/hubiC
hubic login login@domain.tld /home/pi/hubiC

 

Send spam to Junk folder on Synology NAS

I am currently have an Anti-Spam solution plugged in with Postfix of my NAS.

I have been looking for on how could I set/specify all spam been send to a specific folder; On the NAS, sieve is involved and used to apply action against the mailflow.

Located on your nas :

/var/packages/MailServer/target/scripts/sieve_before/move_spam.sieve

Set the potential X-Header that your solution can mark the spam. This sieve script would apply the action and send the spam to your Personal Junk folder, or others if needed.

Here is the default sieve script to do it:

require ["fileinto"];
if anyof (header :contains "X-Spam-Flag" "YES")
{
fileinto "Junk";
}

Sendmail is only accepting connections from localhost

By default configured to accept connection from local system (127.0.0.1). This should avoid open mail relay problem.

To allow connections from ALL hosts/LAN IPs open sendmail.mc file (login as the root):

# vi /etc/mail/sendmail.mc

Look for line that read as follows:

DAEMON_OPTIONS(`Port=smtp,Addr=127.0.0.1, Name=MTA')dnl

Comment or remove above line and insert new line that read as follows:

DAEMON_OPTIONS(`Port=smtp,Name=MTA')dnl

Above line will force to accept connection from any host. Save the file. Regenerate sendmail configuration file using m4:

# m4 /etc/mail/sendmail.mc > /etc/mail/sendmail.cf

If this command is resulting by giving such of error as below, this means that the file

/etc/mail/sendmail.mc:10: m4: cannot open `/usr/share/sendmail-cf/m4/cf.m4': No such file or directory

Then, this means that the sendmail.cf.xx rpm package is missing and require to be installed.

In my case, I had to mount the cdrom, and look for this rpm file:

sendmail-cf-8.13.8-2.el5.i386.rpm

Restart sendmail service :

# /etc/init.d/sendmail restart

Htpc Manager on Synology NAS

I had a quick look over this interface that integrate some common tool as Sabnzbd, Sicxkbeard and XBMC (also some others).

If you wish to run this interface on your Syno NAS:

– From another machine running linux, GIT is needed to download Htpc Manager; However you can copy the files from to any others machines and run this interface as soon as Python is present.

	git clone git://github.com/styxit/HTPC-Manager.git
      • once the download is done. Copy the entire folder onto your NAS; In my case I did copy it on the volume1 of my NAS.
	cp -r /volume1/share/HTPC-Manager/ /volume1/@htpc
  • Now, navigate into the folder, once there; verify if the python is well found; run this command start it:
  • /usr/local/htpc/env/bin/python /volume1/@htpc/HTPC-Manager/Htpc.py
    

Change splash screen on ubuntu 13.10

There are some plymouth themes available in Ubuntu Software Center by default. Search for and install what you want, seach for plymouth-theme.

 

Open terminal window (Control+Alt+T) and run:

sudo update-alternatives --config default.plymouth

Select which theme to install, then to apply it run:

sudo update-initramfs -u

Customize MailServer setting on NAS Synology

Synology NAS.

I have been looking to customize the MailServer SMTP Banner.(removing the Postfix name from the banner)

You can add or and customize as much as Postfix 2.x would accept it from this path:

	/var/packages/MailServer/target/etc/template/

 

I have edit the file main.template and add the following line:

	smtpd_banner = $myhostname ESMTP

 

Saved and restart the SMTP component from the NAS web interface.

Update:

For DSM 5.1-5022 Update 4; The main.cf is located to :

/var/packages/MailServer/target/etc/main.cf

If you need to reload Postfix; Run :

/var/packages/MailServer/target/sbin/syno_mailserverd reload

 

 

Massive upload files to SharePoint servers

I have been looking to make using some sort of script the way to make massive upload to a sharePoint server;
I have been finding many using Powershell and I came up with this type of script

param ([String]$spPath, [String]$localPath)

#################################################################################

## Load the SharePoint Snapin so the script can be executed from PowerShell editor
## INTERACTIVE OR AUTOMATIC MODE.

## FOR AUTOMATIC MODE. SET THE VARIABLE BELOW.OTHERWISE PROMPT WOULD REQUEST EACH.

## SET THE NUMBER OF TIME YOU WISH UPLOAD FOR EACH FILES
##$t = "10"

### SET THE REMOTE SHAREPOINT REMOTE LOCATION FOR THE SHARED DOCUMENT
### OR LET THE PROMPT
### EX: $spPath = "http://sharepoint/home/Shared%20Documents/"


#### SET LOCAL PATH OF FILES TO BE UPLOADED.
#### EX: $localPath = "e:\my_files"



##################################################################################


Add-PSSnapin Microsoft.SharePoint.PowerShell -erroraction SilentlyContinue
# get the SharePoint path if not specified

$i = 1

if ($spPath -eq "")
{
    Write-Host
	$spPath = Read-Host -Prompt " Please enter the full path for the shared librairy?"
}

if ($t -eq "")
{
    Write-Host
	$t = Read-Host -Prompt " How Many times you wish to upload?"
}

# get the local path if not specified
if ($localPath -eq "")
{
    Write-Host
    $localPath = Read-Host -Prompt " Please enter the full path to the local directory that contains the documents to be uploaded"
}



do {Write-Host $i;$i++

## Define our library name and web url

$LibraryName = $spPath.Substring($spPath.LastIndexOf("/")+1)
$webUrl = $spPath.Substring(0,$spPath.LastIndexOf("/"))

## Define a function to return the destination file name

Function BuildFileName($filename)
{
    "$webUrl/$LibraryName/" + $(split-path -leaf $filename)
}
## Upload all the documents found in the specified location

Write-Host "Uploading all documents from $sourceDocs"
$webClient = New-Object System.Net.WebClient
$webClient.Credentials = [System.Net.CredentialCache]::DefaultCredentials
dir $localPath | % {
    Write-Host "Uploading file from "$localPath": $_" -nonewline
    $fName = BuildFileName $_
    $webClient.UploadFile($fName,"PUT", $_.FullName)
    Write-Host " done" -ForegroundColor Green
    }

}
until ($i -gt $t)