procmail
[Top] [All Lists]

Re: Space insertion in header lines

1997-06-25 17:31:00
Robert Gahl <bgahl(_at_)thesphere(_dot_)com> writes:
Philip Guenther <guenther(_at_)gac(_dot_)edu> writes:
How refreshing: a virtual domain setup that can actually work!
You should, however, remove the 'm' flag from the F= directive.
They fixed the default in sendmail 8.8.6 (released recently).

I'm running 8.8.5 currently. Does the above mean "remove it for
8.8.5 and any subsequent releases" or "leave it until you upgrade
to 8.8.6, and then remove it."?

Remove it for all releases.  Unless you know exactly what you're doing,
the 'm' flag on the procmail mailer makes thing _very_ difficult to
do correctly.  See below.

Done, and it now works perfectly. I just logged onto another system,
and sent three addresses (one in To:, one in CC:, and one in BCC:)
and all three were picked up in the filter. YAH!

One last question (I hope):

Doing procmail this way appears to cause it to be run as root rather
than the user. In my old filter (invoked through a .forward entry),
I have, for stupid user reasons:

:0 c
backup
 
:0 ic
| cd backup && rm -f dummy `ls -t msg.* | sed -e 1,64d`
 
This was a great help from the procmailex man page, and I have
found that I just leave it around because I get calls all the
time, "I have accidentally deleted my mail and I was wondering
if you kept a copy...." and as I agree that keeping clients
email on my system is a Bad Thing (TM), this gives me a chance
at recovering their lost email.

However, while this worked great when invoked as the user,
once the 64 (or whatever limit I set) messages are reached,
no more are stored when run as root (which is a switch).

The .procmailrc now reads:

# Set home directory
HOME=/export/home/username
 
# Set on when debugging
VERBOSE=off
 
# Replace 'mail' with your mail directory
MAILDIR=$HOME/Mail
 
# Directory for storing procmail log and rcfiles
PMDIR=$HOME/.procmail
 
LOGFILE=$PMDIR/log
INCLUDERC=$PMDIR/rc.filter

I had to add the HOME variable because it was assuming root's
home directory (without it) when procmail was invoked from within
mailertable's entry.

BTW, thanks Philip for sending me down this path oh so long
ago (11/26/96). You said it couldn't be done correctly without hacking
some sendmail.cf, and that put me off. But, you were 100%
correct in that statement. Thanks to the never-ceasing attacks
of mailbombers on my mail system, I was forced to start working
on understanding at least some of sendmail. Now, I won't leave
home without it :)

If you ever want to hack Lisp on my system, just ask ;)
---
Bob Gahl KD6KMX Bicycle (Ryan Vanguard) Mobile  ||      @
      ARPA/INTERNET: bgahl(_at_)thesphere(_dot_)com        ||   !_ \
    WWW: http://www.thesphere.com/~bgahl/       ||   (*)-~--+--(*)
"If you're trying to be politically correct you're like a chameleon
 in front of a mirror. What can you say that won't be offensive to
 somebody?"                                        Robin Williams

<Prev in Thread] Current Thread [Next in Thread>