Off Road

Chris’ blog

Off Road header image 4

Articles de 'mail'

apt-get “les paquets suivants ont été conservés”

04.01.2009 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: IT · Server · fr · mail

Spamassassin can learn from Exchange before 2007

08.12.2008 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: IT · Server · en · mail · network

Exchange 2007 et la réservation de Salles

02.12.2008 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: IT · Server · fr · mail · windows

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

24.11.2008 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: IT · Server · fr · mail · windows

Relay SMTP avec Exchange 2007

16.11.2008 21:55 · Aucun 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: IT · Server · fr · mail · network

Exchange 2007 et les domaines en .local

14.11.2008 02:03 · Aucun Commentaire

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: IT · Server · fr · mail · network · windows

Supprimer les dossiers publics d’un Serveur Exchange 2007

05.11.2008 19:49 · Aucun Commentaire

Lorsque j’essayais de supprimer un serveur exchange 2007 de notre organisation, après avoir transféré tous les réplicas, la désinstallation échouait systématiquement à cause de réplicas.

J’ai trouvé les commandes suivantes qui sont radicales mais fonctionnent :

Pour effacer tous les dossiers publics utilisateurs d’un serveur :

Get-PublicFolder -Server <server containing the public folder database> "\" -Recurse -ResultSize:Unlimited | Remove-PublicFolder -Server <server containing the public folder database> -Recurse -ErrorAction:SilentlyContinue

Pour effacer tous les dossiers publics système d’un serveur :

Get-PublicFolder -Server <server containing the public folder database> "\Non_Ipm_Subtree" -Recurse -ResultSize:Unlimited | Remove-PublicFolder -Server <server containing the public folder database> -Recurse -ErrorAction:SilentlyContinue

Pour vérifier que tous les dossiers publics ont bien été effacé :

Get-PublicFolderStatistics -Server <server containing the public folder database>

Nos dossiers publics n’ont pas été supprimés et j’ai enfin pu désinstaller exchange de ce serveur récalcitrant.

[Lire la suite →]

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

Déplacer les Dossiers publiques entre serveur Exchange 2007

04.11.2008 19:25 · Aucun Commentaire

Il y a 2 cas de figure :

  • on veut déplacer tout les réplicats de serveur01  vers serveur02  :

MoveAllReplicas.ps1 -Server Server01 -NewServer Server02

  • on veut déplacer toute l’arborescence d’un dossier nommé Legal :

ReplaceReplicaOnPFRecursive.ps1 -TopPublicFolder “\Legal” -ServerToAdd Server02 -ServerToRemove Server01

[Lire la suite →]

Tags: IT · Server · fr · mail · windows

entourage et Exchange 2007

29.10.2008 18:00 · Aucun Commentaire

Lors de notre passage à Exchange 2007, les clients Entourage ne pouvaient plus se connecter.

C’est le site de microsoft qui a fini par m’apporter la réponse : il ne faut pas se contenter de mettre le nom du serveur dans la case : nom de serveur….. il faut mettre

mail.contoso.com/exchange/user@contoso.com

Le pire c’est que lorsque je mettais mail.contoso.com je n’avais aucune erreur, tous les tests étaient passés avec succés, mais il ne me listait jamais les dossiers…

C’était à cette adresse : http://support.microsoft.com/kb/931350/en-us

[Lire la suite →]

Tags: IT · Server · apple · en · mail · windows

émulateur Windows Mobile

27.10.2008 18:28 · Aucun Commentaire

Voici où trouver un petit émulateur bien pratique pour Windows Mobile 6.0 (dans toutes les langues). Pro ou standard…

Il s’installe sur Windows XP, Vista ou même 2003.

http://www.microsoft.com/downloads/details.aspx?familyid=38C46AA8-1DD7-426F-A913-4F370A65A582&displaylang=en

Par contre afin qu’il puisse utiliser la carte réseau de votre ordinateur pour aller sur internet il faut installer Virtual PC 2007, qui se trouve à cette adresse : http://www.microsoft.com/downloads/details.aspx?FamilyID=04d26402-3199-48a3-afa2-2dc0b40a73b6&DisplayLang=fr

[Lire la suite →]

Tags: IT · fr · mail · phone · windows