Offroad

Chris' blog

Offroad header image 4

Articles de 'Server'

Sauvegarde des boites Exchange 2007 vers des fichiers PST

2009/02/21 23:24 · Aucun Commentaire

Grâce à cette article : How to Backup Exchange 2007 Mailboxes to PST Files , j’ai pu lancer en une seule ligne la sauvegarde de la totalité des boites de mon serveur vers des fichiers PST.

Voici la ligne en question :

get-mailbox -database “SERVER_NAME\DATABSE_NAME” | export-mailbox -PSTFolderPath C:\PSTFiles

Malheureusement c’était trop beau pour pouvoir être lancé directeur à partir du serveur Exchange :

Vous utilisez un ordinateur 64 bits. Pour exporter vers ou importer à partir d’un fichier .pst, vous devez utiliser un ordinateur 32 bits sur lequel Outlook 2003 SP2 ou une version ultérieure est installé.

Microsoft est toujours aussi fidèle à lui-même… C’est donc à partir de mon ordinateur 32bits que j’ai lancé cette commande après avoir installé Exchange Management Tools grace à la version d’essai d’exchange 2007 32bits disponible sur le site internet de Microsoft.

Mais alors j’avais l’erreur :

MAPI ou fournisseur de services non spécifié

J’ai donc donné tous les droits à l’administrateur sur toutes les boîtes puisque ça ne semble pas fonctionner autrement (je dois manquer une étape quelque part)

get-mailbox -database “SERVER_NAME\DATABSE_NAME” |Add-MailboxPermission -User “administrateur” -AccessRights FullAccess

[Lire la suite →]

Tags: fr · IT · mail · Server

Droits propriétaires sur les dossiers publics

2009/01/26 15:11 · Aucun Commentaire

Afin de récupérer les droits de propriétaire sur un dossier public et tous ses sous-dossiers sur exchange 2007

AddUsersToPFRecursive.ps1 -TopPublicFolder “\NOM_DOSSIER” -User “e.dufour@domaine.net” -Permission Owner

[Lire la suite →]

Tags: IT · mail · Server

apt-get "les paquets suivants ont été conservés"

2009/01/04 18:07 · Aucun Commentaire

Lors de mon habituelle mise à jour de Debian j’avais un message auquel je n’étais pas habitué : “Les paquets suivants ont été conservés”. C’est embêtant parce que justement l’antivirus est le plus important à mettre à jour. Voici l’affichage que j’obtenais :

# apt-get upgrade
Lecture des listes de paquets… Fait
Construction de l’arbre des dépendances… Fait
Les paquets suivants ont été conservés :
clamav clamav-daemon clamav-freshclam linux-image-2.6-486 openssh-client
openssh-server
0 mis à jour, 0 nouvellement installés, 0 à enlever et 6 non mis à jour.

Grâce à Christophe que je cite : “il faut faire un apt-get dist-upgrade, c’est parce que la mise a jour de ces paquets nécessite la mise a jour d’autres paquets plus importants”.

J’ai donc lancé sans soucis :

apt-get dist-upgrade

Les paquets suivants seront ENLEVÉS :
libclamav2
Les NOUVEAUX paquets suivants seront installés :
libclamav5 linux-image-2.6.18-6-486 openssh-blacklist

En effet on constate la mise à jour d’une librairie : libclamav2 est abandonnée pour libclamav5… ce n’est pas négligeable mais ils auraient pu afficher un avertissement…

Voila, tout est rentré dans l’ordre.

[Lire la suite →]

Tags: fr · IT · mail · Server

Mysql 1114 The table is full

2008/12/15 23:37 · Aucun Commentaire

Si vous ne pouvez plus insérer d’enregistrement dans une base sous MySQL qui vous dit :

#1114 – The table ‘*****’ is full

Et que vous êtes en innoDB et que vous n’avez pas de problème d’espace disque après vérification, c’est sans doute qu’une limitation explicite dans le fichier de configuration de mySQM : /etc/mysql/my.cnf

Il faut donc ajouter plus de place à la base de donnée (parametre en rouge dans l’exemple suivant) :

# you may wish to change this size to be more suitable for your system
# the max is there to avoid run-away growth on your machine
innodb_data_file_path = ibdata1:10M:autoextend:max:256M
Là on a mis 256MO (117MO réels) au lieu de 128MO
C’est vraiment évident non ?

Vincent

[Lire la suite →]

Tags: dev · fr · IT · Server

Microsoft Search Server 2008

16:55 · Aucun Commentaire

Vincent vient de m’apprendre que Microsoft a un Search Server 2008 Express (gratuit)

http://www.microsoft.com/EnterpriseSearch/

Ca nous permettrait d’avoir une page web pour faire une recherche sur tous nos dossiers réseaux avec une indexation rendant enfin la chose rapide.

Je n’ai pas étudié encore ce logiciel mais il semble qu’il faille l’utiliser avec Sharepoint Portal pour afficher la page de recherche.

[Lire la suite →]

Tags: fr · IT · network · Server · windows

Spamassassin can learn from Exchange before 2007

2008/12/08 19:16 · Aucun Commentaire

I found a better way of teaching Spamassassin from Exchange. But it works trough IMAP. And Exchange 2007 doesn’t allow imap to access to public folders any more :-(

http://sstern.ccim.com/2006/07/14/training-sitewide-spam-filters/

here is a copy-paste :

How does one enable end-user training of a site-wide Bayesian spam filter for SpamAssassin when the users are reading mail through Microsoft Exchange and the filtering takes place on several Linux MX servers?

We have created two public folders, should-be-spam and should-be-ham. We created an exchange user, spamiam, that has full rights to these folders. End-users move misclassified mail from their inbox or junk-mail folder into the appropriate should-be public folder.

At the top of every hour, this script is run on the one MX server:

/usr/local/scripts/get_ham_spam
#! /bin/sh
rm -f /var/spool/mail/spamiam
touch /var/spool/mail/spamiam
chown spamiam:mail /var/spool/mail/spamiam
su spamiam -c 'fetchmail -a -K -f
/usr/local/scripts/spamiam.fetchmailrc -r "Public Folders/should-
be-spam"'
cat /var/spool/mail/spamiam >> /var/www/html/spamstuff/should-be-spam
sa-learn --spam --mbox /var/www/html/spamstuff/should-be-spam
rm -f /var/spool/mail/spamiam
touch /var/spool/mail/spamiam
chown spamiam:mail /var/spool/mail/spamiam
su spamiam -c 'fetchmail -a -K -f
/usr/local/scripts/spamiam.fetchmailrc -r "Public Folders/should-
be-ham"'
cat /var/spool/mail/spamiam >> /var/www/html/spamstuff/should-be-ham
sa-learn --ham --mbox /var/www/html/spamstuff/should-be-ham

/usr/local/scripts/spamiam.fetchmailrc
poll exchange.xxxx.com
proto imap
user spamiam
password xxxxxxxxx
is spamiam here

At 15 past each hour, the two other mail servers use wget to grab the
should-be files to their local /tmp and run sa-learn.

get-ham-spam
#! /bin/sh
cd /tmp
rm -f should-be-spam should-be-ham
wget -q http://xxx.xxx.com/spamstuff/should-be-spam
wget -q http://xxx.xxx.com/spamstuff/should-be-ham
sa-learn --spam --mbox should-be-spam
sa-learn --ham --mbox should-be-ham

The files are included in logrotate on the source server, so they get zero’d every Sunday
morning.

[Lire la suite →]

Tags: en · IT · mail · network · Server

Exchange 2007 et la réservation de Salles

2008/12/02 17:25 · Aucun Commentaire

Décidément rien n’est évident avec Exchange 2007… après l’installation nous constatons que les salles n’acceptent pas automatiquement les réservations. Donc 2 ou 3 réunions ont lieu au même endroit.

Il fallait lancer la commande suivante :

Set-MailboxCalendarSettings <Identity> -AutomateProcessing:AutoAccept

L’inverse :

Set-MailboxCalendarSettings <Identity> -AutomateProcessing:None

Toutes les salles sont donc actives désormais. C’est à faire à chaque nouvelle création de ressources.

[Lire la suite →]

Tags: fr · IT · mail · Server · windows

Changer une boîte exchange 2007 en boîte de salle

2008/11/24 21:58 · Aucun Commentaire

En migrant à partir d’exchange 2003, nos salles de réunions sont identiques aux boîtes utilisateurs alors qu’exchange 2007 identifie à présent ce genre de compte salle.

2 intérêts à ce changement :

  • elles ne correspondent plus à des comptes utilisateurs actifs avec un mot de passe
  • elles sont correctement reconnues comme salles par Outlook

Voici la commande à lancer dans le shell d’Exchange 2007

Set-Mailbox -Identity Nom_de_la_salle -Type Room

[Lire la suite →]

Tags: fr · IT · mail · Server · windows

Relay SMTP avec Exchange 2007

2008/11/16 21:55 · 1 Commentaire

Pour obtenir un relay SMTP autorisant le relais à la mode exchange 2003 mais sur exchange 2007 ce n’est pas si évident.

On pense que l’option est si évidente qu’on va trouver une fenêtre avec une case à cocher, eh ben non !

Comme nous l’indique le blog de la team exchange, il faut créer un nouveau connecteur d’envoie personalisé ;

y autoriser les connexions anonymes comme dans les images ci-dessous :

Cela autorise les connexions mais pas encore le relay, pour le relay il va falloir lancer une commande :

Get-ReceiveConnector “NOM_DU_CONNECTEUR” | Add-ADPermission -User “ANONYMOUS LOGON” -ExtendedRights “ms-Exch-SMTP-Accept-Any-Recipient”

Comme j’avais déjà un connecteur sur le port 25, j’ai du attribuer une 2e adresse ip à ma carte réseau. Une ip par connecteur.

[Lire la suite →]

Tags: fr · IT · mail · network · Server

Exchange 2007 et les domaines en .local

2008/11/14 02:03 · 3 Commentaires

J’ai constaté que comme moi de nombreuses personnes avaient des soucis avec les domaines du genre domaine.local et exchange.

“le nom sur le certificat de sécurité n’est pas valide ou ne correspond pas au nom de ce site”.

On comprend pourquoi en lançant la commande “get-clientaccessserver | fl” dans le shell d’exchange 2007 ou en faisant un ctrl+click droit sur l’icone d’outlook 2007 et en lançant alors “tester la configuration automatique de la messagerie”.

En effet on voit alors des horreurs du genre https://serveur.domaine.local/…… , forcément on a installé un certificat pour https://mail.domaine.com alors les arlertes s’enchaînent.

Heureusement le site : http://www.exchangeninjas.com/set-allvdirs nous founi un script tout prêt qui change toutes les entrées concernées automatiquement.

Créez un fichier rename_vhost.ps1 contenant :

# Script to allow you to set all virtual directories to a common name like mail.company.com

Start-Transcript

# Variables

[string]$UMExtend = “/UnifiedMessaging/Service.asmx”
[string]$OABExtend = “/OAB”
[string]$SCPExtend = “/Autodiscover/Autodiscover.xml”
[string]$EWSExtend = “/EWS/Exchange.asmx”
[string]$ConfirmPrompt = “Set this Value? (Y/N)”
[string]$NoChangeForeground = “white”
[string]$NoChangeBackground = “red”

Write-host “This will allow you to set the virtual directories associated with Autodiscover provided services to the name you provide.”
Write-host “”
[string]$base = Read-host “Base name of virtual directory (e.g. mail.company.com)”
write-host “”
# =======================================================
# Validate if a third party trusted certificate is being used
# because BITS won’t use untrusted certificates
[string]$set = Read-host “Is the certificate being used an internally generated certificate? (Y/N)”
Write-host “”

if ($set -eq “Y”)    {
[string]$OABprefix = “http://”
}    else    {
[string]$OABprefix = “https://”
}

# =======================================================
# Build the Autodiscover URL and set the SCP Value

Write-host “Setting Autodiscover Service Connection Point” -foregroundcolor Yellow
write-host “”

$SCPURL = “https://” + $base + $SCPExtend

[array]$SCPCurrent = Get-ClientAccessServer

Foreach ($value in $SCPCurrent) {
Write-host “Looking at Server: ” $value.name
Write-host “Current SCP value: ” $value.AutoDiscoverServiceInternalUri.absoluteuri
Write-host “New SCP Value:     ” $SCPURL
[string]$set = Read-host $ConfirmPrompt
write-host “”

if ($set -eq “Y”)    {
Set-ClientAccessServer -id $value.identity -AutoDiscoverServiceInternalUri $SCPURL
}    else {
write-host “Autodiscover Service Connection Point internal value NOT changed” -foregroundcolor $NoChangeForeground -backgroundcolor $NoChangeBackground
}
}

# =======================================================
# Build the EWS URL and set the internal Value

Write-host “Setting Exchange Web Services Virtual Directories” -foregroundcolor Yellow
write-host “”

$EWSURL = “https://” + $base + $EWSExtend

[array]$EWSCurrent = Get-WebServicesVirtualDirectory

Foreach ($value in $EWSCurrent) {
Write-host “Looking at Server: ” $value.server
Write-host “Current Internal Value: ” $value.internalURL
Write-host “New Internal Value:     ” $EWSUrl
[string]$set = Read-host $ConfirmPrompt
write-host “”

if ($set -eq “Y”)    {
Set-WebServicesVirtualDirectory -id $value.identity -InternalURL $EWSURL
} else {
write-host “Exchange Web Services Virtual Directory internal value NOT changed” -foregroundcolor $NoChangeForeground -backgroundcolor $NoChangeBackground
}

Write-host “Looking at Server: ” $value.server
Write-host “Current External Value: ” $value.externalURL
Write-host “New External Value:     ” $EWSUrl
[string]$set = Read-host $ConfirmPrompt
write-host “”

if ($set -eq “Y”)    {
Set-WebServicesVirtualDirectory -id $value.identity -ExternalURL $EWSURL
} else {
write-host “Exchange Web Services Virtual Directory external value NOT changed” -foregroundcolor $NoChangeForeground -backgroundcolor $NoChangeBackground
}
}

# ======================================================
# Build the OAB URL and set the internal Value

Write-host “Setting OAB Virtual Directories” -foregroundcolor Yellow
write-host “”

$OABURL = $OABprefix + $base + $OABExtend

[array]$OABCurrent = Get-OABVirtualDirectory

Foreach ($value in $OABcurrent) {
Write-host “Looking at Server: ” $value.server
Write-host “Current Internal Value: ” $value.internalURL
Write-host “New Internal Value:     ” $OABUrl
[string]$set = Read-host $ConfirmPrompt
write-host “”

if ($set -eq “Y”)    {
Set-OABVirtualDirectory -id $value.identity -InternalURL $OABURL
} else {
write-host “OAB Virtual Directory internal value NOT changed” -foregroundcolor $NoChangeForeground -backgroundcolor $NoChangeBackground
}

Write-host “Looking at Server: ” $value.server
Write-host “Current External Value: ” $value.externalURL
Write-host “New External Value:     ” $OABUrl
[string]$set = Read-host $ConfirmPrompt
write-host “”

if ($set -eq “Y”) {
Set-OABVirtualDirectory -id $value.identity -ExternalURL $OABURL
} else {
write-host “OAB Virtual Directory external value NOT changed” -foregroundcolor $NoChangeForeground -backgroundcolor $NoChangeBackground
}
}

# =======================================================
# Build the UM URL and set the internal Value

Write-host “Setting UM Virtual Directories” -foregroundcolor Yellow
write-host “”

$UMURL = “https://” + $base + $UMExtend

[array]$UMCurrent = Get-UMVirtualDirectory

foreach ($value in $UMCurrent) {
Write-host “Looking at Server: ” $value.server
Write-host “Current Internal Value: ” $value.internalURL
Write-host “New Internal Value:     ” $UMUrl
[string]$set = Read-host $ConfirmPrompt
write-host “”

if ($set -eq “Y”) {
Set-UMVirtualDirectory -id $value.identity -InternalURL $UMURL
} else {
write-host “UM Virtual Directory internal value NOT changed” -foregroundcolor $NoChangeForeground -backgroundcolor $NoChangeBackground
}

Write-host “Looking at Server: ” $value.server
Write-host “Current External Value: ” $value.externalURL
Write-host “New External Value:     ” $UMUrl
[string]$set = Read-host $ConfirmPrompt
write-host “”

if ($set -eq “Y”) {
Set-UMVirtualDirectory -id $value.identity -ExternalURL $UMURL
} else {
write-host “UM Virtual Directory external value NOT changed” -foregroundcolor $NoChangeForeground -backgroundcolor $NoChangeBackground
}
}
Stop-Transcript

Si vous le lancez dans l’Exchange Management Shell, il vous demander quel nom vous voulez attribuer, puis vous demandera de confirmer chaque changement sur chaque serveur. Il est rassurant de pouvoir choisir N.

[Lire la suite →]

Tags: fr · IT · mail · network · Server · windows