aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Josefsson2003-02-22 00:28:45 +0000
committerSimon Josefsson2003-02-22 00:28:45 +0000
commitac1888f5da2ce2b057cc76e49117060926adf69e (patch)
tree8e1b6dd2d89b791b44a2a0c6ba48dbba42284259
parent16782258774cc98c69709a16286ed0da91dc25cf (diff)
downloademacs-ac1888f5da2ce2b057cc76e49117060926adf69e.tar.gz
emacs-ac1888f5da2ce2b057cc76e49117060926adf69e.zip
Add node about SMTP.
-rw-r--r--man/ChangeLog4
-rw-r--r--man/sending.texi159
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 @@
12003-02-22 Simon Josefsson <jas@extundo.com>
2
3 * sending.texi (Mail Methods): Add node about SMTP.
4
12003-02-17 Jan Dj,Ad(Brv <jan.h.d@swipnet.se> 52003-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
691apply; the other methods use a different format of text in a different 692apply; the other methods use a different format of text in a different
692buffer, and their commands are different as well. 693buffer, 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
700have it take care of delivering it to the final destination, rather
701than letting the MTA on your local system take care of it. This can
702be useful if you don't have a MTA set up on your host, or if your
703machine 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
707be described for each mail user agent; for the Message and Gnus user
708agents the variable @code{message-send-mail-function} (@pxref{Mail
709Variables,,,message}) is used.
710
711@vindex send-mail-function
712 The variable @code{send-mail-function} controls how the default mail
713user agent sends mail. It should be set to a function. The default
714is @code{sendmail-send-it}, but must be set to @code{smtpmail-send-it}
715in order to use the SMTP library. @code{feedmail-send-it} is another
716option.
717
718 Before using SMTP you must find out the hostname of the SMTP server
719to use. Your system administrator should provide you with this
720information, but often it is the same as the server you receive mail
721from.
722
723@vindex smtpmail-smtp-server
724 The variable @code{smtpmail-smtp-server} controls the hostname of
725the server to use. It is a string with an IP address or hostname. It
726defaults to the contents of the @code{SMTPSERVER} environment
727variable, 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
732default hostname of the server to use. It is a string with an IP
733address or hostname. It must be set before the SMTP library is
734loaded. It has no effect if set after the SMTP library has been
735loaded, or if @code{smtpmail-smtp-server} is defined. It is usually
736set by system administrators in a site wide initialization file.
737
738@cindex Mail Submission
739SMTP is normally used on the registered ``smtp'' TCP service port 25.
740Some environments use SMTP in ``Mail Submission'' mode, which uses
741port 587. Using other ports is not uncommon, either for security by
742obscurity purposes, port forwarding, or otherwise.
743
744@vindex smtpmail-smtp-service
745 The variable @code{smtpmail-smtp-service} controls the port on the
746server to contact. It is either a string, in which case it will be
747translated into an integer using system calls, or an integer.
748
749Many environments require SMTP clients to authenticate themselves
750before they are allowed to route mail via a server. The two following
751variables contains the authentication information needed for this.
752The first variable, @code{smtpmail-auth-credentials}, instructs the
753SMTP library to use a SASL authentication step, currently only the
754CRAM-MD5, PLAIN and LOGIN-MD5 mechanisms are supported and will be
755selected in that order if the server supports them. The second
756variable, @code{smtpmail-starttls-credentials}, instructs the SMTP
757library to connect to the server using STARTTLS. This means the
758protocol exchange can be integrity protected and confidential by using
759TLS, and optionally also authentication of the client. It is common
760to use both these mechanisms, e.g. to use STARTTLS to achieve
761integrity and confidentiality and then use SASL for client
762authentication.
763
764@vindex smtpmail-auth-credentials
765 The variable @code{smtpmail-auth-credentials} contains a list of
766hostname, port, username and password tuples. When the SMTP library
767connects to a host on a certain port, this variable is searched to
768find a matching entry for that hostname and port. If an entry is
769found, the authentication process is invoked and the credentials are
770used. The hostname field follows the same format as
771@code{smtpmail-smtp-server} (i.e., a string) and the port field the
772same format as @code{smtpmail-smtp-service} (i.e., a string or an
773integer). The username and password fields, which either can be
774@samp{nil} to indicate that the user is queried for the value
775interactively, should be strings with the username and password,
776respectively, information that is normally provided by system
777administrators.
778
779@vindex smtpmail-starttls-credentials
780 The variable @code{smtpmail-starttls-credentials} contains a list of
781tuples with hostname, port, name of file containing client key, and
782name of file containing client certificate. The processing is similar
783to the previous variable. The client key and certificate may be
784@samp{nil} if you do not wish to use client authentication. The use
785of this variable requires the @samp{starttls} external program to be
786installed, you can get it from
787@samp{ftp://ftp.opaopa.org/pub/elisp/starttls-*.tar.gz}.
788
789The 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
793the SMTP protocol exchange in the minibuffer, and retain the entire
794exchange in a buffer @samp{*trace of SMTP session to
795mail.example.org*}.
796
797@vindex smtpmail-debug-verb
798 The variable @code{smtpmail-debug-verb} controls whether to send the
799VERB token to the server. The VERB server instructs the server to be
800more verbose, and often also to attempt final delivery while your SMTP
801session is still running. It is usually only useful together with
802@code{smtpmail-debug-info}. Note that this may cause mail delivery to
803take 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
807in the first EHLO or HELO command sent to the server. It should only
808be set if the @code{system-name} function returns a name that isn't
809accepted by the server. Do not set this variable unless your server
810complains.
811
812@vindex smtpmail-sendto-domain
813 The variable @code{smtpmail-sendto-domain} makes the SMTP library
814add @samp{@@} and the specified value to recipients specified in the
815message when they are sent using the RCPT TO command. Some
816configurations of sendmail requires this behaviour. Don't bother to
817set this unless you have get an error like:
818
819@example
820 Sending failed; SMTP protocol error
821@end example
822
823when sending mail, and the *trace of SMTP session to <somewhere>*
824buffer (enabled via @code{smtpmail-debug-info}) includes an exchange
825like:
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
834off line mail sender is active. This variable is a boolean, and
835defaults to @samp{nil} (disabled). If this is non-nil, mail is not
836sent 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
839Internet).
840
841@vindex smtpmail-queue-dir
842 The variable @code{smtpmail-queue-dir} specifies the name of the
843directory 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
848any queued mail when @code{smtpmail-queue-mail} is enabled. It is
849typically invoked interactively with @kbd{M-x RET
850smtpmail-send-queued-mail RET} when you are connected to the Internet.