issue140:tutoriel2
Différences
Ci-dessous, les différences entre deux révisions de la page.
Les deux révisions précédentesRévision précédenteProchaine révision | Révision précédente | ||
issue140:tutoriel2 [2019/01/02 07:21] – d52fr | issue140:tutoriel2 [2019/01/07 11:37] (Version actuelle) – auntiee | ||
---|---|---|---|
Ligne 1: | Ligne 1: | ||
**Suppose your email demands are rather modest and you just need to send occasional emails from your PC, especially if you like to send information from a job which is supposed to be run regularly. | **Suppose your email demands are rather modest and you just need to send occasional emails from your PC, especially if you like to send information from a job which is supposed to be run regularly. | ||
+ | |||
+ | Supposez que les mails ne vous soient pas cruciaux et que vous ayez juste besoin d' | ||
**Sendemail makes use of a facility provided by most ISP's (but not all) who provide a simple direct route into their email servers. This will be via a so-called “smart host” (or email relay, mailhost or mailhub) - officially a MTA (Mail Transfer Agent) that simply passes any emails sent to it to your ISP's mail servers for onward delivery. In order that this route cannot easily be used to send spam, your ISP will impose some limitations. They will certainly not allow large numbers of emails to be sent and they may additionally require you to provide user/ | **Sendemail makes use of a facility provided by most ISP's (but not all) who provide a simple direct route into their email servers. This will be via a so-called “smart host” (or email relay, mailhost or mailhub) - officially a MTA (Mail Transfer Agent) that simply passes any emails sent to it to your ISP's mail servers for onward delivery. In order that this route cannot easily be used to send spam, your ISP will impose some limitations. They will certainly not allow large numbers of emails to be sent and they may additionally require you to provide user/ | ||
+ | |||
+ | Sendemail fait usage d'un service fourni par la plupart des FAI (mais pas tous), un simple routage direct dans leurs serveurs de courriels. Ceci sera via ce qu'on appelle un « smart host » (hôte intelligent) ou relais de messagerie, mailhost ou mailhub - officiellement un MTA (Mail Transfer Agent - Agent de transfert de courrier) qui passe simplement tous les mails qui lui sont envoyés aux serveurs de mail de votre FAI qui les feront suivre. De façon à ce que ce routage ne soit pas utilisé facilement pour l' | ||
**Your ISP should be able to give full details about using their smart host (or SMTP relay). But if not, whilst any list of ISPs and their smart hosts is almost certainly wrong or out of date, one site that may be worth trying is:- https:// | **Your ISP should be able to give full details about using their smart host (or SMTP relay). But if not, whilst any list of ISPs and their smart hosts is almost certainly wrong or out of date, one site that may be worth trying is:- https:// | ||
Ligne 10: | Ligne 14: | ||
This is designed to be used in shell scripts, or possibly from the command line. Because emails can take quite a variety of options, the parameters required can be rather lengthy.** | This is designed to be used in shell scripts, or possibly from the command line. Because emails can take quite a variety of options, the parameters required can be rather lengthy.** | ||
+ | |||
+ | Votre FAI devrait pouvoir vous donner tous les détails concernant l' | ||
+ | |||
+ | L' | ||
+ | |||
+ | sudo apt install sendemail | ||
+ | |||
+ | Ceci est conçu pour être utilisé directement dans des scripts shell, ou probablement en ligne de commande. Comme les mails peuvent avoir un bon nombre d' | ||
**The only required parameters are the senders email address, a destination address and the name of the smart host. Because email servers usually check that the IP address of the sender matches that recorded in the DNS system and we aren't able to provide that kind of information we can invent a sender’s email address (as it can't be checked, it doesn' | **The only required parameters are the senders email address, a destination address and the name of the smart host. Because email servers usually check that the IP address of the sender matches that recorded in the DNS system and we aren't able to provide that kind of information we can invent a sender’s email address (as it can't be checked, it doesn' | ||
+ | |||
+ | Les seuls paramètres exigés sont l' | ||
**Incidentally, | **Incidentally, | ||
Ligne 20: | Ligne 34: | ||
I have used a genuine smart host (relay.plus.net) and have specified my invented from-address with the -f parameter, but note that the domain, zzzz.com almost certainly belongs to somebody.** | I have used a genuine smart host (relay.plus.net) and have specified my invented from-address with the -f parameter, but note that the domain, zzzz.com almost certainly belongs to somebody.** | ||
+ | |||
+ | D' | ||
+ | |||
+ | Comme exemple plutout trivial, nous pouvons entrer ceci en ligne de commande : | ||
+ | |||
+ | sendemail -f xxxx@zzzz.com | ||
+ | |||
+ | J'ai utilisé un « smart host » véritable (relay.plus.net) et j'ai spécifié mon adresse d' | ||
+ | |||
**The optional -o reply-to= specifies the real email address where I want any replies to go to – otherwise an attempt will be made to send replies to the zzzz.com mail server (if it exists). | **The optional -o reply-to= specifies the real email address where I want any replies to go to – otherwise an attempt will be made to send replies to the zzzz.com mail server (if it exists). | ||
Ligne 28: | Ligne 51: | ||
Finally, I've used the -s parameter to specify my ISP's smart host (relay.plus.net).** | Finally, I've used the -s parameter to specify my ISP's smart host (relay.plus.net).** | ||
+ | |||
+ | La partie -o reply-to=, optionnelle, | ||
+ | |||
+ | Le paramètre -t spécifie l' | ||
+ | |||
+ | Le paramètre -u spécifie le champ du sujet ; il est entre guillemets du fait de la présence de caractères spéciaux (des espaces). | ||
+ | |||
+ | Enfin, j'ai utilisé le paramètre -s pour spécifier le smart host de mon ISP (relay.plus.net). | ||
**However, since I've omitted any reference to the email body, sendemail will attempt to take it from standard input. This can be very useful in a script, but if I enter the above example into the command line, I would be prompted for some body text:- | **However, since I've omitted any reference to the email body, sendemail will attempt to take it from standard input. This can be very useful in a script, but if I enter the above example into the command line, I would be prompted for some body text:- | ||
Ligne 37: | Ligne 68: | ||
This isn't usually very convenient so I can specify the message body in two ways, either directly with the -m parameter (example: -m "This is the message body") or by giving the name of a text file that contains the message body (example: -o message-file=/ | This isn't usually very convenient so I can specify the message body in two ways, either directly with the -m parameter (example: -m "This is the message body") or by giving the name of a text file that contains the message body (example: -o message-file=/ | ||
+ | |||
+ | Cependant, comme j'ai omis une référence au corps du message, sendemail essaiera à le récupérer de l' | ||
+ | |||
+ | Le corps de message sera lu à partir de STDIN parce que l' | ||
+ | - La première ligne doit être reçue dans les 60 prochaines secondes. | ||
+ | - Terminez la saisie manuelle avec un CTRL-D sur sa propre ligne. | ||
+ | |||
+ | Habituellement, | ||
**File attachments are included with the -a parameter, followed by a list of file names separated by spaces or other acceptable delimiters. | **File attachments are included with the -a parameter, followed by a list of file names separated by spaces or other acceptable delimiters. | ||
Ligne 45: | Ligne 84: | ||
It should be mentioned that the usual smart host port number is 25, which is the default. However, other values are possible so that the smart host might read relay.plus.net: | It should be mentioned that the usual smart host port number is 25, which is the default. However, other values are possible so that the smart host might read relay.plus.net: | ||
+ | |||
+ | Les fichiers joints sont compris dans le paramètre -a, suivi par la liste des noms de fichiers séparés par des espaces ou d' | ||
+ | |||
+ | D'une manière similaire, l' | ||
+ | |||
+ | Des listes d' | ||
+ | |||
+ | Il pourrait être aussi noté que le numéro de port habituel du smart host est 25, par défaut. Cependant, d' | ||
**I have only scratched the surface of what this command can do. | **I have only scratched the surface of what this command can do. | ||
Ligne 67: | Ligne 114: | ||
sendemail | sendemail | ||
+ | |||
+ | Je n'ai fait qu' | ||
+ | |||
+ | Pour un résumé rapide de ce qui est possible, entrez | ||
+ | |||
+ | man sendemail | ||
+ | |||
+ | Pour un revue complète, entrez | ||
+ | |||
+ | sendemail --help | ||
+ | |||
+ | Pour une aide détaillée, | ||
+ | |||
+ | sendemail | ||
+ | |||
+ | sendemail | ||
+ | |||
+ | sendemail | ||
+ | |||
+ | sendemail | ||
+ | |||
+ | sendemail | ||
+ | |||
+ |
issue140/tutoriel2.1546410094.txt.gz · Dernière modification : 2019/01/02 07:21 de d52fr