Great Circle Associates Majordomo-Users
(January 2001)
 

Indexed By Date: [Previous] [Next] Indexed By Thread: [Previous] [Next]

Subject: Re: Demime with Smrsh - used to be "cannot use | in command"
From: Ed Kasky <ed @ wrenkasky . com>
Date: Tue, 30 Jan 2001 21:12:06 -0800
To: majordomo-users @ GreatCircle . COM
In-reply-to: <3A7700D5.BBEA6E31@netscape.com>
References: <4.3.2.7.2.20010129202501.00b547a0@pop.primenet.com>

At 11:58 AM Tuesday, 1/30/2001, Dan wrote -=>

>How about posting a summary to your ordeal for those that may not have been
>following the thread from the beginning?  What files/directories did you have
>to create, permissions, contents???  This could be a recipe for anyone else
>wanting to use demime, but does not want to let go of smrsh.  Now that you do
>have demime working, have you removed several old taboo settings from your
>majordomo.cf or individual listname.config files?

Basically, what I found was that smrsh does not allow certain characters in 
an alias line as a security safeguard.  Hence an alias formatted as a 
command line such as "|/usr/local/majordomo/demime - | 
/usr/local/majordomo/wrapper resend -l test test-list,nobody" would be 
automatically rejected by the secure shell.

So, Dan Liston suggested sending it through procmail and then through 
demime|majordomo.

1.  Go to http://scifi.squawk.com/demime.html and download the most recent 
demime script and demime_junkmail.cf.  Install as root into the same path 
as majordomo and do a "chmod 755 demime"

2.  Edit the demime script to verify your path to the cf file is 
correct.  Mine reads:

# default control file location.
$junkmail_file = "/usr/local/majordomo/demime_junkmail.cf";

and do a "chmod 644 demime_junkmail.cf"

3.  Verify the location of your procmail.  I found a handy Procmail Quick 
Start doc at www.ii.com/internet/robots/procmail/qs

4.  I set up a procmailrc for each list that I wanted to filter through the 
demime script.  I suppose one could use a default procmailrc in /etc, but 
all mail going through procmail would have to pass through that filter.

5.  For a test list, I used the following 
/usr/local/majordomo/filter/test/procmailrc (with the help of Dan Liston 
and Mike Oliver) containing the following:

PATH=/bin:/usr/bin:/usr/sbin
LOGFILE=/tmp/procmail-log
VERBOSE=on
:0fhw
* ^TO_test@esson\.net
| formail -I "X-ApprovalRequired: true"
:0
|/usr/local/majordomo/demime - | /usr/local/majordomo/wrapper resend -l 
test test-list,nobody

See man pages for a full explanation of conditions and recipes.  The 
logfile and verbose are for testing purposes only.  The last recipe is the 
command line that would have been in the alias file.

6.  Change the alias for the list to execute the procmail using the rc file:

test:  "|/usr/bin/procmail -f- /usr/local/majordomo/filter/test/procmailrc"

7.  The procmailrc must - I stress must - It must be owned by the same UID 
as the procmail process.  In my case it was mail so I did a "chown mail 
/usr/local/majordomo/filter/test/procmailrc"

This turned out to be the last pece of the puzzle for me.  I knew mail was 
going through as I could see the processes running when I sent messages to 
the test list but I couldn't figure out where it was going.  Todd Lyons 
jumped in here:

>Something went somewhere.  1) It didn't get delivered.  2) It didn't go
>into the queue (/var/spool/mqueue).  3) So the next place would be to look
>in the local mail directory (/var/spool/mail).  4) The last place I can
>think of to look would be /home/{username}/mbox.
>
>Do a ls -l on that directory.  Send a mail to your test list.  Do another
>ls -l on that directory.  Did any file change sizes?  If so, "su -" to that
>user and check the messages because that's where they are going.

I now have a number of lists set up this way.  Demime does a great job of 
cleaning up the messages.  I left my taboo settings the same just in case 
there's something demime misses. If there is, I can send the info back to 
Nick for his use as he develops demime....

Thanks again to everyone who helped me out on this.


Ed Kasky
Los Angeles, CA
. . . . . . . .
The large print giveth, and the small print taketh away. -Tom Waits




Follow-Ups:
References:
Indexed By Date Previous: Re: AUTH
From: "Ricardo M. Morales" <especiales@interlap.com.ar>
Next: #2 Demime with Smrsh - used to be "cannot use | in command"
From: Ed Kasky <ed@wrenkasky.com>
Indexed By Thread Previous: Re: Demime with Smrsh - used to be "cannot use | in command"
From: "D. Liston" <dliston@netscape.com>
Next: Re: Demime with Smrsh - used to be "cannot use | in command"
From: dliston@netscape.com (Dan Liston)

Google
 
Search Internet Search www.greatcircle.com