issue140:tutoriel2
Différences
Ci-dessous, les différences entre deux révisions de la page.
Prochaine révision | Révision précédente | ||
issue140:tutoriel2 [2018/12/28 18:09] – créée auntiee | 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. |
- | 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/ | + | Supposez que les mails ne vous soient pas cruciaux et que vous ayez juste besoin d'envoyer occasionnellement des mails à partir de votre PC, particulièrement si vous aimez envoyer des informations à partir d'un programme qui est supposé tourner régulièrement. Ce pourrait être un problème si vous n'avez pas accès au serveur de mail de 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:// | + | **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:// | ||
Installation of the lightweight email sender (which needs no configuration) is straightforward: | Installation of the lightweight email sender (which needs no configuration) is straightforward: | ||
Ligne 9: | Ligne 13: | ||
sudo apt install sendemail | sudo apt install sendemail | ||
- | 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.** |
- | 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 | + | Votre FAI devrait pouvoir vous donner tous les détails concernant l'utilisation de leur hôte intelligent |
- | Incidentally, | + | 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' | ||
+ | |||
+ | Les seuls paramètres exigés sont l' | ||
+ | |||
+ | **Incidentally, | ||
As a rather trivial example we could enter into a command line:- | As a rather trivial example we could enter into a command line:- | ||
Ligne 19: | Ligne 33: | ||
sendemail -f xxxx@zzzz.com | sendemail -f xxxx@zzzz.com | ||
- | 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.** |
- | 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). | + | 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 -t parameter specifies a destination address (but don't use test@gmail.com – that must belong to someone); this should be a valid email address that you have access to. | The -t parameter specifies a destination address (but don't use test@gmail.com – that must belong to someone); this should be a valid email address that you have access to. | ||
Ligne 27: | Ligne 50: | ||
The -u parameter specifies the subject field, it is enclosed in quotes because of the presence of special characters (spaces). | The -u parameter specifies the subject field, it is enclosed in quotes because of the presence of special characters (spaces). | ||
- | 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).** |
- | 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:- | + | 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:- | ||
Reading message body from STDIN because the ' | Reading message body from STDIN because the ' | ||
Ligne 36: | Ligne 67: | ||
- End manual input with a CTRL-D on its own line. | - End manual input with a CTRL-D on its own line. | ||
- | 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=/ |
- | File attachments are included with the -a parameter, followed by a list of file names separated by spaces or other acceptable delimiters. | + | 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. | ||
In a similar way, sending to multiple email addresses is possible by specifying a list of addresses for the -t parameter. | In a similar way, sending to multiple email addresses is possible by specifying a list of addresses for the -t parameter. | ||
Ligne 44: | Ligne 83: | ||
Lists of addresses can also be entered for the -cc and -bcc (copy & blind copy) parameters. | Lists of addresses can also be entered for the -cc and -bcc (copy & blind copy) parameters. | ||
- | 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: |
- | I have only scratched the surface of what this command can do. | + | 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. | ||
For a brief summary of what is possible, enter | For a brief summary of what is possible, enter | ||
Ligne 66: | Ligne 113: | ||
sendemail | sendemail | ||
- | 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.1546016976.txt.gz · Dernière modification : 2018/12/28 18:09 de auntiee