5 questions

Hello

I have the following 5 questions/clarifications

 1) how to change permissions for a file in windows using PERL?
 
 for eg
 
 c:\\dir1\\file1
 
 dir1 has 777 permissions
 
 file1 has 666 or 444 or 755 or whatever permissons
 
 I want to change file1 to 777
 
 I tried chmod (777 , "file1")  
 
 and chmod (0777 , "file1")
 
 both didnt work--- please advise

 
 2) Is there a sendmail program for windows ?

 where can I download it ??
 
 I want to use it as  $MAIL = "/usr/bin/sendmail"  -- as in unix ...

 
 3) I have two computers connected on network  -- windows 98

 I have apache win95 version  running in both of them ..

Is it possible to send email from one computer to another computer ..

 I have configured their IPs as 128.0.0.5 and 128.0.0.6
 
 so is it possible to send a mail from  128.0.0.5  to  somebody@128.0.0.6

 and the somebody@128.0.0.6 must be able to use a browser to read the mail ...

 If it is not possible in windows to windows machines  is it atleast possible in windows to linux machine .. (I mean one machine running linux and the other windows both connected on network)


Is there any sofware , modules I have to install etc ..


If it is possible at all .. what will be the pop and smtp configurations etc

4) In PERL what is the  windows equivalent for unix ...

1) $$ and

2) $!


5) Is there any website which compares the progamming aspects of programming PERL in windows and UNIX ?
 
thanks

chris
LVL 6
christopher sagayamAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

cadabraCommented:
Are you using ActiveState Perl on the windows machines ?
0
cadabraCommented:
1) Win32::FileSecurity;

0
cadabraCommented:
3) You need a mail server (SMTP/POP) accessible on your network
0
Cloud Class® Course: Amazon Web Services - Basic

Are you thinking about creating an Amazon Web Services account for your business? Not sure where to start? In this course you’ll get an overview of the history of AWS and take a tour of their user interface.

christopher sagayamAuthor Commented:
is there a mail server available for download .. can I install them in my machine .. either linux or windows
0
christopher sagayamAuthor Commented:
which module cotains

Win32::FileSecurity


0
cadabraCommented:
================================================================================

First of all, I recommend using ActiveState perl for windows environment. (www.activestate.com)

To install Win32::FileSecurity you can do this with PPM (Perl Package Manager):

PPM> install Win32-FileSecurity
Install package 'Win32-FileSecurity?' (y/N): y
....'Retrieving package 'Win32-FileSecurity
Installing C:\Perl522\site\lib\auto\Win32\FileSecurity\FileSecurity.dll
Installing C:\Perl522\site\lib\auto\Win32\FileSecurity\FileSecurity.exp
Installing C:\Perl522\site\lib\auto\Win32\FileSecurity\FileSecurity.lib
Installing C:\Perl522\html\lib\Win32\FileSecurity.html
Installing C:\Perl522\htmlhelp\pkg-Win32-FileSecurity.chm
Installing C:\Perl522\htmlhelp\pkg-Win32-FileSecurity.hhc
Installing C:\Perl522\site\lib\Win32\FileSecurity.pm
Writing C:\Perl522\site\lib\auto\Win32\FileSecurity\.packlist
>PPM


You can see which packages are available for ActiveState perl in:

http://www.activestate.com/packages/zips/


To deal with mail issues, you can do

PPM> install MailTools

Then check the ActivePerl->OnlineDocumentation

You will see lots of new mail stuff like:

  Mail::Send
  Mail::Sender
  Mail::POP3Client





0
cadabraCommented:
> 2) Is there a sendmail program for windows ?

There is a program called "blat" for windows I know of, but when I tried using it , it crashed in several circumstances.

What works best is using Mail::Sender.pm, as discussed in:

http://www.experts-exchange.com/jsp/qShow.jsp?ta=perl&qid=10245859 

If you would like to work with it, tell me and I will post more info on this, as configuring this could be somewhat tricky.


 
0
cadabraCommented:
> 5) Is there any website which compares the progamming aspects of programming PERL in windows and UNIX ?

When you install ActiveState Perl, the online documentation installed contains the following FAQs, dealing with programming perl on windows platforms.  


    perlwin32faq: Overview of the Win32 Perl FAQ (this document) (Updated: 3/3/99)
    perlwin32faq1: Availability and Installation
    perlwin32faq2: PerlIS
    perlwin32faq3: Documentation and Support
    perlwin32faq4: Windows NT and Windows 95 (Updated: 3/11/99)
    perlwin32faq5: Implementation Quirks
    perlwin32faq6: Web Server Configuration and Troubleshooting
    perlwin32faq7: Web Programming (CGI and PerlIS)
    perlwin32faq8: General programming
    perlwin32faq9: Modules/sample scripts (Updated: 3/11/99)
    perlwin32faq10: Embedding and Extending
    perlwin32faq11: Using PPM to install modules (Updated: 3/3/99)
    perlwin32faq12: Using OLE with Perl  (Updated: 3/11/99)




Note that there are all sorts of quirks in the windows95 implementation.

Also note that I have not worked with win98, and all the info I am commenting is tested on WinNT plaform.

0
cadabraCommented:
You can make the linux machine a mail server for itself and the other 2 windows machines on the network.

To get the linux machine to be your mail-server, it needs to handle
the protocols SMTP POP3 IMAP.

My platform is redhat-linux 5.1, so the info below may be specific
to redhat linux.

Redhat linux installation contains support for these protocols,
so there is no need for you to get 3rd party software.

You can do telnet to the linux box to ports 25 - STMP, 110 - POP3
and see what answer you are getting.

You can try configuring OUTLOOK / OUTLOOK express against the
linux box which can serve as an SMTP/POP3 server.

The mail accounts are someuser@linuxbox (unix users on the linux box),
to which you can connect from outlook / outlook express, or your own
custom mail client software running on the windows machines
(written in perl for example).

If you are having trouble, try looking at
 /var/log/messages
 /var/log/secure
 /var/log/maillog
on the linux box.

You can also use
   /usr/sbin/tcpdump port 110  
    or
   /usr/sbin/tcpdump port 25

To see network traffic on specific ports of your linux box.

If you have redhat 6.1, look at

  http://www.redhat.com/support/docs/gotchas/6.1/gotchas-6.1-6.html 

(search for POP3 on this page)


Cadabra.


BTW- How are you getting along ?
0
cadabraCommented:
Hello .... how are you doing ???
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
cadabraCommented:
================================================================================

Have a look at:


http://www.activestate.com/ActivePerl/docs/Perl-Win32/perlwin32faq4.html#How_do_I_send_email_from_Perl_fo


BTW-
I have a similar setup to yours:
A linux (redhat 5.1) box acting as a mail server.

Three windows machines, reading mail using outlook express.

0
christopher sagayamAuthor Commented:
Do you know of any web based admin script ?

For adding pop3 users ?

For adding system users etc ?

email  me at christopher_sagx@yahoo.com
0
cadabraCommented:
You could write a perl-CGI that would accept input and call the linux command "adduser" to create new unix users.
 Once a unix user is added, he will be able to receive mail.
 I am assuming you don't need this to be highly secure.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Perl

From novice to tech pro — start learning today.