Re: sending to Mail.app
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] (Joseph Alotta) wrote: > I can think of two different ways to handle this, 1) using Mac::Glue to > cause Mail.app to send a message out to myself, or 2) append to the end > of the inbox file and then use Mac:Glue to update the > indexes. > > Does anyone have any ideas on this? Modifying Mail.app's files sounds like a recipe for trouble no matter how you go about it, as it seems you've discovered. Sending mail to yourself in Mail.app is one solution, but you could also use Mail::Send or one of the other many mail modules out there to send mail to yourself. Here's some Mac::Glue code to send a message to yourself. #!/usr/local/bin/perl use warnings; use strict; use Mac::Glue ':all'; my $mail = new Mac::Glue 'Mail'; my $message = $mail->make(new => 'outgoing message', with_properties => { subject => 'Hi', content => 'Bye' } ); $mail->make(new => 'to recipient', at => location(end => $message->prop('to recipients')), with_properties => { name=> 'me', address => 'my address' } ); $message->send; # optional ... check for mail sleep 10; # make sure mail's had time to get back to me $mail->check_for_new_mail; __END__ -- Chris Nandor [EMAIL PROTECTED]http://pudge.net/ Open Source Development Network[EMAIL PROTECTED] http://osdn.com/
sending to Mail.app
Greetings, I have some perl programs and I would like to send the output of them to the Mail.app so they look like regular email messages. I couldn't get any of the unix mail stuff to work, probably because I do not have sendmail running for security concerns reasons. (I dial up a few times a day). I figured out where Mail.app was storing it's text and I was able to append stuff on the end of the file and that worked only half and half. Apparently, the indexed get messed up and Mail.app crashes now and then. Then I created a new mailbox and append email to that, and that solves the crashing part, but the messages aren't flagged as new, and I sometimes miss them. I can think of two different ways to handle this, 1) using Mac::Glue to cause Mail.app to send a message out to myself, or 2) append to the end of the inbox file and then use Mac:Glue to update the indexes. Does anyone have any ideas on this? Joe Alotta
Re: Advice for moving perl script to OSX server
Apache is standard under OSX. And, yes, supports .htaccess files. If you are running this on Linux already, the transition should be simple. - Configure apache - Copy over scripts - Create .htaccess and .htpasswd files (or whatever you specify in configuration) - Go to town Apache has many other authentication modules that may suit your needs. As OSX is *nix at heart, there are several options for authentication really. Not to mention FREE. You can find apache auth modules by searching for "authentication" here: http://modules.apache.org/search There is no reason you should need to purchase a license to do authentication. Cheers, Conrad Schilbe On 3/1/04 10:41 AM, "Eric Curts" <[EMAIL PROTECTED]> wrote: > Greetings! > > I am the technology specialist for North Canton City Schools in North > Canton, Ohio. For years we have been using a perl script I wrote that helps > teachers to develop home pages. Recently we have begun sharing this script > with other school districts in our county so they could help their teachers > as well. However, two of the districts use OSX for their web server. Here > is where I need a push in the right direction... > > For us we run the script on a Linux server running Apache. Another district > we have helped runs it on a Windows 2000 server. So far so good. I am > wanting to give this script to the Mac districts but need help with the > issue of authentication. > > Since school districts have hundreds of employees, it is easier to tap into > an already existing password file, rather than have the staff create new > usernames and passwords to use the homepage script. On our Linux server I > use the built-in htaccess feature to handle the authentication. The > htaccess file protects the folder holding the script. When a teacher tries > to access the script, htaccess prompts them for a username and password. I > then have configured the htaccess file to look at the already existing > password file on the server (which is also used for their email accounts) > and it authenticates them. > > On the Windows 2000 server we did a similar thing. We used Windows built-in > ability to set privileges to protect the folder with the scripts. We then > used Windows built-in basic authentication to tap into Active Directory to > authenticate the teachers. > > What I am wondering is if there is some kind of built-in authentication for > OSX. If so, where can I get more information on it? Does it sound like I > will be able to use it as I have done with the other operating systems (that > is point it to some already existing username/password system)? > > If that does not work, I also understand that Apache can be set up on an OSX > server. Is this correct? Would that be a reasonable solution to the > authentication problem, since then I could use htaccess as before? > > Any advice would be greatly appreciated. I apologize if some of my comments > or questions are not clear as I have never worked with a Mac server before. > We are just trying to help out some neighboring schools. > > Thanks! > > Eric > > * Eric Curts > * Technology Specialist, North Canton City Schools > * [EMAIL PROTECTED] > * (330) 497-5600 x377 > * FAX (330) 497-5618 > * > * Give a man a fish and you feed him for a day; > * teach him to use the Net and he won't bother you for weeks. >
Re: Getting info from iTunes
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] (Wren Argetlahm) wrote: > I was wondering if there was a good way to get > information about the currently playing song in > iTunes? Browsing through CPAN all I could find were > modules for controlling iTunes (play, pause, etc) with > a few assorted other commands (make new playlist, etc I've got two scripts that do it. happening is a script that updates your iChat status, and np.pl is an X-Chat Aqua script that does various iTunes functions (play/pause/next/previous, and then pick a random song by artist/album/name/rating, and also rate the current song). http://dev.macperl.org/files/scripts/happening http://dev.macperl.org/files/scripts/np.pl The former was discussed some in a recent perl.com article: http://www.perl.com/pub/a/2004/01/23/macglue.html Hope that helps, -- Chris Nandor [EMAIL PROTECTED]http://pudge.net/ Open Source Development Network[EMAIL PROTECTED] http://osdn.com/
Re: Advice for moving perl script to OSX server
On Mar 1, 2004, at 12:41 PM, Eric Curts wrote: What I am wondering is if there is some kind of built-in authentication for OSX. If so, where can I get more information on it? Does it sound like I will be able to use it as I have done with the other operating systems (that is point it to some already existing username/password system)? Beginning with Panther, Mac OS X Server includes an LDAP server that can provide authentication for a range of services. A license for an unlimited number of clients retails for $1k, but I'm told that Apple offers big educational discounts. The 10-user licence is still only $500, and the only limitation is that 10 users can log-in using Apple share (AFP) at the same time. Other than that, the 10-user edition has no restrictions -- you can have an unlimited number of users on the system and an unlimited number of simultaneous log-ins for any other service (non-AFP). -Jason FB
Re: Advice for moving perl script to OSX server
On Mar 1, 2004, at 12:41 PM, Eric Curts wrote: What I am wondering is if there is some kind of built-in authentication for OSX. If so, where can I get more information on it? Does it sound like I will be able to use it as I have done with the other operating systems (that is point it to some already existing username/password system)? Beginning with Panther, Mac OS X Server includes an LDAP server that can provide authentication for a range of services. A license for an unlimited number of clients retails for $1k, but I'm told that Apple offers big educational discounts. More information about Apple's LDAP server: http://www.apple.com/server/macosx/open_directory.html How to connect Apache 2.x to LDAP: http://httpd.apache.org/docs-2.0/mod/mod_ldap.html sherm--
Re: Advice for moving perl script to OSX server
On Mar 1, 2004, at 18:41, Eric Curts wrote: Since school districts have hundreds of employees, it is easier to tap into an already existing password file, rather than have the staff create new usernames and passwords to use the homepage script. On our Linux server I use the built-in htaccess feature to handle the authentication. The htaccess file protects the folder holding the script. When a teacher tries to access the script, htaccess prompts them for a username and password. I then have configured the htaccess file to look at the already existing password file on the server (which is also used for their email accounts) and it authenticates them. [...] What I am wondering is if there is some kind of built-in authentication for OSX. If so, where can I get more information on it? Does it sound like I will be able to use it as I have done with the other operating systems (that is point it to some already existing username/password system)? OSX stores all user and password data (and a lot of other stuff) in the Netinfo Manager database. You can export and import the data in standard unix format if you wish though - see the manpages of nidump and niload for this. If you're using a version prior Panther you can always get the complete passwd file with the command 'nidump passwd . >passwd' and use it for authentication. As of 10.3.x (Panther) shadowed passwords are used, see http://www.macos.utah.edu/Documentation/macosx/security/passwd.html for more information about that. Another hint might be the use of LDAP for authentication: http://www.macosxhints.com/article.php?story=20020902075936558 If that does not work, I also understand that Apache can be set up on an OSX server. Is this correct? Would that be a reasonable solution to the authentication problem, since then I could use htaccess as before? Apache comes preinstalled - you can start it simply via the System Preferences menu by selecting Sharing and turning on Personal Web Sharing. The configuration is found in /etc/httpd/httpd.conf. If it is an option to you, use the standard .htaccess mechanism and use htpasswd for maintainance of the password file. See http://httpd.apache.org/docs/programs/htpasswd.html for more information about that. HTH, Florian
Advice for moving perl script to OSX server
Greetings! I am the technology specialist for North Canton City Schools in North Canton, Ohio. For years we have been using a perl script I wrote that helps teachers to develop home pages. Recently we have begun sharing this script with other school districts in our county so they could help their teachers as well. However, two of the districts use OSX for their web server. Here is where I need a push in the right direction... For us we run the script on a Linux server running Apache. Another district we have helped runs it on a Windows 2000 server. So far so good. I am wanting to give this script to the Mac districts but need help with the issue of authentication. Since school districts have hundreds of employees, it is easier to tap into an already existing password file, rather than have the staff create new usernames and passwords to use the homepage script. On our Linux server I use the built-in htaccess feature to handle the authentication. The htaccess file protects the folder holding the script. When a teacher tries to access the script, htaccess prompts them for a username and password. I then have configured the htaccess file to look at the already existing password file on the server (which is also used for their email accounts) and it authenticates them. On the Windows 2000 server we did a similar thing. We used Windows built-in ability to set privileges to protect the folder with the scripts. We then used Windows built-in basic authentication to tap into Active Directory to authenticate the teachers. What I am wondering is if there is some kind of built-in authentication for OSX. If so, where can I get more information on it? Does it sound like I will be able to use it as I have done with the other operating systems (that is point it to some already existing username/password system)? If that does not work, I also understand that Apache can be set up on an OSX server. Is this correct? Would that be a reasonable solution to the authentication problem, since then I could use htaccess as before? Any advice would be greatly appreciated. I apologize if some of my comments or questions are not clear as I have never worked with a Mac server before. We are just trying to help out some neighboring schools. Thanks! Eric * Eric Curts * Technology Specialist, North Canton City Schools * [EMAIL PROTECTED] * (330) 497-5600 x377 * FAX (330) 497-5618 * * Give a man a fish and you feed him for a day; * teach him to use the Net and he won't bother you for weeks.