PDA

View Full Version : Sendmail and smrsh


lashampoo
02-25-2002, 12:42 PM
I tried to configure sendmail via /etc/mail/aliases to run an autoreply perl script. The log reports an smrsh error :
----- The following addresses had permanent fatal errors -----
"|/etc/smrsh/autoreply.pl /Users/john/Sites/john.txt john"
(reason: service unavailable)
(expanded from: <john@localhost>)

----- Transcript of session follows -----
smrsh: autoreply.pl not available for sendmail programs
So I tried to put the autoreply.pl script in the proper smrsh location but here is the new error that occured :
----- The following addresses had permanent fatal errors -----
"|/etc/smrsh/autoreply.pl /Users/john/Sites/john.txt john"
(reason: 2)
(expanded from: <john@localhost>)

----- Transcript of session follows -----
Failed to open /usr/adm/sm.bin/config at /usr/adm/sm.bin/autoreply.pl line 8.
554 5.3.0 "|/usr/adm/sm.bin/autoreply.pl /Users/john/Sites/john.txt john"... unknown mailer error 2
Does anyone knows how to by-pass the smrsh (Send Mail Restricted SH) program ? Or how to configure the /usr/adm/sm.bin/config file ? Or is Postfix better for running these script without been restricted by smrsh ?

pmccann
03-05-2002, 01:22 AM
Well if noone else wants to have a go, maybe another long shot will help.

Could it be that the "config" file referred to by sendmail has nothing to do with smrsh, but is being called by your perl script? Note the "line 8" reference in the error you quoted above: looks like things are going along swimmingly until there. Maybe there's a call to a file via relative reference, and the scripts being run from its new location (/usr/adm/sm.bin) instead of its old location, and thus not finding its own config file.

Then again, I really have no idea what I'm talking about here!

Cheers,
Paul

lashampoo
03-05-2002, 02:37 AM
You were right. The script was looking for an unknown config file on line 8. Now it seems to works properly.

Another question : do you know why certain unix software for "Free BSD" (like Listar (http://www.listar.org/download.php)) seems incompatible with Mac OS X ? I wanted to use my Mac with sendmail as a list server.

pmccann
03-05-2002, 09:58 AM
There are a huge number of differences between compiling packages on FreeBSD and doing the same on OSX, even though a lot of the latter's unix underbelly is based on the former. In particular, the gcc that's included with osx has a large number of apple-specific changes built in, the default namespace is two-level in OSX, libtool often doesn't quite work right for the platform, and so on and on. The issues with building unix applications on OSX can be quite ugly, but lots of people are working to provide easy to install packages of the better known applications. Check out fink (fink.sf.net) or gnu-darwin (http://gnu-darwin.sourceforge.net/). The latter *may* just allow you to install the app that you're interested in, as they've adjusted the freebsd ports mechanism so as to work on osx.

I had a quick look at the source of Listar, and it's a bit of a funky distribution! To be honest, I couldn't even find the "makefile" that the readme referred to, though then again it is *late*!! I can offer you "good luck"!

Regards,
Paul