To get LDAP working with Thunderbird, I followde Lynda McGinley's excellent instructions, paraphrased here:
When I'm on a foreign network, like a conference wireless network or a hotel room network, I use the VPN client and ssh to ibex to read mail. If I'm on a foreign machine like at an Internet cafe, I use the web interface to the CommuniGate software at https://mail.ucar.edu. I don't use http://webmail.ucar.edu, which is another web-bsed email interface written by Leonard Sitongia.
I downloaded and installed letterbox.app, which makes Mail.app display the content next to the list of emails.
Images in exmh - see Images in exmh
You can insert a file as a MIME attachment when composing messages in XEmacs mh-letter mode. Use C-c C-m tab to insert a MIME placeholder. When finished composing the message, just before exiting, use C-c C-e to expand all the placeholders and insert all the MIME headers. Some MIME types you can use are
Word - application/msword
Excel - application/vnd.ms-excel
PowerPoint - application/vnd.ms-powerpoint
Stephan Skrodzki wrote on Jun 15, 2005:
Maybe it's a FAQ, but I haven't found it while googling around for some time:It isn't completely useless. An mh user can use "burst" to extract the forwarded message(s) as individual messages.How do I forward a Mail with MIME Attachments so, that most MUAs understand that?
I only found two forward possibilities:
a) plain forward: this generates messages without any MIME parts -> useless
b) mh mime forward (forw -mime): this generates nested MIME, which many MUAs (Apple Mail, evolution etc.) do not understand...Any mailer that doesn't understand this format has broken mime support.
Is there something I haven't seen yet?Send the person two messages:
(a) a short note indicating that you are resending a message seperately,
(b) the original message, resent using "dist" (in mh/nmh) or "redidstribute" from inside exmh.
Even mailers with broken mime support should be able to handle that.
-NWR
rpm -i metamail-2.7-29.i386.rpm sharutils-4.2.1-8.7.x.i386.rpm
From " lines inside
mail messages. The procmail way is better, but is harder
to set up (surprise). To use procmail, first you have to
get and install procmail. See the
procmail home page for
details. Procmail is installed as part of the Red Hat 7.2
distribution, so I didn't need to get/install it, but I did need
to allow sendmail to execute it via sendmail's restricted shell,
by doing this:
(as root)
ln -s /usr/bin/procmail /etc/smrsh
Here are notes about how to configure and debug procmail
filtering. Note: when experimenting with sending yourself mail,
check the ~/Procmail/log file for
procmail's log messages.
Create a .procmailrc file...
cd
cat >.procmailrc
#
# For an explanation of all this, see
# http://www.ii.com/internet/robots/procmail/qs
#
# where I store my mail
MAILDIR=$HOME/Mail
# so procmail can find rcvstore
PATH=/usr/lib/nmh:/usr/bin:/usr/local/bin
# what to do with mail that doesn't match any recipes
DEFAULT=$MAILDIR/inbox
# Set to yes when debugging
VERBOSE=no
# Remove ## when debugging; set to no if you want minimal logging
## LOGABSTRACT=all
# Directory for storing procmail-related files
PMDIR=$HOME/Procmail
# Put ## before LOGFILE if you want no logging (not recommended)
LOGFILE=$PMDIR/log
# recipe files
#INCLUDERC=$PMDIR/testing.rc
INCLUDERC=$PMDIR/main.rc
^D
chmod 644.procmailrc
Create the main filter file. Each of the rules here has to refer
to an exmh folder that already exists. Create the folder using
the New button in exmh.
cd
mkdir Procmail
cd Procmail
cat >main.rc
:0
* ^TO_ABILENEV6-L
| rcvstore +abilenev6
:0
* ^TO_ABILENE-OPS-L
| rcvstore +abilene-ops
:0
* ^TO_abilene-techs
| rcvstore +abilene-techs
:0
* ^From:.ARSystem
| rcvstore +arsystem
etc.
^D
Create a .forward file...
cd
cat >.forward
"|exec /usr/bin/procmail"
^D
chmod 644 .forward
cd /usr/src/nmh-1.1-RC3
./configure
Then I edited the config.h file and commented-out
DBMPWD. Probably doesn't matter.
make
make install
This stores nmh binaries in /usr/local/nmh/bin
and man pages in /usr/local/nmh/man, so you'll have to update the
.bashrc file.
Nmh 1.0.4-9 came installed on gazelle.
Most of the nmh binaries (inc, show, etc) are installed in
/usr/bin. Some binaries are in
/usr/lib/nmh.
Update the .bashrc file to add
if [[ ($AMROOT = "no") && (${HOST} = 'proteus' || ${HOST} = 'gazelle' ) ]]; then
MHLIB=/usr/lib/nmh
if [[ -d ${MHLIB} ]]; then
if [ $DEBUGGING ]; then
echo ".bashrc: setting up nmh..."
fi
export MHLIB
pathadd ${MHLIB}
# /usr/bin is already in the path
# manadd /usr/local/nmh/man
else
unset MHLIB
fi
fi
localname: gazelle
localdomain: ucar.edu
masquerade: draft_from
servers: mail.ucar.edu
When nmh configures an outbound message, it formats the headers by following the templates contained in four files:
~/Mail/components~/Mail/replcomps~/Mail/replgroupcomps~/Mail/forwcomps
Note that the versions of these files in
/usr/local/nmh/etc are not the
ones that count, so don't bother editing them.
If you don't have the proper templates in these files, you can
have some very irritating effects. For a few
years, these files were slightly wrong, and
when I forwarded or replied to a message, the envelope
From line in my outbound messages
was "siemsen@proteus.ucar.edu" instead of "siemsen@ucar.edu".
This caused replies to those messages to bounce. As described
above, you need "From:" lines in these template files. As of
2004-03-04, here are the "correct" contents of those files:
components
To:
From: Pete Siemsen <siemsen@ucar.edu>
Subject:
Fcc: outbox
--------
replcomps
From: Pete Siemsen <siemsen@ucar.edu>\n\
%(lit)%(formataddr %<{mail-reply-to}%?{reply-to}%?{from}%?{sender}%?{return-path}%>)%<(nonnull)%(void(width))%(putaddr To: )\n%>\
%<{subject}Subject: Re: %{subject}\n%>\
%<{date}In-Reply-To: Your message of "%<(nodate{date})%{date}%|%(pretty{date})%>."%<{message-id}
%{message-id}%>\n%>\
Fcc: +outbox\n\
--------
replgroupcomps
From: Pete Siemsen <siemsen@ucar.edu>\n\
%(lit)%(formataddr %<{mail-reply-to}%?{reply-to}%?{from}%?{sender}%?{return-path}%>)%<(nonnull)%(void(width))%(putaddr To: )\n%>\
%<{cc}Cc: %{cc}\n%>\
%<{subject}Subject: Re: %{subject}\n%>\
%<{date}In-Reply-To: Your message of "%<(nodate{date})%{date}%|%(pretty{date})%>."%<{message-id}
%{message-id}%>\n%>\
Fcc: +outbox\n\
--------
forwcomps
To:
From: Pete Siemsen <siemsen@ucar.edu>
Subject:
cc:
Fcc: +outbox
--------
Web to the EXMH home page and click on exmh-2.7.2.tar.gz. Save it in /usr/src.
cd /usr/src
gunzip exmh-2.5.tar.gz
tar xf exmh-2.5.tar
rm exmh-2.5.tar
cd exmh-2.5/
wish exmh.install
This starts an Exmh Install window with buttons and a Install EXMH window containing help text. In the Exmh Install window, change the paths to the following:
MH slocal program: /usr/local/nmh/lib/slocal
Root dir of faces store: <blank it out since I don't use faces>
Your default domain: ucar.edu
Audio play command: /usr/bin/play
Click on the I have read the instructions button, then the Install button, then the Really Install button. Wait until it's done, then click on the Quit button.
Ok, now you can run it. The first time, it'll ask if you want to create a drafts directory. Click Yes.
When I ran exmh as siemsen, I got this message:
BgRegister X server insecure (must use xauth-style authorization); command ignored
It isn't very clear what the problem is. I posted a whine to
exmh-users
mailing list. Responses were to run xdm, which will take care
of this. It does, but I don't want to run xdm. After some
pain, I finally found that doing this:
xauth generate :0.0 .
or
xauth add :0 . `mcookie`
to create a $HOME/.Xauthority file and then starting X with the
"-auth $HOME/.Xauthority" option worked. The trouble is, now
doing a "su" and then trying to run an X application gives this
error:
Xlib: connection to ":0.0" refused by server
Xlib: Invalid MIT-MAGIC-COOKIE-1 key
xterm: can't open display :0.0
To fix this, as root, copy siemsen's
.Xauthority file to
/root
~/.exmh/exmh-defaults file. When a
message contains HTML, exmh will display a window that says
There are alternative views of the following.
You can then right-click on the window to pop up a menu that
offers Show alternative: text/html, which will
cause the message to be displayed in Netscape.
*mime_alternative_prefs: text/plain text/richtext text/html
You'll probably have to restart exmh to see the effects of this.
exmh-async gnuclient
You'll probably have to restart exmh to see the effects of this.
This causes exmh to run gnuclient whenever you compose a message.
Exmh does so in an asynchronous process, so exmh isn't paused
while the gnuclient runs. Gnuclient is a way to tell a running
XEmacs to do things. The XEmacs has to have been told to run
gnuserv to listen for gnuclient "calls" (see below). Gnuclient
communicates with gnuserv using a Unix domain socket in ${TMPDIR}.
For this to work, you'll need to add this to your
.bashrc file:
export EXMHTMPDIR=~/tmp
So: gnuclient asks XEmacs to open a frame containing the compose
template. When you're done using XEmacs to compose the message,
hit C-c Y and confirm it, and XEmacs will hand the message back to
exmh, which will display a "What Now?" window. Click "Send"
to send the message.
Then copy Ben's elisp into your
.xemacs/init.el file. This sets
things up so that when you compose a message in exmh, exmh
causes XEmacs to open a frame and put it into mh-letter-mode.
When you're finished composing the message, hit Control-C T.
See the .emacs file for details.
One of the features of Ben's ELisp code in the
.emacs file is support for
"Supercite", an Emacs package that helps you cite someone
else's email message in your own email message. This is great
for replying to mail. See the info page for Supercite for
details. The long and the short of it is, when you put Ben's
ELisp fragment in your .emacs file, and then reply to a message
from exmh, you can use the C-c C-y command to insert the message
you're replying to into the reply.
.forward and
.procmailrc files, start exmh, click
Preferences, then Incorporate Mail, then set the
Ways to Inc button to none. Click Dismiss,
then IMPORTANT!!! click Save, not Dismiss.
This tells exmh not to sort incoming mail into folders, and to
remove the Inc button from the exmh user interface. This is
cool, because incoming mail will be sorted into folder as it
arrives, when fetchmail executes procmail, which
reads the .procmailrc file, which
sorts each mail message into a folder using rcvstore.
~/.exmh/exmh-addrs. Then, when you
compose messages, you can use C-TAB to complete email addresses.
I dunno how good this is. To turn it off to prevent exmh from
saving up addresses, go to Preferences->Address
Database and unclick the top button.
cd /usr/src
gunzip glimpse-latest.tar.gz
tar xf glimpse-latest.tar
rm glimpse-latest.tar
chown -R siemsen:datacomm glimpse-4.18.1p
exit (back to "siemsen")
cd /usr/src/glimpse-4.18.1p
(per README.install)
sh configure
make
su
cd /usr/src/glimpse-4.18.1p
make install
This install some binaries in /usr/local/bin, including glimpse
and glimpseindex, and man pages for them.
To index my mail folders, do
glimpseindex -o ~/Mail
This writes index files named .glimpse* in my home directory.
The glimpse program will look at those files, like
glimpse abcdef
Now try, from within exmh, Search->All
messages in all folders (glimpse)
to bring up the exmh Glimpse window. In that window, click
index to index all the Mail folders.
See
http://localhost/exmh-2.7.2/Search.html.
(as root)
yum install kdegraphics
and then changed the entry in
/etc/mailcap to make it say
image/*; /usr/bin/kview %s
postfix-2.0.10.tar and did
as root
cd /usr/src
tar xf postfix-2.0.19.tar
rm postfix-2.0.19.tar
cd postfix-2.0.19
make
groupadd -g 501 -f postdrop
groupadd -g 502 -f postfixgrp
useradd -u 98 -g 502 -c "Pete Siemsen" postfix
make install
hit RETURN to all prompts
This finsihed with
Warning: you still need to edit myorigin/mydestination/mynetworks
parameter settings in /etc/postfix/main.cf.
See also http://www.postfix.org/faq.html for information about dialup
sites or about sites inside a firewalled network.
BTW: Check your /etc/aliases file and be sure to set up aliases
that send mail for root and postmaster to a real person, then run
/usr/bin/newaliases.
I modified /etc/postfix/main.cf as follows:
default_privs = nobody
myhostname = ibex.scd.ucar.edu
myorigin = ucar.edu
inet_interfaces = localhost
mydestination = $myhostname, localhost.$mydomain
mynetworks_style = host
mailbox_command = /usr/bin/procmail
smtpd_banner = $myhostname ESMTP $mail_name
Then I created a postfix startup file in
/etc/init.d containing
#!/bin/bash
#
# postfix Starts postfixd/klogd.
#
#
# chkconfig: 2345 98 20
# description: postfix, a replacement for sendmail
### BEGIN INIT INFO
# Provides: $postfix
### END INIT INFO
# Source function library.tcl8.4.7/unix
. /etc/init.d/functions
RETVAL=0
start() {
echo -n $"Starting postfix: "
postfix start
RETVAL=$?
return $RETVAL
}
stop() {
echo -n $"Stopping postfix: "
postfix stop
RETVAL=$?
return $RETVALtcl8.4.7/unix
}
reload() {
postfix reload
}
case "$1" in
start)
start
;;
stop)
stop
;;
restart|reload)
reload
;;
*)
echo $"Usage: $0 {start|stop|reload|restart}"
exit 1
esac
exit $?
Then I did
as root
cd /etc/init.d
./sendmail stop
chmod +x postfix
chkconfig --add postfix
chkconfig --del sendmail
newaliases
./postfix start
Look in /var/log/maillog for log messages about postfix starting
and stopping.
Fetchmail uses IMAP to get my mail from mail.ucar.edu. Web to fetchmail home page for details.
cd /usr/src
gunzip fetchmail-5.9.5.tar.gz
tar xf fetchmail-5.9.5.tar
rm fetchmail-5.9.5.tar
cd fetchmail-5.9.5
./configure (ignore makedepend error messages)
make
make install
ln -s /usr/sbin/sendmail /usr/lib/sendmail
Configuring fetchmail consists of creating a
.fetchmailrc file in your home directory. A
GUI program called fetchmailconf is provided
to help you do this. I couldn't get fetchmailconf to write a
good .fetchmailrc file. My best efforts
produced a file containing only a timestamp comment. So I had
to actually read the man page and learn the syntax used in the
file, which wasn't trivial. Sigh.
While developing a .fetchmailrc
file, it can be helpful to run fetchmail
--version, which will tell you the version and other
interesting information about what fetchmail would do, without
doing anything.
Fetchmail fetches mail from the server. Fetchmail delivers the mail to the local postfix daemon, which finds my ~/.forward file and invokes procmail to sort the mail into folders.
If fetchmail gives you messages like
skipping message siemsen@mail.ucar.edu:1 not flushed
...it means that you've used another IMAP client to read your
mail, and the other client marked the messages you read as "seen"
on the server. Fetchmail won't fetch "seen" messages, so you'll
continue to get the "skipping" messages until you delete the
"seen" messages from the IMAP server.
On 6/12/2001, at a conference, I connected to a local network, both cabled and wireless. When I executed fetchmail, I got the following error:
131 messages for siemsen at proteus.
reading message 1 of 131 (740 header octets) fetchmail: SMTP error: 250 2.0.0 Reset state not flushed
reading message 2 of 131 (2406 header octets) ..fetchmail: SMTP error: 250 2.0.0 Reset state not flushed
reading message 3 of 131 (2014 header octets) .
At each of the above failures, it displayed "octets)..", then waits exactly 80 seconds (80, not 60), then displays the message from fetchmail and immediately moved on to the next message.
In an attempt to "fix" it, I Greg Woods suggested that I use ssh port forwarding. I did so, as follows. Note that it didn't fix the problem. Then, later, it started working, for no reason that I can fathom. The next day, it failed again, the same way, and I didn't get it working.
To set up port forwarding, you first start an ssh session to mail.ucar.edu and include port forwarding of the IMAP protocol. Then you run fetchmail in a way that does IMAP to localhost instead of to mail.ucar.edu.
(as root)
ssh -l siemsen -L 143:mail.ucar.edu:143 mail.ucar.edu
(as siemsen)
fetchmail -f ~/.fetchmailrc-wireless
/etc/postfix/aliases file. Set root
to "siemsen@ucar.edu". This will cause all messages to "root" or
"postmaster" to go to "siemsen@ucar.edu".
Set up the ~/.mh_aliases file, so
I can use shortcuts when I compose new mail messages. It should
contain, like,
delynn: delynnmarie@yahoo.com
fmc: fmc@ucar.edu
colburn: Scot Colburn
scot: Scot Colburn
~/Mail directory.
If an inbound email message for siemsen@ucar.edu passes the blacklist filtering, it enters the MAIA system, where it first goes through the virus scanner. IF it contains a virus or a Windows .exe MIME attachment, it is dropped. You can't control virus scanning.
Next, the message goes through SpamAssassin, where it is assigned a score. To control the score threshold past which the email is considered spam, follow the directions at UCAR Spam page. Set the level to "High", which equals a SpamAssassin score of 3.
Finally, the email message is delivered, and your mailer does it's own filtering. Mac Mail uses a Bayesian filter that I train by assigning mail to "junk" or not.
niwot$ lds nets-outage
cn=nets-outage, ou=aliases, dc=ucar, dc=edu
sn=nets-outage
fwd=nets, cpg, hmail@netserver
description=NETS Outages (David Mitchell)
niwot$
This tells you that nets-outage forwards to nets and cpg and
hmail@netserver. See (ldapsearch)
for details.
If it's a mailman list, the "forward" line will be an address like xyz@mailman. Such lists can be "advertised" or "unadvertised". If it's advertised, you'll find the list at http://mailman.ucar.edu/mailman/admin. If it's unadvertised, you won't find it there, and you have to go directly to the link for the individual list. For instance, the link for frgp-outage list is http://mailman.ucar.edu/mailman/admin/frgp-outage
PROs of IMAP mailers
Before Mailguard will perform content-based filtering on your mail, you must configure a minimum of two things. To do so, log in to Mailguard system, then:
- Link your e-mail addresses to your account:
- Go to the Settings page (click the "cog" wheel icon).
- Enter your main UCAR address in the Username field, e.g. joe@ucar.edu. Enter your UCAR Central Authentication Services (UCAS) password, then click the "Add E-Mail Address" button (you must click the button, hitting return will not work as expected).
- Return to the Settings page. Enter your divisional address (e.g. joe@division.ucar.edu) in the same way.
- Return to the Settings page. Enter your ncar.ucar.edu address (e.g. joe@ncar.ucar.edu) in the same way.
- It does not matter (in UCAR's environment) which address is Primary, as long as all of the addresses at which you receive mail are linked to your account.
- Enable Spam filtering:
- Go to the Settings page.
- Click on your Primary address, e.g. joe.
- Click the Enabled radio button under Spam Filtering.
- Click the "Update ALL Addresses' Settings" button (so this change will apply to all the addresses you have linked to your account).