diff options
| author | Simon Josefsson | 2003-02-22 00:28:45 +0000 |
|---|---|---|
| committer | Simon Josefsson | 2003-02-22 00:28:45 +0000 |
| commit | ac1888f5da2ce2b057cc76e49117060926adf69e (patch) | |
| tree | 8e1b6dd2d89b791b44a2a0c6ba48dbba42284259 | |
| parent | 16782258774cc98c69709a16286ed0da91dc25cf (diff) | |
| download | emacs-ac1888f5da2ce2b057cc76e49117060926adf69e.tar.gz emacs-ac1888f5da2ce2b057cc76e49117060926adf69e.zip | |
Add node about SMTP.
| -rw-r--r-- | man/ChangeLog | 4 | ||||
| -rw-r--r-- | man/sending.texi | 159 |
2 files changed, 162 insertions, 1 deletions
diff --git a/man/ChangeLog b/man/ChangeLog index fe8ceba6d40..c8c206b3d1a 100644 --- a/man/ChangeLog +++ b/man/ChangeLog | |||
| @@ -1,3 +1,7 @@ | |||
| 1 | 2003-02-22 Simon Josefsson <jas@extundo.com> | ||
| 2 | |||
| 3 | * sending.texi (Mail Methods): Add node about SMTP. | ||
| 4 | |||
| 1 | 2003-02-17 Jan Dj,Ad(Brv <jan.h.d@swipnet.se> | 5 | 2003-02-17 Jan Dj,Ad(Brv <jan.h.d@swipnet.se> |
| 2 | 6 | ||
| 3 | * xresources.texi (GTK names in Emacs): Add emacs-toolbar - GtkToolbar | 7 | * xresources.texi (GTK names in Emacs): Add emacs-toolbar - GtkToolbar |
diff --git a/man/sending.texi b/man/sending.texi index 482ffecfd00..e3269f16333 100644 --- a/man/sending.texi +++ b/man/sending.texi | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | @c This is part of the Emacs manual. | 1 | @c This is part of the Emacs manual. |
| 2 | @c Copyright (C) 1985,86,87,93,94,95,97,2000,2001 | 2 | @c Copyright (C) 1985,86,87,93,94,95,97,2000,2001, 2003 |
| 3 | @c Free Software Foundation, Inc. | 3 | @c Free Software Foundation, Inc. |
| 4 | @c See file emacs.texi for copying conditions. | 4 | @c See file emacs.texi for copying conditions. |
| 5 | @node Sending Mail, Rmail, Picture, Top | 5 | @node Sending Mail, Rmail, Picture, Top |
| @@ -82,6 +82,7 @@ separate manual. It may be useful for looking up names and addresses. | |||
| 82 | * Mode: Mail Mode. Special commands for editing mail being composed. | 82 | * Mode: Mail Mode. Special commands for editing mail being composed. |
| 83 | * Amuse: Mail Amusements. Distracting the NSA; adding fortune messages. | 83 | * Amuse: Mail Amusements. Distracting the NSA; adding fortune messages. |
| 84 | * Methods: Mail Methods. Using alternative mail-composition methods. | 84 | * Methods: Mail Methods. Using alternative mail-composition methods. |
| 85 | * SMTP: Sending via SMTP. Sending mail via SMTP. | ||
| 85 | @end menu | 86 | @end menu |
| 86 | 87 | ||
| 87 | @node Mail Format | 88 | @node Mail Format |
| @@ -691,3 +692,159 @@ in this chapter about the @samp{*mail*} buffer and Mail mode does not | |||
| 691 | apply; the other methods use a different format of text in a different | 692 | apply; the other methods use a different format of text in a different |
| 692 | buffer, and their commands are different as well. | 693 | buffer, and their commands are different as well. |
| 693 | 694 | ||
| 695 | @node Sending via SMTP | ||
| 696 | @section Sending via SMTP | ||
| 697 | @cindex SMTP | ||
| 698 | |||
| 699 | Emacs includes a package for sending your mail to a SMTP server and | ||
| 700 | have it take care of delivering it to the final destination, rather | ||
| 701 | than letting the MTA on your local system take care of it. This can | ||
| 702 | be useful if you don't have a MTA set up on your host, or if your | ||
| 703 | machine is often disconnected from the Internet. | ||
| 704 | |||
| 705 | Sending mail via SMTP requires configuring your mail user agent | ||
| 706 | (@pxref{Mail Methods}) to use the SMTP library. How to do this should | ||
| 707 | be described for each mail user agent; for the Message and Gnus user | ||
| 708 | agents the variable @code{message-send-mail-function} (@pxref{Mail | ||
| 709 | Variables,,,message}) is used. | ||
| 710 | |||
| 711 | @vindex send-mail-function | ||
| 712 | The variable @code{send-mail-function} controls how the default mail | ||
| 713 | user agent sends mail. It should be set to a function. The default | ||
| 714 | is @code{sendmail-send-it}, but must be set to @code{smtpmail-send-it} | ||
| 715 | in order to use the SMTP library. @code{feedmail-send-it} is another | ||
| 716 | option. | ||
| 717 | |||
| 718 | Before using SMTP you must find out the hostname of the SMTP server | ||
| 719 | to use. Your system administrator should provide you with this | ||
| 720 | information, but often it is the same as the server you receive mail | ||
| 721 | from. | ||
| 722 | |||
| 723 | @vindex smtpmail-smtp-server | ||
| 724 | The variable @code{smtpmail-smtp-server} controls the hostname of | ||
| 725 | the server to use. It is a string with an IP address or hostname. It | ||
| 726 | defaults to the contents of the @code{SMTPSERVER} environment | ||
| 727 | variable, or, if empty, the contents of | ||
| 728 | @code{smtpmail-default-smtp-server}. | ||
| 729 | |||
| 730 | @vindex smtpmail-default-smtp-server | ||
| 731 | The variable @code{smtpmail-default-smtp-server} controls the | ||
| 732 | default hostname of the server to use. It is a string with an IP | ||
| 733 | address or hostname. It must be set before the SMTP library is | ||
| 734 | loaded. It has no effect if set after the SMTP library has been | ||
| 735 | loaded, or if @code{smtpmail-smtp-server} is defined. It is usually | ||
| 736 | set by system administrators in a site wide initialization file. | ||
| 737 | |||
| 738 | @cindex Mail Submission | ||
| 739 | SMTP is normally used on the registered ``smtp'' TCP service port 25. | ||
| 740 | Some environments use SMTP in ``Mail Submission'' mode, which uses | ||
| 741 | port 587. Using other ports is not uncommon, either for security by | ||
| 742 | obscurity purposes, port forwarding, or otherwise. | ||
| 743 | |||
| 744 | @vindex smtpmail-smtp-service | ||
| 745 | The variable @code{smtpmail-smtp-service} controls the port on the | ||
| 746 | server to contact. It is either a string, in which case it will be | ||
| 747 | translated into an integer using system calls, or an integer. | ||
| 748 | |||
| 749 | Many environments require SMTP clients to authenticate themselves | ||
| 750 | before they are allowed to route mail via a server. The two following | ||
| 751 | variables contains the authentication information needed for this. | ||
| 752 | The first variable, @code{smtpmail-auth-credentials}, instructs the | ||
| 753 | SMTP library to use a SASL authentication step, currently only the | ||
| 754 | CRAM-MD5, PLAIN and LOGIN-MD5 mechanisms are supported and will be | ||
| 755 | selected in that order if the server supports them. The second | ||
| 756 | variable, @code{smtpmail-starttls-credentials}, instructs the SMTP | ||
| 757 | library to connect to the server using STARTTLS. This means the | ||
| 758 | protocol exchange can be integrity protected and confidential by using | ||
| 759 | TLS, and optionally also authentication of the client. It is common | ||
| 760 | to use both these mechanisms, e.g. to use STARTTLS to achieve | ||
| 761 | integrity and confidentiality and then use SASL for client | ||
| 762 | authentication. | ||
| 763 | |||
| 764 | @vindex smtpmail-auth-credentials | ||
| 765 | The variable @code{smtpmail-auth-credentials} contains a list of | ||
| 766 | hostname, port, username and password tuples. When the SMTP library | ||
| 767 | connects to a host on a certain port, this variable is searched to | ||
| 768 | find a matching entry for that hostname and port. If an entry is | ||
| 769 | found, the authentication process is invoked and the credentials are | ||
| 770 | used. The hostname field follows the same format as | ||
| 771 | @code{smtpmail-smtp-server} (i.e., a string) and the port field the | ||
| 772 | same format as @code{smtpmail-smtp-service} (i.e., a string or an | ||
| 773 | integer). The username and password fields, which either can be | ||
| 774 | @samp{nil} to indicate that the user is queried for the value | ||
| 775 | interactively, should be strings with the username and password, | ||
| 776 | respectively, information that is normally provided by system | ||
| 777 | administrators. | ||
| 778 | |||
| 779 | @vindex smtpmail-starttls-credentials | ||
| 780 | The variable @code{smtpmail-starttls-credentials} contains a list of | ||
| 781 | tuples with hostname, port, name of file containing client key, and | ||
| 782 | name of file containing client certificate. The processing is similar | ||
| 783 | to the previous variable. The client key and certificate may be | ||
| 784 | @samp{nil} if you do not wish to use client authentication. The use | ||
| 785 | of this variable requires the @samp{starttls} external program to be | ||
| 786 | installed, you can get it from | ||
| 787 | @samp{ftp://ftp.opaopa.org/pub/elisp/starttls-*.tar.gz}. | ||
| 788 | |||
| 789 | The remaining variables are more esoteric and is normally not needed. | ||
| 790 | |||
| 791 | @vindex smtpmail-debug-info | ||
| 792 | The variable @code{smtpmail-debug-info} controls whether to print | ||
| 793 | the SMTP protocol exchange in the minibuffer, and retain the entire | ||
| 794 | exchange in a buffer @samp{*trace of SMTP session to | ||
| 795 | mail.example.org*}. | ||
| 796 | |||
| 797 | @vindex smtpmail-debug-verb | ||
| 798 | The variable @code{smtpmail-debug-verb} controls whether to send the | ||
| 799 | VERB token to the server. The VERB server instructs the server to be | ||
| 800 | more verbose, and often also to attempt final delivery while your SMTP | ||
| 801 | session is still running. It is usually only useful together with | ||
| 802 | @code{smtpmail-debug-info}. Note that this may cause mail delivery to | ||
| 803 | take considerable time if the final destination cannot accept mail. | ||
| 804 | |||
| 805 | @vindex smtpmail-local-domain | ||
| 806 | The variable @code{smtpmail-local-domain} controls the hostname sent | ||
| 807 | in the first EHLO or HELO command sent to the server. It should only | ||
| 808 | be set if the @code{system-name} function returns a name that isn't | ||
| 809 | accepted by the server. Do not set this variable unless your server | ||
| 810 | complains. | ||
| 811 | |||
| 812 | @vindex smtpmail-sendto-domain | ||
| 813 | The variable @code{smtpmail-sendto-domain} makes the SMTP library | ||
| 814 | add @samp{@@} and the specified value to recipients specified in the | ||
| 815 | message when they are sent using the RCPT TO command. Some | ||
| 816 | configurations of sendmail requires this behaviour. Don't bother to | ||
| 817 | set this unless you have get an error like: | ||
| 818 | |||
| 819 | @example | ||
| 820 | Sending failed; SMTP protocol error | ||
| 821 | @end example | ||
| 822 | |||
| 823 | when sending mail, and the *trace of SMTP session to <somewhere>* | ||
| 824 | buffer (enabled via @code{smtpmail-debug-info}) includes an exchange | ||
| 825 | like: | ||
| 826 | |||
| 827 | @example | ||
| 828 | RCPT TO: <someone> | ||
| 829 | 501 <someone>: recipient address must contain a domain | ||
| 830 | @end example | ||
| 831 | |||
| 832 | @vindex smtpmail-queue-mail | ||
| 833 | The variable @code{smtpmail-queue-mail} controls whether a simple | ||
| 834 | off line mail sender is active. This variable is a boolean, and | ||
| 835 | defaults to @samp{nil} (disabled). If this is non-nil, mail is not | ||
| 836 | sent immediately but rather queued in the directory | ||
| 837 | @code{smtpmail-queue-dir} and can be later sent manually by invoking | ||
| 838 | @code{smtpmail-send-queued-mail} (typically when you connect to the | ||
| 839 | Internet). | ||
| 840 | |||
| 841 | @vindex smtpmail-queue-dir | ||
| 842 | The variable @code{smtpmail-queue-dir} specifies the name of the | ||
| 843 | directory to hold queued messages. It defaults to | ||
| 844 | @samp{~/Mail/queued-mail/}. | ||
| 845 | |||
| 846 | @findex smtpmail-send-queued-mail | ||
| 847 | The function @code{smtpmail-send-queued-mail} can be used to send | ||
| 848 | any queued mail when @code{smtpmail-queue-mail} is enabled. It is | ||
| 849 | typically invoked interactively with @kbd{M-x RET | ||
| 850 | smtpmail-send-queued-mail RET} when you are connected to the Internet. | ||