[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [HS Postfix] - rewrite with cannonical



On Sat, 7 Apr 2012 11:55:59 +0200
Nahliel Steinberg <nahliel.steinberg@gmail.com> wrote:

> 
> root m'envoi un mail. Je joue avec la reecriture du mail root pour savoir quelle machine
> m'avertie dans le fichier cannonical je mets :
> 
> root    serveur1@jobijoba.toto.com
> 
> quand je recois les mails j'ai toujours l'utlisateur root qui s'affiche et j'aimerai
> changer le nom, le mail est bien reecrit mais je n'arrive pas a ajouter un nom + prenom.
> 
> Un nom different serait super pratique genre "Sysadmin" <serveur1@jobijoba.toto.com>.

Je ne sais pas si ça correspond à tes besoins, mais par exemple
je fais un rafraichissement tous les mois de /etc/bind/db.root
et ça donne qq chose comme ça (sans avoir besoin de canonical):

#!/bin/sh
(
	echo "From: ns1@machine7"
	echo "To: auto-maint@mydomain"
	echo "Subject: NS - Automatic update of file: /etc/bind/db.root"
	echo "Content-Transfer-Encoding: 8bit"
	echo "Content-Type: text/plain; charset=\"UTF-8\""

	# query NS.ROOT SERVER, remplacement du fichier slt si taille ok, etc

	# Etc: Affichage d'un msg "maintenance ok" ou au contraire de demande
	#      d'inter manuelle si le fichier ne fait pas la bonne taille.

) 2>&1 | /usr/lib/sendmail -t
exit 0


Le résultat étant un email avec en-tête de la forme:
	From: ns1@machine7
	To: auto-maint@mydomain
	Subject: NS - Automatic update of file: /etc/bind/db.root
	Date: Sat,  7 Apr 2012 13:43:28 +0200 (CEST)

-- 
What we cannot speak about we must pass over in silence.
		-- Wittgenstein


Reply to: