[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

6 Connecting to the Internet

This is part 6 of the XEmacs Frequently Asked Questions list. This section is devoted connecting to the Internet.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

6.0: General Mail and News


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

Q6.0.1: What are the various packages for reading mail?

#### Write me.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

Q6.0.2: How can I send mail?

Under Unix and Mac OS X, the ‘sendmail’ package is normally used for this. #### Write me.

Under Windows, you need to use ‘smtpmail’, which communicates directly with the mail server, as there is no ‘sendmail’ program running. To get it working, use code like the following in your ‘init.el’ file:

 
  ;; Get mail working under Windows.
  (setq message-send-mail-function 'smtpmail-send-it) ; for message/Gnus
  (setq send-mail-function 'smtpmail-send-it) ; for C-x m, etc.
  ;; the following ensures that mail problems can be debugged: it logs a trace
  ;; of the SMTP conversation to *trace of SMTP session to <somewhere>*.
  (setq smtpmail-debug-info t)
  ;; Substitute your info here.
  ;(setq user-mail-address "ben@xemacs.org")
  ;(setq user-full-name "Ben Wing")
  ;(setq smtpmail-default-smtp-server "smtp.myserver.myisp.com")
  ;; The following two aren't completely necessary but may help.
  ;(setq smtpmail-local-domain "666.com")
  ;(setq smtpmail-sendto-domain "666.com")
  ;; If your SMTP server requires a username/password to authenticate, as
  ;; many do nowadays, set them like this:
  ;(setq smtpmail-auth-credentials  ; or use ~/.authinfo
  ;	'(("smtp.myserver.myisp.com" 25 "USER@SOMEWHERE" "PASSWORD")))

  ;; Other possibilities for getting smtpmail to work:
  ;;
  ;;  If for some reason you need to authenticate using the STARTTLS protocol
  ;;   (don't look into this unless you know what it is), use
  ;;  (setq smtpmail-starttls-credentials
  ;;      '(("YOUR SMTP HOST" 25 "~/.my_smtp_tls.key" "~/.my_smtp_tls.cert")))
  ;;  Requires external program
  ;;    ftp://ftp.opaopa.org/pub/elisp/starttls-*.tar.gz.
  ;;  See http://www.ietf.org/rfc/rfc2246.txt,
  ;;      http://www.ietf.org/rfc/rfc2487.txt

The lines you need to care about are those that set user-mail-address, user-full-name, smtpmail-default-smtp-server, and smtpmail-auth-credentials. You need to set these with, respectively, your email address, your full name, the SMTP server you use for outgoing mail, and the username and password you need to log in to your SMTP server. (If for some reason your SMTP server doesn’t require logging in to send mail, don’t uncomment this last line.)

The other settings may be useful in specific cases, but you should know what you’re doing before enabling them.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

Q6.0.3: How do I get my outgoing mail archived?

 
(setq mail-archive-file-name "~/outbox")

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

Q6.0.4: How can I read and/or compose MIME messages?

VM, MH-E and GNUS support MIME natively. Other MUAs may or may not have MIME support; refer to their documentation and other resources, such as web pages and mailing lists. Packages like SEMI/WEMI may be useful in connection with MUAs like mew and Wanderlust.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

Q6.0.5: How do I customize the From line?

How do I change the ‘From:’ line? I have set gnus-user-from-line to

 
Gail Gurman <gail.gurman@sybase.com>

, but XEmacs Gnus doesn’t use it. [This should apply to all MUA’s. –ed] Instead it uses

 
Gail Mara Gurman gailg@deall

and then complains that it’s incorrect. Also, as you perhaps can see, my Message-ID is screwy. How can I change that?

Lars Magne Ingebrigtsen writes:

Set user-mail-address to ‘gail.gurman@sybase.com’ or mail-host-address to ‘sybase.com’.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

Q6.0.6: How do I get my MUA to filter mail for me?

One possibility is to use procmail to split your mail before it gets to the MUA. I prefer this personally, since there are many strange and wonderful things one can do with procmail. Procmail may be found at http://www.procmail.org/.

Also see the Mail Filtering FAQ at: http://www.faqs.org/faqs/mail/filtering-faq/.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

Q6.0.7: Remote mail reading with an MUA.

My mailbox lives at the office on a big honkin server. My regular INBOX lives on my honkin desktop machine. I now can PPP to the office from home which is far from honking... I’d like to be able to read mail at home without storing it here and I’d like to use xemacs and the MUA at home... Is there a recommended setup?

Joseph J. Nuspl Jr. writes:

There are several ways to do this.

  1. Set your display to your home machine and run dxpc or one of the other X compressors.
  2. NFS mount your desktop machine on your home machine and modify your pop command on your home machine to rsh to your desktop machine and actually do the pop get’s.
  3. Run a POP server on your desktop machine as well and do a sort of two tiered POP get.

William Perry adds:

Or you could run a pop script periodically on your desktop machine, and just use ange-ftp or NFS to get to your mailbox. I used to do this all the time back at IU.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

Q6.0.8: An MUA gets an error incorporating new mail.

rmail and VM, and probably other MUA’s as well, get new mail from your mailbox (called ‘/var/mail/$USER’ or ‘/var/spool/mail/$USER’ or something similar) using a program called movemail. This program interlocks with /bin/mail using the protocol defined by /bin/mail.

There are various different protocols in general use, which you need to specify using the ‘--mail-locking’ option (‘--with-mail-locking’ in 21.5 or later) to ‘configure’:

lockf

POSIX file locking with lockf()

flock

BSD file locking with flock()

dot

To manipulate mail file ‘foo’, first create file ‘foo.lock

locking

Use locking(), Microsoft’s renamed flock()

mmdf

Use lk_open() and lk_close() as defined by the Multi-channel Memo Distribution Facility

pop

Retrieve mail using POP (the Post Office Protocol). This is the default for Cygwin/MinGW.

IF YOU DON’T USE THE FORM OF INTERLOCKING THAT IS NORMAL ON YOUR SYSTEM, YOU CAN LOSE MAIL!

Usually the value is correctly determined automatically: ‘configure’ tries to detect the method in use, and defaults exist on systems for which this doesn’t work.

However, if you run into problems incorporating new mail, it may be because an incorrect method is being used.

If your system uses the lock file protocol, and permissions are set so that ordinary users cannot write lock files in the mail spool directory, you may need to make ‘movemail’ setgid to a suitable group such as ‘mail’. You can use these commands (as root):

 
chgrp mail movemail
chmod 2755 movemail

If you are using the ‘pop’ locking method, ‘movemail’ must be setuid root.

Installation normally copies movemail from the build directory to an installation directory which is usually under ‘/usr/local/lib’. The installed copy of ‘movemail’ is usually in the directory ‘/usr/local/lib/xemacs-VERSION/TARGET’ (for example, ‘/usr/local/lib/xemacs-21.4.15/i686-pc-cygwin’). You must change the group and mode of the installed copy; changing the group and mode of the build directory copy is ineffective.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

Q6.0.9: Why isn’t ‘movemail’ working?

See section Q6.0.8: An MUA gets an error incorporating new mail..

Note also that older versions of Mozilla came with a ‘movemail’ program that is not compatible with XEmacs. Do not use it. Always use the ‘movemail’ installed with your XEmacs. Failure to do so can result in lost mail.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

Q6.0.10: How do I make my MUA display graphical smilies?

For mh-e use the following:

 
(add-hook 'mh-show-mode-hook '(lambda ()
                                (smiley-region (point-min)
                                               (point-max))))

WJCarpenter writes: For VM use the following:

 
       (autoload 'smiley-region "smiley" nil t)
       (add-hook 'vm-select-message-hook
                 '(lambda ()
                    (smiley-region (point-min)
                                   (point-max))))

For tm use the following:

 
(autoload 'smiley-buffer "smiley" nil t)
(add-hook 'mime-viewer/plain-text-preview-hook 'smiley-buffer)

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

Q6.0.11: How can I get those oh-so-neat X-Face lines?

Firstly there is an ftp site which describes X-faces and has the associated tools mentioned below, at http://ftp.cs.indiana.edu/pub/faces/.

Then the steps are

  1. Create 48x48x1 bitmap with your favorite tool
  2. Convert to "icon" format using one of xbm2ikon, pbmtoicon, etc., and then compile the face.
  3.  
    cat file.xbm | xbm2ikon |compface > file.face
    
  4. Then be sure to quote things that are necessary for emacs strings:
     
    cat ./file.face | sed 's/\\/\\\\/g'
    | sed 's/\"/\\\"/g' > ./file.face.quoted
    
  5. Then set up emacs to include the file as a mail header - there were a couple of suggestions here—either something like:
     
    (setq  mail-default-headers
           "X-Face:  Ugly looking text string here")
    

    Or, alternatively, as:

     
    (defun mail-insert-x-face ()
      (save-excursion
        (goto-char (point-min))
        (search-forward mail-header-separator)
        (beginning-of-line)
        (insert "X-Face:")
        (insert-file-contents "~/.face")))
    
    (add-hook 'mail-setup-hook 'mail-insert-x-face)
    

However, 2 things might be wrong:

Some versions of pbmtoicon produces some header lines that is not expected by the version of compface that I grabbed. So I found I had to include a tail +3 in the pipeline like this:

 
cat file.xbm | xbm2ikon | tail +3 |compface > file.face

Some people have also found that if one uses the (insert-file) method, one should NOT quote the face string using the sed script .

It might also be helpful to use Stig’s script xbm2face (included in the compface distribution at XEmacs.org) to do the conversion.

Contributors for this item:

Paul Emsley, Ricardo Marek, Amir J. Katz, Glen McCort, Heinz Uphoff, Peter Arius, Paul Harrison, and Vegard Vesterheim


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

6.1: Reading Mail with VM


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

Q6.1.1: How do I set up VM to retrieve mail from a remote site using POP?

Use vm-spool-files, like this for example:

 
(setq vm-spool-files '("/var/spool/mail/wing"
                       "netcom23.netcom.com:110:pass:wing:MYPASS"))

Of course substitute your actual password for MYPASS.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

Q6.1.2: How can I get VM to automatically check for new mail?

John Turner writes:

Use the following:

 
(setq vm-auto-get-new-mail 60)

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

Q6.1.3: I have various addresses at which I receive mail. How can I tell VM to ignore them when doing a "reply-all"?

Set vm-reply-ignored-addresses to a list, like

 
(setq vm-reply-ignored-addresses
      '("wing@nuspl@nvwls.cc.purdue.edu,netcom[0-9]*.netcom.com"
        "wing@netcom.com" "wing@xemacs.org"))

Note that each string is a regular expression.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

Q6.1.4: Is there a mailing list or FAQ for VM?

A FAQ for VM exists at http://www.wonderworks.com/vm/FAQ.html.

VM has its own newsgroups gnu.emacs.vm.info and gnu.emacs.vm.bug.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

Q6.1.5: How do I make VM stay in a single frame?

John.John S Cooper writes:

 
                                        ; Don't use multiple frames
(setq vm-frame-per-composition nil)
(setq vm-frame-per-folder nil)
(setq vm-frame-per-edit nil)
(setq vm-frame-per-summary nil)

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

Q6.1.6: Customization of VM not covered in the manual, or here.

Giacomo Boffi writes:

The meta-answer is to look into the file ‘vm-vars.el’, in the vm directory of the lisp library.

vm-vars.el’ contains, initializes and carefully describes, with examples of usage, the plethora of user options that fully control VM’s behavior.

Enter vm-vars, forward-search for toolbar, find the variables that control the toolbar placement, appearance, existence, copy to your ‘init.el’ or ‘.vm’ and modify according to the detailed instructions.

The above also applies to all the various features of VM: search for some keywords, maybe the first you conjure isn’t appropriate, find the appropriate variables, copy and experiment.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

6.2: Reading Netnews and Mail with Gnus


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

Q6.2.1: GNUS, (ding) Gnus, Gnus 5, September Gnus, Red Gnus, Quassia Gnus, argh!

The Gnus numbering issues are not meant for mere mortals to know them. If you feel you must enter the muddy waters of Gnus, visit the excellent FAQ, maintained by Justin Sheehy, at:

 
http://my.gnus.org/FAQ/

See also Gnus home page

 
http://www.gnus.org/

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

Q6.2.2: How do I make Gnus stay within a single frame?

The toolbar code to start Gnus opens the new frame—and it’s a feature rather than a bug. If you don’t like it, but would still like to click on the seemly icon, use the following code:

 
(defun toolbar-news ()
  (gnus))

It will redefine the callback function of the icon to just call gnus, without all the fancy frame stuff.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

6.3: FTP Access


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

Q6.3.1: Can I edit files on other hosts?

Yes. Of course XEmacs can use any network file system (such as NFS or Windows file sharing) you have available, and includes some optimizations and safety features appropriate to those environments.

It is also possible to transparently edit files via FTP, ssh, or rsh. That is, XEmacs makes a local copy using the transport in the background, and automatically refreshes the remote original from that copy when you save it. XEmacs also is capable of doing file system manipulations like creating and removing directories and files. The FTP interface is provided by the standard ‘efs’ package EFS: (efs)Top. The ssh/rsh interface is provided by the optional ‘tramp’ package TRAMP: (tramp)Top.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

Q6.3.2: What is EFS?

#### Write me.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

6.4: Web Browsing with W3


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

Q6.4.1: What is W3?

W3 is an advanced graphical browser written in Emacs lisp that runs on XEmacs. It has full support for cascaded style sheets, and more...

It has a home web page at http://www.cs.indiana.edu/elisp/w3/docs.html.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

Q6.4.2: How do I run W3 from behind a firewall?

There is a long, well-written, detailed section in the W3 manual that describes how to do this. Look in the section entitled "Firewalls".


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

Q6.4.3: Is it true that W3 supports style sheets and tables?

Yes, and much more. W3, as distributed with the latest XEmacs is a full-featured web browser.


[ << ] [ >> ]           [Top] [Contents] [Index] [ ? ]

This document was generated by Aidan Kehoe on December 27, 2016 using texi2html 1.82.