Le Mercredi 21 Juin 2006 11:52, El Manu a écrit :
> Enfin quelqu'un qui répond vraiment à la question au lieu de se battre
> sur le contenu du man et des défauts de Mandriva !!
> ;-))))))))))))))))))))))))))))))))))))
>
>
> Merci m'sieur, je vais essayer !
>
> Le mercredi 21 juin 2006 à 01:30 +0200, benigni a écrit :
J ' ai peur de ne pas bien comprendre l 'allusion; mais bon :;) .

Extrait du man de mail/nail

---------------------------------
Sending mail from scripts
       If  you  want  to send mail from scripts, you must be aware that
       nail reads the user's configuration files by default.  So unless
       your  script is only intended for your own personal use (as e.g.
       a cron job), you need to circumvent this by invoking nail like

           MAILRC=/dev/null nail -n

       You then need to  create  a  configuration  for  nail  for  your
       script.  This can be done by either pointing the MAILRC variable
       to a custom configuration file, or by passing the  configuration
       in  environment  variables.   Since  many  of  the configuration
       options are not valid shell variables, the env command is useful
       in this situation.  An invocation could thus look like

           env MAILRC=/dev/null [EMAIL PROTECTED] smtp=host \
                 smtp-auth-user=login smtp-auth-password=secret \
                 smtp-auth=login nail -n -s "subject" \
                 -a attachment_file [EMAIL PROTECTED] <content_file

---------------------------------

Donc AVANT  de poster ma réponse sur le man j' ai bêtement essayé ceci:
[EMAIL PROTECTED] ~]$ nail -n -s "test-shell-mail" -a ./.viminfo [EMAIL 
PROTECTED]  < ./.wmrc

la réponse étant (sans surprise car sendmail n' est pas configuré sur cette 
machine)

/usr/sbin/sendmail: Aucun fichier ou répertoire de ce type
"/home/jpb/dead.letter" 241/5744
. . . message not sent.

Mais si je regarde le fichier dead.letter

------------------------------
Date: Wed, 21 Jun 2006 19:24:43 +0200
To: root
Subject: test-shell-mail
User-Agent: nail 11.25 7/29/05
MIME-Version: 1.0
Content-Type: multipart/mixed;
 boundary="=_449980db.Zx8D7WdfReny6oWd2wRgmt0B8rp4z3Sjtc9HaW2SF/xz+4KK"

This is a multi-part message in MIME format.

--=_449980db.Zx8D7WdfReny6oWd2wRgmt0B8rp4z3Sjtc9HaW2SF/xz+4KK
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

KDE

--=_449980db.Zx8D7WdfReny6oWd2wRgmt0B8rp4z3Sjtc9HaW2SF/xz+4KK
Content-Type: text/plain;
 charset=utf-8
Content-Transfer-Encoding: 8bit
Content-Disposition: attachment;
 filename=".viminfo"

# Ce fichier viminfo a été généré par Vim 6.3.
# Vous pouvez l'éditer, mais soyez prudent.

# 'encoding' dans lequel ce fichier a été écrit
*encoding=iso-8859-15


# hlsearch on (H) or off (h):
~h
# Last Search Pattern:
~Msle0~/\<Option\>

# Ligne de commande Historique (chronologie décroissante):
--------Coupé--------
------------------------------

Ou je voie bien le contenu du fichier .wmrc qui est KDE puis ensuite le 
fichier .viminfo qui est attaché.

A toi te tirer la morale de cette histoire.

JPB
____________________________________________________
Want to buy your Pack or Services from Mandriva? 
Go to http://store.mandriva.com
Join the Club : http://www.mandrivaclub.com
____________________________________________________

Répondre à