Mutt: Inbox is not a mailbox

Frank K lnxadmn at yahoo.com
Tue Mar 9 13:07:31 EST 2004


I configured fetchmail,procmail,sendmail and mutt to
work with my email. However when I try to read my
email with mutt it tells me that my inbox is not a
mailbox. Thus I cannot read my email.i have looked for
answers and I have come up with nothing. I have
included my procmailrc and muttrc and any help would
be great because i would love to read my emails :)

------.muttrc---------------
# the aliases file, so you don't have to remember
their address.
# File to use for saving new aliases
set     alias_file=~/.mutt.aliases
set mbox_type = Maildir
# File to search for aliases in
#source  ~/.mutt.aliases

# Boolean Variables:
#       set foo
# OR    unset foo
# or    toggle foo
# or    reset foo (reset to compile time default)
# or    set nofoo  or set invfoo (inverts actual
value)

unset allow_8bit         # use QP or Base64 if unset.
unset arrow_cursor       # "->" as cursor (faster on
slow networks).
unset ascii_chars        # Use ASCII chars for
threading arrows.
unset askbcc             # ask to fill out Bcc on
mesg-send?
unset askcc              # ask to fill out CC on
mesg-send?
  set attach_split       # handle every single
attachment instead of concat
  set autoedit           # start editor without asking
for to, subject,...
  set auto_tag           # if something is tagged, run
commands on tagged msgs.
  set beep               # beep on certain user errors
and other errors
  set beep_new           # beep on new mail
unset bounce_delivered   # unset => remove
Delivered-To: when bouncing.
  set check_new          # search for new messages in
maildir/MH folders.
unset collapse_unread    # don't collapse threads with
unread mails
unset confirmappend      # prompt for confirm when
appending message to ex. mbox
  set confirmcreate      # prompt for confirm when
saving to non existing mbox
  set copy               # always keep a copy of my
mails
  set delete_untag       # untag messages when marking
them for deletion.
  set edit_headers       # put headers in editor when
composing messages
  set encode_from        # use Quoted-Printable, if
^From in a mail.
  set fast_reply         # do not ask for to,
subject,... when replying.
  set fcc_attach         # store attachments too when
doing a Fcc
  set fcc_clear          # FCCs will be stored
unencrypted and unsigned
  set followup_to        # Add Mail-Followup-To
header.
unset force_name         # outgoing mail to be saved
in folder of "login name"
  set forward_decode     # decode messages when
forwarding without MIME
unset forward_decrypt    # decrypt PGP message, when
mime_forward and !mime_fw_d
unset forward_quote      # quote forwarded message, if
not $mime_forward
  set hdrs               # nohdrs implies not to write
my_hdr into mail.
unset header             # quote full header on reply
  set help               # show help in first line of
the display
unset hidden_host        # when set, skip the host
name part of hostname
  set honor_followup_to  # Mail-Followup-To header is
honored?
unset ignore_list_reply_to    # ignore Reply-To
pointing back to mailinglist
  set implicit_autoview  # use autoview, if a
"copiousoutput" is in mailcap.
  set mailcap_sanitize   # remove ugly chars from
mailcap % expands.
  set mark_old           # mark new articles as old,
when leaving mbox
  set markers            # put a '+' at the beginning
of wrapped lines.  
  set menu_scroll        # scroll on last line of menu
(set) or do a nextpage?
unset meta_key           # Don't interpret Alt-x as
ESC x
unset metoo              # should we keep ourselves in
group replies?
  set mh_purge           # remove messages marked as
deleted from MH folders.
unset mime_forward_decode     # decode messages when
forwarding with MIME
  set pager_stop        # Don't jump to next message
at end of message.
unset pgp_autosign
  set pgp_replysign     # always sign reply to signed
message
  set pgp_replyencrypt  # always encrypt reply to
encrypted message
  set pgp_replysignencrypted # yeah
unset pgp_verify_sig    # always verify pgp signatures
unset pgp_show_unusable # Show non-usable keys on the
PGP key selection menu?
unset pipe_decode       # Weed headers and PGP-decode
message before piping
  set pipe_split        # split tagged messages (or
don't) when using "|"
unset prompt_after      # display prompt after exit
from pager
unset read_only         # folders not read only
unset reply_self        # if unset, a reply to
yourself implies reply to other
  set resolve           # go to next undeleted message
after modifying actual
unset reverse_alias     # use realname from reverse
alias lookup
unset reverse_name      # Set "From" to address, where
replied mail was sent to
unset save_address      # Use full mail adress (with
domain) as default folder.
unset save_empty        # remove mailbox when last
message is removed.
unset save_name         # Fcc, if ~/Mail/<to> exists.
unset score             # don't do scoring
unset sig_dashes        # Don't prepend "-- \n" to the
signature
  set smart_wrap        # wrap long lines at word
boundary.
  set sort_re           # set: only put a child in a
thread, if starts with Re:
  set status_on_top     # status line at the top or
button?
unset strict_threads    # thread only by
In-Reply-To/References or by Subject.
unset suspend           # Ctrl-Z is able to suspend
mutt.
unset thorough_search   # MIME decode before
searching.
  set tilde             # Internal Pager: ~~~~ at and
of message?
unset uncollapse_jump   # don't move pointer, when
uncollapsing thread
unset use_8bitmime      # run sendmail 8.8.x with
-B8BITMIME to enable 8bit 
unset use_domain        # add $domain to all addresses
without @host
unset use_from          # generate a "From:" header
(unless my_hdr From:)
  set user_agent        # Create User-Agent:
Mutt/<Version> header.
  set wait_key          # Only "press a key" if return
value non-zero
  set wrap_search       # Wrap search to top/bottom.
unset write_bcc         # send Bcc: line to $sendmail

# Quadoptions 
#       set foo=yes
#  or   set foo=ask-yes
#  or   set foo=no
#  or   set foo=ask-no
#  or   reset foo (reset to compile time default)     
 

set abort_nosubject=no     # Abort, if message has no
subject.
set abort_unmodified=yes   # Abort, if message wasn't
edited.
set delete=yes             # ask for confirmation when
deleting messages?
set honor_followup_to=yes  # Ask whether to honor
Mail-Followup-To header
set include=yes            # quote message, when
replying
set mime_forward=ask-no    # use MIME when forwarding
mails.
set move=no                # Move mail-spool to $mbox?
set postpone=ask-yes       # ask for postponing when
doing an Abort.
set print=ask-yes          # ask whether you really
want to print.
set quit=yes               # ask before quitting.
set recall=no              # ask for using postponed
message.
set reply_to=yes           # Use or ignore Reply-To.

set attribution="* %n (%a) wrote:"
set charset="iso-8859-1"
set send_charset="us-ascii:iso-8859-1:utf8"
set date_format="!%a %b %d, %Y at %I:%M:%S%p %Z"
set default_hook="~f %s | ~t %s"
#set editor="vim '+/^$'"
set editor="vim '+:5'"
#set editor="nano"
set folder=~/mail     # directory with all mail
folders
set history=50
set indent_str="> "   # change this and I'll kill you!
 ;-)
set ispell=/usr/lib/mutt/mailspell
set mail_check=5
set mark_old          # set: make distinction between
New mail and Old mail.
set markers
set mbox=/home/frank/mail/
set pager_context=3
set pager_index_lines=9   # number of lines to see
from the index
set pgp_timeout=1000  # number of seconds to cache
passphrase
set postponed=~/mail/postponed
set quote_regexp="^( {0,4}-?[>|:%]|
{0,4}[a-z0-9]+[>|]+)+"
set read_inc=20
set realname="Frank Kumro"
set record=+sent    # Where to save sent mail?
set reply_regexp="^((re|RE|SV|Re|r e|aw) ?:[ \t]*)*"
set simple_search="~f %s | ~C %s | ~s %s"   # default
pattern (Fr|To|Cc|Su)
set sort_alias=alias
set sort_browser=alpha
#set spoolfile=~/mail/Inbox
set status_chars="-*%A" # status of mbox (unchanged,
changed, readonly, attach)
set tmpdir="/tmp"
#set to_chars=" +TCFL"  #default (Not to me, To me, CC
me, From me, mailing list)
set to_chars=" +TCF "  #default (Not to me, To me, CC
me, From me)
set write_inc=10 # number - display increment count
for every n-th mail


##
======================================================================
## Format Strings:
##
======================================================================

## forward_format - format the text used in the format
attribution
set forward_format="(forw) [%a: %s]"
set index_format="%4C %Z %[!%d/%m] %-17.17F (%3l) %s"
set pager_format="%S [%C] %n (%l) %s"
#set folder_format="%F %-8.8u %-8.8g %d %8s %N %f"
set folder_format="%F %d %8s %N %f"
set status_format="-%r-Mutt: %f [Msgs:%?M?%M/?%m%?n?
New:%n?%?o? Old:%o?%?d? Del:%d?%?F? Flag:%F?%?t?
Tag:%t?%?p? Post:%p?%?b? Inc:%b? %?l?
%l?]---(%s/%S)-%>-(%P)---"

##
========================================================================
## AUTO_VIEW - tell mutt which "content types" to view
with
## the command given in the $HOME/.mailcap file.
##
========================================================================

auto_view text/html text/enriched application/x-gunzip
application/postscript /gif application/x-tar-gz
application/pgp-signature image/*

##
========================================================================
## BIND - bind commands to keys.
##
========================================================================

## ========================
## Bindings for attach menu
## ========================

bind attach ' ' select-entry

## ============================
## Bindings for index and pager
## ============================

bind index   \t    next-new
bind pager   \t    next-new
bind index   ' '   next-unread
bind pager   ' '   next-unread
bind index   V     show-version
bind pager   V     show-version
bind index   A     create-alias
bind pager   A     create-alias

## =============
## spam handlers
## =============
macro index  S     <pipe-message>"get_from.pl >>
~/.procmail/spammers"<enter>s="SPAM\n"
macro pager  S     <pipe-message>"get_from.pl >>
~/.procmail/spammers"<enter>s="SPAM\n"
macro index  X     <pipe-message>"get_from.pl --domain
>> ~/.procmail/spammers"<enter>s="SPAM\n"
macro pager  X     <pipe-message>"get_from.pl --domain
>> ~/.procmail/spammers"<enter>s="SPAM\n"
macro index  F     <pipe-message>"get_from.pl >>
~/.procmail/friends"<enter>
macro pager  F     <pipe-message>"get_from.pl >>
~/.procmail/friends"<enter>

macro index \cb <pipe-message>"spamprobe
spam"<enter>s="SPAM\n"
macro pager \cb <pipe-message>"spamprobe
spam"<enter>s="SPAM\n"
macro index \cg <pipe-message>"spamprobe
good"<enter>s="Inbox\n"
macro pager \cg <pipe-message>"spamprobe
good"<enter>s="Inbox\n"

## ==============================================
## Bindings for editing and reloading the .muttrc
## ==============================================

macro generic   ,ve   "!Eterm -e vim ~/.muttrc &\r"
macro generic   ,vu   ":source ~/.muttrc\r"
macro generic   ,va   "!Eterm -e vim ~/.mutt.aliases
&\r"

## These run fetchmail (or wake up the daemon)
macro pager   G     "!fetchmail\r"
macro index   G     "!fetchmail\r"

## ==================
## Bindings for index
## ==================

bind index   P          recall-message
bind index   s          save-message
bind browser x          check-new
bind index   <pagedown> next-page
bind index   <pageup>   previous-page
bind index   x          sync-mailbox
bind index   a          tag-prefix
bind index   \;         tag-entry
bind index   t          tag-entry

macro index  ,l         "l~N ! ~p\n"
macro index  ,n         "l~N\n"

# ======================================
# Quickly change to my favorite folders:
# ======================================
macro index  "\\S"  "c=sent\r"
macro pager  "\\S"  "c=sent\r"
macro index  I      "c!\n" "Go to Inbox"
macro pager  I      "c!\n" "Go to Inbox"

# ===========================
#    Bindings for pager
# ===========================

bind pager     /   search
bind pager     L   list-reply
bind pager     b   bounce-message
bind pager     f   forward-message
bind pager     m   mail
bind pager     g   group-reply
bind pager     j   next-line
bind pager     k   previous-line
bind pager     :   enter-command
bind pager     p   previous-undeleted
bind pager     n   next-undeleted
bind pager     \n  next-new
bind compose   \n  send-message
bind compose   s   send-message
bind pager     ,p  print-message

macro pager J "!gpg --keyserver wwwkeys.eu.pgp.net
--recv-key " "Get PGP Key"
macro pager K "!gpg --lsign-key " "Sign PGP Key"

# funky gimmick, but I never use it =)
macro pager ,s "|festival --tts\r"

macro pager "i"
"<sync-mailbox><change-folder>?<toggle-mailboxes>"
macro index "i"
"<sync-mailbox><change-folder>?<toggle-mailboxes>"

macro compose S "Fgpg --clearsign\ny" "clearsign
message"

## =====================================
## Tom's cursor movement system [tm] ;-)
## =====================================

bind  pager   <up>     previous-line
bind  pager   <down>   next-line
bind  pager   <left>   exit 
bind  pager   <right>  view-attachments
bind  attach  <left>   exit
bind  attach  <right>  view-attach
bind  index   <right>  display-message
# Pre mutt 1.3.x, you'll want this instead:
#macro index   <left>   "c?"
 macro index   <left>   "c?<tab>"
bind  browser <right>  select-entry
bind  browser <left>   exit

# run the little brother database query binary
set query_command = "lbdbq %s"

## =================
## Color definitions
## =================
color attachment white     magenta
color body      cyan       default  "ftp://[^ ]*"
color body     brightgreen default
"[[:alnum:]][-+.#_[:alnum:]]*@[-+.[:alnum:]]*[[:alnum:]]"
color body      cyan       default  "<URL:[^ ]*>"
color bold      green      default
color error     red        default

color header    yellow     default  "^from"
color header    green      default  "^from:"
color header    green      default  "^to:"
color header    green      default  "^cc:"
color header    green      default  "^date:"
color header    yellow     default  "^newsgroups:"
color header    yellow     default  "^reply-to:"
color header    brightcyan default  "^subject:"
color header    red        default  "^x-spam-rule:"
color header    yellow     default  "^x-mailer:"
color header    yellow     default  "^message-id:"
color header    yellow     default  "^Organization:"
color header    yellow     default  "^Organisation:"  
color header    yellow     default  "^User-Agent:"  
color header    yellow     default  "^message-id:
.*pine"
color header    yellow     default  "^X-Fnord:"
color header    yellow     default 
"^X-WebTV-Stationery:"
color header    yellow     default  "^X-Message-Flag:"
color header    yellow     default  "^X-Spam-Status:"
color header    yellow     default  "^X-SpamProbe:"
color header    red        default  "^X-SpamProbe:
SPAM"

color indicator white      blue
color markers   red        default
color message   white      blue

## ==================================================
## Colorizing the body of messages (ie in the pager)
## ==================================================

color normal    white     default  # pager body

#  Coloring quoted text - coloring the first 7 levels:
color quoted    cyan      default
color quoted1   yellow    default
color quoted2   red       default
color quoted3   green     default
color quoted4   cyan      default
color quoted5   yellow    default
color quoted6   red       default
color quoted7   green     default

color signature brightred      default
color status    white          blue
color tilde     blue           default
color tree      brightmagenta  default
color underline yellow         default
color body      yellow         default  "[;:]-[)/(|]" 
# colorise smileys
color body      yellow         default  "[;:][)/(|]"
#color body      brightblue     default 
"(http|https|ftp|news|telnet|finger)://[^ ]*"
color body      brightblue     default  "\\b[^ ]+://[^
]*"

color index     yellow         default  ~N      # New
color index     yellow         default  ~O      # Old
color index     cyan           default  '~s gilbertt
~f enlightenment-cvs'
color index     brightgreen    default  '~p'    # mail
to myself
color index     brightcyan    default  '~P'    # mail
from myself
color index     magenta        default  ~F      #
Flagged
color index     blue           default  ~T      #
Tagged
color index     red            default  ~D      #
Deleted

# Headers to ignore/see
# Ignore everything but the really important lines:
ignore *
unignore from: date subject to cc reply-to:
unignore organization organisation
unignore user-agent: x-agent: x-mailer: x-newsreader:
unignore newsgroups: posted-to: x-spam-rule:
X-Spam-Status: X-SpamProbe:
# These can provide amusement
unignore X-Fnord: X-WebTV-Stationery: X-Message-Flag:

# ordering of headers in the pager
unhdr_order *
hdr_order Date: From: To: Cc: X-Newsreader: X-Mailer:
Organization: Organisation: User-Agent: X-Fnord:
X-WebTV-Stationery: X-Message-Flag: Newsgroups:
Reply-To: X-Spam-Status: x-spam-rule: x-SpamProbe:
Subject:

# this is cool, dual text/html mails have only the
text part shown
alternative_order text/plain   # I like plaintext more
than html.

## "alternates" tells mutt about your addresses.  Mutt
thus can show mails
## addresses to you in the folder index as "personal"
using the flag '+'.
set
alternates=((frank|webmaster)@digital-ignorance.com|kumro at adelphia.net|fdkumro at buffalo.edu)

# Set the defaults for folders:
folder-hook .    set timeout=30
folder-hook .    set sort=threads
folder-hook .    set sort_aux=date-sent
# When I'm in the main index, check more often :)
folder-hook "!"  set timeout=5
# Mail in my inbox is more date than thread
sensitive...
folder-hook "!"  set sort=date-received
folder-hook "sent"  set sort=reverse-date


save-hook .* =lists/%B
folder-hook .    set signature=~/.signature
folder-hook .    save-hook .* =lists/%B
folder-hook .    unmy_hdr *
folder-hook .    my_hdr From: Frank Kumro
<frank at digital-ignorance.com>
folder-hook .    my_hdr X-Info:
http://www.digital-ignorance.com
send-hook   .    my_hdr X-Operating-System:
Linux/`uname -r` (`uname -m`)
send-hook   .    my_hdr X-Uptime: \`uptime\`
folder-hook .    set signature="~/.signature" 
#folder-hook crackmonkey my_hdr From: Frank Kumro
<frank at digital-ignorance.com>
#folder-hook crackmonkey set
signature="~/.signature.crackmonkey"
#folder-hook . set pgp_create_traditional=no
#folder-hook crackmonkey set
pgp_create_traditional=yes

## "lists" adds a list of mailing lists addresses
## so mutt knows about these for showing them in the
folder indes
## and to allow replying to them with the command
"list-reply".
## The first part of the address (up to the @) should
be used here.
unlists *      # remove old entries first
lists `cd ~/mail/lists && echo *`

unsubscribe *
subscribe `cd ~/mail/lists && echo *`

## "mailboxes" defines the list of folders to be
checked for new mail
## Mutt both can show the number of mailboxes with new
mail in the index and
## you can cycle through these after giving the
"change-folder" command.  :-)
mailboxes !
mailboxes +SPAM
mailboxes /home/frank/mail/Inbox
mailboxes `for file in ~/mail/lists/*; do echo -n
"+lists/$(basename $file) "; done`


------------------.procmailrc-----------------
PATH=/bin:/usr/bin:/usr/X11R6/bin:/sbin:/usr/sbin:/usr/local/bin:/usr/X11R6/bin

SHELL=/bin/bash

# "VERBOSE=on" is only used for debugging.
VERBOSE=off

SENDMAIL=sendmail
MAILDIR=/home/frank/mail
DEFAULT=/home/frank/mail/Inbox
LOGFILE=$HOME/.procmail_log
set mbox_type = Maildir
# LOGABSTRACT = "all"

# where to send spam
SPAM=SPAM

# A list (one per line) of people I KNOW are spammers
:-)
# can match any part of name so you can use fred,
fred at aol.com or aol.com to
# match a user, mail address or domain.
# Note that this file is case-insensitive.
SPAMMERS=$HOME/.procmail/spammers

# name of the file containing a list of people we
# always want to get mail from, one per line.  If
# any substring of the From: or Sender: line matches
# a line of this file, it will go through, so this
# can be used to denote entire sites that we always
# wish to get mail from as well as individuals.
# E.g. "user", "user at aol.com" or "aol.com".
# Note that this file is case-insensitive.
# Putting all of the people or lists you get lots
# of mail from here will not only insure you get
# it, but will speed up procmail.
FRIENDS=$HOME/.procmail/friends

# this var is used to track whether we already found
spam
# It's not worth scanning a spam message for further
violations
# Also stores the reason for the spam block.
SPAMRULE

# ======================================
# Preventing duplicates using 16Kb cache
# They get shoved in duplicates folder
:0 Whc: .msgid.lock
| formail -D 16384 .msgid.cache
:0 a
/dev/null

# handy variables
NL="
"

#
==========================================================================
# Correct crap or broken mails using sed
#
==========================================================================
# Correct wrong sig-dashes, ie add a space for lines
with only "--" in them:
# from: ^--$
# to:   ^-- $
:0 fBw
* ^--$
| sed -e 's/^--$/-- /'

# preconverts all plain-text mail arriving in certain
encoded
# MIME formats into a more compact 8-bit format which
can be
# used and displayed more easily by most programs.
:0
* ^Content-Type: *text/plain
{
:0 fbw
* ^Content-Transfer-Encoding: *quoted-printable
| mimencode -u -q

:0 Afhw
| formail -I "Content-Transfer-Encoding: 8bit"

:0 fbw
* ^Content-Transfer-Encoding: *base64
| mimencode -u -b

:0 Afhw
| formail -I "Content-Transfer-Encoding: 8bit"
}

# Convert old-style PGP messages to MIME
:0
* !^Content-Type: message/
* !^Content-Type: multipart/
* !^Content-Type: application/pgp
{
    :0 fBw
    * ^-----BEGIN PGP MESSAGE-----
    * ^-----END PGP MESSAGE-----
    | formail \
        -i "Content-Type: application/pgp;
format=text; x-action=encrypt"

    :0 fBw
    * ^-----BEGIN PGP SIGNED MESSAGE-----
    * ^-----BEGIN PGP SIGNATURE-----
    * ^-----END PGP SIGNATURE-----
    | formail \
        -i "Content-Type: application/pgp;
format=text; x-action=sign"
}

:0 fBw
* ^-----BEGIN PGP PUBLIC KEY BLOCK-----
* ^-----END PGP PUBLIC KEY BLOCK-----
| formail -i "Content-Type: application/pgp-keys;
format=text;"


###################
#  Mailing lists  #
###################
#
# I changed this setup recently. Now I'm on a million
lists, it's nice to
# know the hostname as well as the list name. If you
want just the listname
# for the mail folder, use something like:
# 
# * ^X-Mailing-List:[   ]<\/[^@]+
# lists/`echo $MATCH | sed -e 's/[\/]/_/g' | tr A-Z
a-z`
#
# And the same for the others.
#
#:0:
#* ^X-Mailing-List:[ 	]<\/[^ >`']+
#lists/`echo $MATCH | sed -e 's/[\/]/_/g' | tr A-Z
a-z`
#
#:0:
#* ^X-Mailing-List:[ 	]\/[^ `']+
#lists/`echo $MATCH | sed -e 's/[\/]/_/g' | tr A-Z
a-z`
#
#:0:   
#* ^X-BeenThere:[ 	]\/[^ `']+
#lists/`echo $MATCH | sed -e 's/[\/]/_/g' | tr A-Z
a-z`
#
#:0:
#* ^Sender:[ 	]owner-\/[^ `']+
#lists/`echo $MATCH | sed -e 's/[\/]/_/g' | tr A-Z
a-z`
#
#:0:
#* ^Delivered-To:[ 	]mailing list \/[^ `']+
#lists/`echo $MATCH | sed -e 's/[\/]/_/g' | tr A-Z
a-z`
#
#:0:
#* ^X-Loop:[ 	]\/[^ `']+
#lists/`echo $MATCH | sed -e 's/[\/]/_/g' | tr A-Z
a-z`
#
#:0:
#* ^Mailing-List:[ 	]list[ 	]\/[^ `';]+
#lists/`echo $MATCH | sed -e 's/[\/]/_/g' | tr A-Z
a-z`
#
## godammit. X-ML-Name is usually "ruby-talk" rather
than
# "ruby-talk at ruby-lang.org" or whatever. Making this
header (the only one
# that the shitty software adds) useless to me :(
#:0:
#* ^X-ML-Name:[ 	]\/[^ `']+
#lists/`echo $MATCH | sed -e 's/[\/]/_/g' | tr A-Z
a-z`



######################################################################
# Here we search the list of people we always want to
get mail from, #
# and prevents the mail from being SPAM checked, no
matter what.     #
# The FRIENDS file is set and described above.        
              #
######################################################################
:0
* !? (formail -x From: -x Sender: | fgrep -iqf
$FRIENDS)
{

##################################################################
#         SPAM filter. I don't like spam. I just don't
          #
##################################################################


# Here we search a file with a list of people we
_never_ want to
# get anything from, tossing the mail if it's from one
of them.
# SPAMMERS is set and described above.
# Note, you can use the following line instead to be
even more
# strict, they can't have even relayed it via an
address in the
# spammers file:
# * ? (formail -x From: -x Sender: -x Reply-To: -x
Received: | fgrep -iqf $SPAMMERS)
:0
* SPAMRULE ?? ^^^^
* ? (formail -x From: -x Sender: -x Reply-To: | fgrep
-iqf $SPAMMERS)
{ SPAMRULE="address found in spammers file" }

# NOTE: This catches a lot of SPAM, it really works
but make the match
# CORRECT :-)
# 
# Not to a mailing list, but not to me. SPAM.
:0
* SPAMRULE ?? ^^^^
*
!^TO(digital-ignorance\.com|nflug\.org|localhost|Blind\.Copy\.Receiver)
{ SPAMRULE="Not to one of my addresses or a mailing
list" }

# look for X-Advertisement header or 'advertisement'
in the subject,
# accounting for possible sp. error.  "Nice" spammers
use this header.
:0
* SPAMRULE ?? ^^^^
* ^X-Adverti[sz]ement:
{ SPAMRULE="X-Advertisement header" }

# To: friend(s)@public.com or you at wherever.com and the
like.  Spam.
#  (arrangements made for those who spell at a 4th
grade level as
# well, i.e.: freind)
:0
* SPAMRULE ?? ^^^^
* ^TO.*( |<|,)(fr(ie|ei)nd(s)?|you)@
{ SPAMRULE="Addressed to 'friend' or 'you'" }

# snag the To: and From: headers
TO=`formail -zx To:`
CC=`formail -zx Cc:`
FROM=`formail -zX From: | formail -zrx To:`

# no To: line AND no Cc: line. You could filter out
anything with no To:,
# but there are lots of mailinglist idiots who Cc the
list and don't To:
# anyone ;-)
:0
* SPAMRULE ?? ^^^^
* TO??^$
* CC??^$
{ SPAMRULE="no To: or Cc: header" }

# bad message id -- empty or no @host part.  
:0
* SPAMRULE ?? ^^^^
* ^Message-Id:.*<[^@]*>
{ SPAMRULE="bad Message-Id" }

}
# friends matches skip through to this point.


# aight, purge that SPAM
# TODO, copy it and bounce it.
:0
* ! SPAMRULE ?? ^^^^
{ LOG="SPAMRULE: $SPAMRULE${NL}" }

:0 aw:
| formail -A "X-SPAM-RULE: $SPAMRULE" >> $SPAM
 
#####################################
# Last rule:  Put mail into mailbox #
#####################################

:0:
$DEFAULT

# End of file


__________________________________
Do you Yahoo!?
Yahoo! Search - Find what you’re looking for faster
http://search.yahoo.com



More information about the nflug mailing list