Re: Run process as daemon

2003-05-14 Thread Olivier Macchioni
++ 14/05/03 14:28 +0200 - Rcca:
>My problem is below:
>
>I have a service application, which is unable to run as daemon.
>
>If I run the application from the rc.d scripts the system hangs up because the 
>process does not exit.
>If I put an "&" mark to the end of the line evereyting is the same.
>The service application hangs the system in from the rc.boot also.
>
>The quewstion is: Can I run this service without logging in to the box. How?

Hi, Robert.

The short answer is "yes". Just write your own startup script and use :

start-stop-daemon --start --background --quiet --exec my_process
start-stop-daemon --stop --quiet --exec my_process 

the --background should do the trick for processes that don't know how
to daemonize.



pgpNFe9exDECW.pgp
Description: PGP signature


Re: grep and delete

2003-04-25 Thread Olivier Macchioni
++ 25/04/03 13:44 +0200 - Craig:
>Hi Guys
>
>I need to grep log files and delete certain criteria. Any ideas
>and how I can do this ?

cat logfile | grep -v criteria1 | grep -v criteria2 > logfile.new

have a look at logfile.new to check that it's correct and 

mv logfile.new logfile

assumes :
- nobody is writing to the file at the same time
- you have enough space

...

Olivier

P.S. did I understand your question correctly ?




Re: Collecting stats for different servers

2003-04-03 Thread Olivier Macchioni
++ 21/03/03 14:44 +0200 -  Gideon Oosthuysen:
>Hi all

Hi Gideon

>I would like to collect statistics like uptime / system load / disk usage /
>memory usage on all my different
>servers and display it on my webserver is there any program i can use for
>that ?

What we do here is :
- install/configure SNMP on all our equipements (routers, switches,
Linux and Windows servers too)
- customize SNMP to add some more relevant information (like HD state
for RAID arrays, which we can get through proprietary software from
the RAID manufacturer)
- use MRTG to chew the data and display something usable for a
non-technical customer

Works great so far. SNMP is available on almost anything, very
customizable (I'm taking about ucd-snmp here) and you can read it with
pretty much any supervision tool.

Good luck!

mac




Re: Collecting stats for different servers

2003-04-03 Thread Olivier Macchioni
++ 21/03/03 14:44 +0200 -  Gideon Oosthuysen:
>Hi all

Hi Gideon

>I would like to collect statistics like uptime / system load / disk usage /
>memory usage on all my different
>servers and display it on my webserver is there any program i can use for
>that ?

What we do here is :
- install/configure SNMP on all our equipements (routers, switches,
Linux and Windows servers too)
- customize SNMP to add some more relevant information (like HD state
for RAID arrays, which we can get through proprietary software from
the RAID manufacturer)
- use MRTG to chew the data and display something usable for a
non-technical customer

Works great so far. SNMP is available on almost anything, very
customizable (I'm taking about ucd-snmp here) and you can read it with
pretty much any supervision tool.

Good luck!

mac


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: Php4 broken package ?

2003-03-13 Thread Olivier Macchioni
++ 13/03/03 11:53 +0100 - De Schrijver Peter:
>Hi!
>
>I have the following problem:
>
>During the install of dnsutils i saw php4 getting deinstalled, i have no
>idea why.
>Doing "apt-get install php4" delivers following output:
> [...]
>
>Should i file a bug report like the message says ?

Could very well due to an unstable situation related to libc6.1 :

http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=184211 

maybe ?




Re: Php4 broken package ?

2003-03-13 Thread Olivier Macchioni
++ 13/03/03 11:53 +0100 - De Schrijver Peter:
>Hi!
>
>I have the following problem:
>
>During the install of dnsutils i saw php4 getting deinstalled, i have no
>idea why.
>Doing "apt-get install php4" delivers following output:
> [...]
>
>Should i file a bug report like the message says ?

Could very well due to an unstable situation related to libc6.1 :

http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=184211 

maybe ?


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: load average question

2002-11-25 Thread Olivier Macchioni
++ 25/11/02 08:51 -0800 - Jeremy C. Reed:
>On Sat, 23 Nov 2002, Scott wrote:
>
>> > No performance issues using vm-pop3d, exim (MTA), apache and
>> > OpenWebMail with around 10,000 email accounts on similar hardware.
>> 
>> 10,000 email accounts on a similar machine?  Man, I must be doing 
>> something wrong!  
[...]
>> I tried that and the qpopper stopped responding after about 30 minutes and 
>> the Outlook users would get the xinetd error.  

Please don't use inetd / xinetd if you're looking for performance. Both
spawn a new process each time there is an incoming request, which is a
*huge* overhead.

You definitely have to run qpopper (or any other POP daemon) as a
standalone server. 

Other tips include :
- recompiling qpopper with other options (no debugging, optimization)
- reading http://www.eudora.com/qpopper/faq.html#performance

and keep in mind that the number of mailboxes is not a significant
number to compare performance. I'd rather look at the number of
connections / minute.


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]




Re: Easy way to control .forward files?

2002-10-24 Thread Olivier Macchioni
On Thu, 24 Oct 2002 09:17:36 -0700
"Tony Wasson" <[EMAIL PROTECTED]> wrote:

> I am looking for a way for our users to control their .forward file.
> We currently don't allow any interactive logins (ssh) by setting the
> shell to/bin/false. We're looking seriously at the spamc/spamd portion
> of SpamAssassin. I'd like for users to be able to tune their settings
> easily.
> 
> Does anyone have ideas? Can anyone report on the usermin-forward
> package? My ideal 'user page' would have options to:
> 1) Change your password
> 2) Turn on/off spam tagging
> 3) Turn on/off virus scanning
> 4) Forward email to a different account
> 5) Set an vacation auto-reply (optional)
> 
> Is there something out there, or should I cobble my own tools
> together?

The closest I could get is Postfix + MySQL and a home-written web
interface to feed MySQL, each user having his own passwd to the web
interface (you can probably do the same with LDAP) + tpop3d compiled
with MySQL support.

This way your have #1 and #4.

For #2, I'm planning to use procmail / spamassassin. Patches for
procmail+MySQL are available here : http://www.posixnet.org/index1.html.
*not tested*

For #3, which anti-virus are you using ? *If* it acts like a SMTP server
and *If* you can set a per-user-relayhost on postfix, then the MySQL
solution *should* be OK. 
Another solution could be to redirect [EMAIL PROTECTED] to 
[EMAIL PROTECTED] for users who want some virus scanning.

#5 is still an unexplored ground to me (I tend to hate auto-replies because
having a clean configuration seems to be nearly impossible to me)

And I'd add #6 : per-user quota support... Nothing really obvious to do that
so far.

Good hunt for solutions. I'd appreciate to hear about the solutions you've found.

Mac


URLs : 
- Postfix+MySQL http://kirb.insanegenius.net/postfix.html
- tpop3d http://www.ex-parrot.com/~chris/tpop3d/


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]




Re: Easy way to control .forward files?

2002-10-24 Thread Olivier Macchioni
On Thu, 24 Oct 2002 09:17:36 -0700
"Tony Wasson" <[EMAIL PROTECTED]> wrote:

> I am looking for a way for our users to control their .forward file.
> We currently don't allow any interactive logins (ssh) by setting the
> shell to/bin/false. We're looking seriously at the spamc/spamd portion
> of SpamAssassin. I'd like for users to be able to tune their settings
> easily.
> 
> Does anyone have ideas? Can anyone report on the usermin-forward
> package? My ideal 'user page' would have options to:
> 1) Change your password
> 2) Turn on/off spam tagging
> 3) Turn on/off virus scanning
> 4) Forward email to a different account
> 5) Set an vacation auto-reply (optional)
> 
> Is there something out there, or should I cobble my own tools
> together?

The closest I could get is Postfix + MySQL and a home-written web
interface to feed MySQL, each user having his own passwd to the web
interface (you can probably do the same with LDAP) + tpop3d compiled
with MySQL support.

This way your have #1 and #4.

For #2, I'm planning to use procmail / spamassassin. Patches for
procmail+MySQL are available here : http://www.posixnet.org/index1.html.
*not tested*

For #3, which anti-virus are you using ? *If* it acts like a SMTP server
and *If* you can set a per-user-relayhost on postfix, then the MySQL
solution *should* be OK. 
Another solution could be to redirect [EMAIL PROTECTED] to 
[EMAIL PROTECTED] for users who want some virus scanning.

#5 is still an unexplored ground to me (I tend to hate auto-replies because
having a clean configuration seems to be nearly impossible to me)

And I'd add #6 : per-user quota support... Nothing really obvious to do that
so far.

Good hunt for solutions. I'd appreciate to hear about the solutions you've 
found.

Mac


URLs : 
- Postfix+MySQL http://kirb.insanegenius.net/postfix.html
- tpop3d http://www.ex-parrot.com/~chris/tpop3d/




Re: tool(s) to analyze contents of tcp-sessions

2002-03-04 Thread Olivier Macchioni

On Mon, 04 Mar 2002 17:09:29 +0100
Robert Waldner wrote:

> I'm looking for a tool with which I could analyze the contents 
>  (payload) of captured tcp-sessions.
> 
> What I need would be something which could provide output like:
> 
> TCP-session $foo from $bar:1234 to $baz:4321:
> 
> >> GET / HTTP/1.0
> << HTTP/1.1 200 OK
> << Date: Mon, 04 Mar 2002 16:06:15 GMT
> ...

tcpflow


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]




Re: moving mail system from one ISP to another

2002-01-15 Thread Olivier MACCHIONI
At 13:53 15/01/02 +0100, martin f krafft wrote:
also sprach Olivier MACCHIONI <[EMAIL PROTECTED]> [2002.01.15.1317 
+0100]:
> Could help a lot... The problem is to retreive the mail which has already
> been delivered to the "old" mailboxes.

why don't you rsync them over??? are they mailbox or Maildir formats?
then feed them to the local procmail on the new ISP, or have them be
delivered natively, and you are set.
Usually when one customer goes from one ISP to the other (which was the 
initial problem as stated by Alexis) you don't have the root on both mail 
servers so rsync'ing the mailboxes is usually not possible.

Moreover I doubt Lotus Notes uses mailbox or Maildir formats to store mails 
(I may very well be mistaken on this one). Same story goes for Exchange for 
example.

The only standards protocols you can really rely on are usually POP and 
SMTP which fetchmail can handle.


> If you have a complete list of login / passwords you can use fetchmail to
> get the mail from the old accounts and send it to the new ones.
... and generate *loads* of traffic...
Yes... doubles the mail traffic during your migration process. Well, that's 
life... you have to synch your accounts one way or another, so the data 
*has* to go from ISP A to ISP B.

Olivier



Re: moving mail system from one ISP to another

2002-01-15 Thread Olivier MACCHIONI

At 13:53 15/01/02 +0100, martin f krafft wrote:
>also sprach Olivier MACCHIONI <[EMAIL PROTECTED]> [2002.01.15.1317 
>+0100]:
> > Could help a lot... The problem is to retreive the mail which has already
> > been delivered to the "old" mailboxes.
>
>why don't you rsync them over??? are they mailbox or Maildir formats?
>then feed them to the local procmail on the new ISP, or have them be
>delivered natively, and you are set.

Usually when one customer goes from one ISP to the other (which was the 
initial problem as stated by Alexis) you don't have the root on both mail 
servers so rsync'ing the mailboxes is usually not possible.

Moreover I doubt Lotus Notes uses mailbox or Maildir formats to store mails 
(I may very well be mistaken on this one). Same story goes for Exchange for 
example.

The only standards protocols you can really rely on are usually POP and 
SMTP which fetchmail can handle.


> > If you have a complete list of login / passwords you can use fetchmail to
> > get the mail from the old accounts and send it to the new ones.
>
>... and generate *loads* of traffic...

Yes... doubles the mail traffic during your migration process. Well, that's 
life... you have to synch your accounts one way or another, so the data 
*has* to go from ISP A to ISP B.

Olivier


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]




Re: moving mail system from one ISP to another

2002-01-15 Thread Olivier MACCHIONI
At 11:47 15/01/02 +, [EMAIL PROTECTED] wrote:
On Tue, Jan 15, 2002 at 12:24:26PM +0100, alexis bory wrote:
> Hello,
>
> I have to control the transfert of the mailboxes
> of one of my customers from his old ISP to his
> Mother-Company-Centralized-Corporate-Lotus-Notes.
>
>
> TIA
Depending on the MTA you are using there are ways of doing the forwarding, 
with
exim you can add a line to the bottom of the exim.conf file that tells it 
where
to redirect the mail to, its quite well documented in the exim info pages.
With postfix you can use the transports file to redirect the mail. Not sure
about other MTAs, hope that helps.
Could help a lot... The problem is to retreive the mail which has already 
been delivered to the "old" mailboxes.

I don't know of any good way to do that for a large number of POP accounts 
and heterogenous mail storage systems.

If you have a complete list of login / passwords you can use fetchmail to 
get the mail from the old accounts and send it to the new ones.

If you don't have such a list some tcpflow on port 110 with some filtering 
could give you most of the accounts (hopefully not too many people are on 
vacations and don't check their mails).

Good luck
Olivier



Re: moving mail system from one ISP to another

2002-01-15 Thread Olivier MACCHIONI

At 11:47 15/01/02 +, [EMAIL PROTECTED] wrote:
>On Tue, Jan 15, 2002 at 12:24:26PM +0100, alexis bory wrote:
> > Hello,
> >
> > I have to control the transfert of the mailboxes
> > of one of my customers from his old ISP to his
> > Mother-Company-Centralized-Corporate-Lotus-Notes.
> >
> >
> > TIA
>
>Depending on the MTA you are using there are ways of doing the forwarding, 
>with
>exim you can add a line to the bottom of the exim.conf file that tells it 
>where
>to redirect the mail to, its quite well documented in the exim info pages.
>With postfix you can use the transports file to redirect the mail. Not sure
>about other MTAs, hope that helps.

Could help a lot... The problem is to retreive the mail which has already 
been delivered to the "old" mailboxes.

I don't know of any good way to do that for a large number of POP accounts 
and heterogenous mail storage systems.

If you have a complete list of login / passwords you can use fetchmail to 
get the mail from the old accounts and send it to the new ones.

If you don't have such a list some tcpflow on port 110 with some filtering 
could give you most of the accounts (hopefully not too many people are on 
vacations and don't check their mails).

Good luck

Olivier


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]




Re: HELP SOS

2001-11-20 Thread Olivier MACCHIONI
At 20:17 20/11/01 +, Hereward Cooper wrote:
Once upon a time (actually it was more like Tue, 20 Nov 2001 09:43:21 +0100),
Roger Abrahamsson <[EMAIL PROTECTED]> wrote:
> > I have succeeded in locking myself out of mysql. I need to set the
> > root password back
[...]
The mysql.log files listed php-nuke trying to do stuff even when it wasn't 
being
used or hadn't been in many days. I blew away php-nuke, which I wasn't using
anyhow and everything seems to be back to norm.
Anyone know why this might happen? Anyone had this problem?
I'd suggest upgrading to a recent version of PHP-Nuke... check 
http://www.securiteam.com/unixfocus/5FP0L1F5FS.html among others.

Olivier



Re: HELP SOS

2001-11-20 Thread Olivier MACCHIONI

At 20:17 20/11/01 +, Hereward Cooper wrote:
>Once upon a time (actually it was more like Tue, 20 Nov 2001 09:43:21 +0100),
>Roger Abrahamsson <[EMAIL PROTECTED]> wrote:
>
> > > I have succeeded in locking myself out of mysql. I need to set the
> > > root password back
>
>[...]
>The mysql.log files listed php-nuke trying to do stuff even when it wasn't 
>being
>used or hadn't been in many days. I blew away php-nuke, which I wasn't using
>anyhow and everything seems to be back to norm.
>Anyone know why this might happen? Anyone had this problem?

I'd suggest upgrading to a recent version of PHP-Nuke... check 
http://www.securiteam.com/unixfocus/5FP0L1F5FS.html among others.


Olivier


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]




RE: MRTG HELP sos

2001-11-14 Thread Olivier MACCHIONI
At 10:57 14/11/01 +0100, Javier Castillo Alcibar wrote:
Hi Craig,
first of all, I recommend you to do "apt-get -f install"...after 
that, try "apt-get remove mrtg" and "apt-get dist-upgrade" again.

If you upgrade successfully, you can try install mrtg with "dpkg -i 
-D mrtg" and if you have problems, check "dpkg --force-help" to force the 
installation.
Dont forget the good old ./configure --prefix=/opt/mrtg && make && make 
install if everything goes wrong... and rm -rf /opt/mrtg once you've got a 
stable solution.

Olivier



RE: MRTG HELP sos

2001-11-14 Thread Olivier MACCHIONI

At 10:57 14/11/01 +0100, Javier Castillo Alcibar wrote:
> Hi Craig,
>
> first of all, I recommend you to do "apt-get -f install"...after 
> that, try "apt-get remove mrtg" and "apt-get dist-upgrade" again.
>
> If you upgrade successfully, you can try install mrtg with "dpkg -i 
> -D mrtg" and if you have problems, check "dpkg --force-help" to force the 
> installation.

Dont forget the good old ./configure --prefix=/opt/mrtg && make && make 
install if everything goes wrong... and rm -rf /opt/mrtg once you've got a 
stable solution.

Olivier


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]




Re: Webalizer

2001-08-28 Thread Olivier MACCHIONI

At 08:23 28/08/01 +0100, Rob Woodward wrote:

>Hi,
>
>One method I used was to use a different config file for each vitual host
>I had on the box. Each vitual host has a different log file too.

My 2 cents :

for arf in `find /opt/web/web2/home/*/logs/access_log`
do
 $WEBALIZER -o /tmp -Q -N 5 -D $CACHE $arf
done

for arf in `find /opt/web/web2/home/*/logs/access_log`
do
 site=`echo $arf | sed "s/\/logs\/access_log//" | sed 
"s/\/opt\/web\/web2\/home\///"`
 infos=`echo $arf | sed "s/\/logs\/access_log/\/stats\//"`
 $WEBALIZER -p -r $site -s $site -Q -o "$infos" -D $CACHE -n 
"$site" -c $WEBALIZER_CONF
done


So webalizer will look by himself for all the web sites on 
/opt/web/web2/home and generate the stats... No config file to change when 
you add a new we site.

Of course each site stores his log files in 
/opt/web/web2/home/*/logs/access_log


Olivier




>Cheers,
>
>Rob
>
>On Tue, 28 Aug 2001, Craig wrote:
>
> > Hey debian community
> >
> > I have just install webalizer 1.30 on my web server box
> > so our web designers can analyze traffic to and from
> > their websites. I have a combined log for all our sites
> > but it doesn't look like webalizer is giving a statistical
> > by site break-down. Does anyone know if webalizer has this
> > ablility, or better yet enlighten me as to how I can do
> > this ?>
> >
> > Any help would be mostly appreciated :)
> >
> > Craig
> >
> >
> >
>
>
>Rob Woodward.
>http://www.funkymunkey.net
>
>No wonder you're tired!  You understood so much today.
>
>
>--
>To UNSUBSCRIBE, email to [EMAIL PROTECTED]
>with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]




Re: Excessive runts and giants

2001-08-24 Thread Olivier MACCHIONI


At 17:59 24/08/01 +0800, Sanjeev Gupta wrote:
>Folks,
>
>I have a Compaq, witha  ThunderLan NIC, connected to a Cisco Switch.
>Straight connection, no hub or anything in between.
>
>On the Cisco, the monitor shows a high degree of Runts.  Over a 1 min
>period, with the link running 50% util over 100Mbps half-duples, I see about
>10 collisions, and a few hundred runts, plus a dozen giants.
>[...]

We had a similar problem with Intel Etherexpress Pro / Summit 48i.

After some tweaking the link is OK ONLY when both sides auto-negotiate the 
speed. Fixing a given speed on one side and auto-negotiation on the other 
slowed down the connection speed by about 80% under "heavy" load.

I'd suggest trying to play with speeds / Duplex / Auto-negotiation settings.

You may want to have a look at tcpdump too... Maybe you have an ARP problem ?


Good Luck

Olivier


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]




Re: scripting lynx

2001-08-01 Thread Olivier MACCHIONI

At 18:08 01/08/01 +0200, Russell Coker wrote:
>On Wed, 1 Aug 2001 00:33, Craig Sanders wrote:
> > On Wed, Aug 01, 2001 at 12:17:20AM +0200, Russell Coker wrote:
> > > I want to script lynx to post data to a web site and save the results.
> > > I am using the --post_data option but have been unable to find
> > > documentation on the format of data expected on standard input.
>[...]
> > or use the LWP modules to make yourself a web-bot.
>
>I may have to do that.  Thanks for the suggestions.


wget and a few shell commands may do the trick too


--  
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]




Re: Remote Execution of Scripts

2001-07-25 Thread Olivier MACCHIONI

Hi Gene,

You may want to try ssh and scp.

- ssh can run a script on a remote computer
- scp can copy a file to/from a remote computer

Both of them are decently secure.

You will need a sshd on the remote computer.

If you want to fully automate the process (ie no password asked) you have 
to put your public ssh key in ~/.ssh/authorized_keys (check the man page).

If you have to synchronize large files/directories I'd recommand using 
rsync -e ssh


Another solution would be to use some centralized user base. Solutions 
could be based on LDAP, NFS mounts, MySQL server and many others. All 
depends on the software you're using to authenticate your users.

Good luck

mac


At 19:01 24/07/01 -0400, Gene Grimm wrote:
>As I am a relative novice system administrator, perhaps someone more
>experienced can guide me to the proper way of securely invoking a script on
>a remote server. We have two facilities presently, with most of our
>equipment in our main office. I am attempting to automate account
>maintenance and would like to find information on the proper way to have one
>Perl script begin remote execution of scripts on another Linux server.
>
>Is there is a package available for administering and synchronizing dial-up
>and email accounts on multiple servers that can be customized? If not, what
>is the proper way of having a script on one host invoke a script on a remote
>host? Should this be done through NFS connections or by some other means?
>Any assistance provided would be greatly appreciated.
>
>
>--
>To UNSUBSCRIBE, email to [EMAIL PROTECTED]
>with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]


--  
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]