demime.pl with smrsh

Hi folks,if someone could lend me a hand here, I would be grateful. I'm trying to use demime.pl with the following recommended hook in aliases.
foo: "|/home/mailman/mail/demime.pl - |/home/mailman/mail/wrapper post foo"
but i get back the following error:
----- The following addresses had permanent fatal errors ----- "|/home/mailman/mail/demime.pl - |/home/mailman/mail/wrapper post shaka" (expanded from: <foo@bar.org>)
----- Transcript of session follows ----- sh: cannot use | in command 554 "|/home/mailman/mail/demime.pl - |/home/mailman/mail/wrapper post shaka"... Service unavailable
So I'm thinking it's the pipe into a pipe that is creating the problem. I'm running smrsh and am not sure if the limitation is being imposed there or not. I do have the approp sym links for both the mailman wrapper and demime.pl in sm.bin. Has anyone seen this and can recommend a viable solution?
Thanks
Clark E. Morgan

On Feb 28, Clark E. Morgan wrote:
foo: "|/home/mailman/mail/demime.pl - |/home/mailman/mail/wrapper post foo"
----- Transcript of session follows ----- sh: cannot use | in command 554 "|/home/mailman/mail/demime.pl - |/home/mailman/mail/wrapper post shaka"... Service unavailable
So I'm thinking it's the pipe into a pipe that is creating the problem. I'm running smrsh and am not sure if the limitation is being imposed there or not. I do have the approp sym links for both the mailman wrapper and demime.pl in sm.bin. Has anyone seen this and can recommend a viable solution?
Yes, that's a smrsh limitation.
The only real solution is to create a script that takes input and pipes it to wrapper, then make that script runable by smrsh.
Chris

"Christopher P. Lindsey" wrote:
----- Transcript of session follows ----- sh: cannot use | in command 554 "|/home/mailman/mail/demime.pl - |/home/mailman/mail/wrapper post shaka"... Service unavailable
Yes, that's a smrsh limitation.
The only real solution is to create a script that takes input and pipes it to wrapper, then make that script runable by smrsh.
True.
That's the script I wrote and use (it's Perl, probably overkill)
[alessio@obi-wan bin]$ cat /usr/local/bin/demime-wrapper #!/usr/bin/perl
my $cmd = join (' ','| /usr/local/bin/demime - | /home/mailman/mail/wrapper',@ARGV); undef @ARGV; open WRAPPER, $cmd or die "Cannot pipe to wrapper: $!\n"; while (<>) { print WRAPPER; } ---------- cut --------
and its use: foo: "|/usr/local/bin/demime-wrapper post foo"
You have then to put a symlink to /user/local/bin/demime-wrapper in the smrsh directory.
-- Alessio F. Bragadini alessio@albourne.com APL Financial Services http://village.albourne.com Nicosia, Cyprus phone: +357-2-755750
"It is more complicated than you think" -- The Eighth Networking Truth from RFC 1925
participants (3)
-
Alessio Bragadini
-
Christopher P. Lindsey
-
Clark E. Morgan