RE: large files

2003-04-25 Thread Milanuk, Monte


> Ideas?  Other than killing them, of course, no matter how 
> tempting that is... 

I think you've gotten some good ideas so far, including the --max-depth=
option to restrict the depth of search, and another one that I use quite a
bit on my home system is --exclude.  I didn't see you mention it, but using
--exclude you could tell 'du' to ignore the .snapshot directories and other
stuff you know isn't the problem, or just want it to 'overlook'.  Comes in
handy when doing a 'du' on the / directory, otherwise du wants to tally up
/proc... Eeek!

HTH,

Monte




Re: [Help] Dose Anyone have Debian Woody FreeS/WAN through NAT Howto ???

2003-04-25 Thread Fraser Campbell
On April 25, 2003 01:10 pm, axacheng wrote:

> Now, my freeswan can implement to :
>
> 1. FreeS/WAN server(Debian woody) [X.509 auth]FreeS/WAN
> client(Debian woody)
>
> 2. FreeS/WAN server(Debian woody) [X.509 auth]Windows2000/XP client
>
> But...i CAN NOT use FreeS/WAN server through NAT ..

You don't show in your diagram where the NAT device is.  What type of NAT 
device are you using is also important.

> Anyone have this document or Howto  that can share us [EMAIL PROTECTED]@

http://jixen.tripod.com/

-- 
Fraser Campbell <[EMAIL PROTECTED]> http://www.wehave.net/
Brampton, Ontario, Canada Debian GNU/Linux




Re: grep and delete

2003-04-25 Thread Emmanuel Lacour
On Fri, Apr 25, 2003 at 10:32:04PM +0200, Emmanuel Lacour wrote:
> On Fri, Apr 25, 2003 at 02:20:25PM +0200, Olivier Macchioni wrote:
> > ++ 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
> > 
> 
> grep -Ev "criteria1|criteria2" > logfile.new
> 
Ouch:

grep -Ev "criteria1|criteria2" logfile > logfile.new
   ^^^ 

-- 
Emmanuel Lacour  Easter-eggs
44-46 rue de l'Ouest  -  75014 Paris   -   France -  Métro Gaité
Phone: +33 (0) 1 43 35 00 37- Fax: +33 (0) 1 41 35 00 76
mailto:[EMAIL PROTECTED]   -http://www.easter-eggs.com




Re: grep and delete

2003-04-25 Thread Emmanuel Lacour
On Fri, Apr 25, 2003 at 02:20:25PM +0200, Olivier Macchioni wrote:
> ++ 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
> 

grep -Ev "criteria1|criteria2" > logfile.new


;-)


AW, I also make lot of "cat" use, even if it's not necessary...

-- 
Emmanuel Lacour  Easter-eggs
44-46 rue de l'Ouest  -  75014 Paris   -   France -  Métro Gaité
Phone: +33 (0) 1 43 35 00 37- Fax: +33 (0) 1 41 35 00 76
mailto:[EMAIL PROTECTED]   -http://www.easter-eggs.com




Re: [Help] Dose Anyone have Debian Woody FreeS/WAN through NAT Howto ???

2003-04-25 Thread thing
http://www.thing.dyndns.org/debian/wifivpn.htm
might help
regards
Thing
axacheng wrote:
As subject..Please Help me..
Now, my freeswan can implement to :
1. FreeS/WAN server(Debian woody) [X.509 auth]FreeS/WAN client(Debian 
woody)
2. FreeS/WAN server(Debian woody) [X.509 auth]Windows2000/XP client
But...i CAN NOT use FreeS/WAN server through NAT ..
Anyone have this document or Howto  that can share us [EMAIL PROTECTED]@
Thanks very much.

 





[Help] Dose Anyone have Debian Woody FreeS/WAN through NAT Howto ???

2003-04-25 Thread axacheng
As subject..Please Help me..

Now, my freeswan can implement to :

1. FreeS/WAN server(Debian woody) [X.509 auth]FreeS/WAN client(Debian 
woody)

2. FreeS/WAN server(Debian woody) [X.509 auth]Windows2000/XP client

But...i CAN NOT use FreeS/WAN server through NAT ..

Anyone have this document or Howto  that can share us [EMAIL PROTECTED]@

Thanks very much.



-- 
Trust & Unique ... 




Weird thing (qmail, amavis, maildrop)

2003-04-25 Thread Marcin Owsiany
I have a weird problem with some virus messages getting corrupted (we
detect about 2 up to 3 such corrupted messages per month).
The box does about 5 deliveries per day. I have no other reports
about corrupted messages, so I guess this is not some hardware issue.

First, a description of the message flow:

1. Qmail receives a message for a local user. 
2. qmail-lspawn invokes /var/qmail/bin/qmail-local, which is in fact a
symlink to a tweaked amavis-sh script.
3. The script invokes:
 cat | ${formail} -f -A "${X_Header_String}" >${tmpdir}/receivedmail

 which stores the message (read from stdin, which probably opened from
 the queue) to a file

4. The script MIME-unpacks the message with 

 ${metamail} -x${tmpdir}/unpacked/ < ${tmpdir}/receivedmail > /dev/null 2>&1

 ($metamail is /usr/local/bin/reformime in my case)

5. Since the message contains an attachment with filename ending with an
".exe", namely "Update136-20.exe", md5sum is ran on it (this is my
modification). md5sum reports "8f0730eec78b2c4f0586fe69c5f17983"

6. The script performs some further checks, however it does not modify
the file "receivedmail"

7. Since the virus scanners report no virii, the script finally calls:

 /var/qmail/bin/qmail-local-real "$@" < ${tmpdir}/receivedmail

 (that is the real qmail-local)

8. qmail-local runs maildrop, since the user doesn't have a .qmail file,
and maildrop is specified as the "defaultdelivery"

9. the user has only a skeletal .mailfilter file:

 FROM='[EMAIL PROTECTED]'
 to "./Maildir/"

10. maildrop delivers the file to the user's maildir

Now the weird thing:

When I take this message, extract the attachment and run md5sum on it,
it reports sum "4613a17f12531d21c683023ffa4b4a34". I get this sum when I
extract the message with mutt, reformime, or if I inject the message to
qmail again so it runs the above procedure once again.

I suspect the message gets corrupted somewhere between qmail-local and
user's maildir, but I have no idea how or when exactly this might
happen? The message looks properly formatted plaintext/html +
attachment. I can provide it if someone's interested.

The thing that bugs me most is that AVP doesn't detect that the message
is a virus during the first delivery, but does detect it on subsequent
deliveries.

I'm really puzzled. Any hints are welcome.

Marcin
-- 
Marcin Owsiany <[EMAIL PROTECTED]> http://marcin.owsiany.pl/
GnuPG: 1024D/60F41216  FE67 DA2D 0ACA FC5E 3F75  D6F6 3A0D 8AA0 60F4 1216




Samba causing eth1 transmit timeout

2003-04-25 Thread Gene Grimm
Since installing Samba on an inhouse server earlier this week, I have been
noticing the following error message:

kernel: eth1: 21041 transmit timed out, status fc36, CSR12 01c4,
CSR13 ef0d, CSR14 f73d, resetting...

Currently, eth1 is not attached to anything. Is there any way to prevent
Samba from attempting to broadcast on this interface?




FW: grep and delete

2003-04-25 Thread Laurens van Alphen
Title: Message



Something like:
 
grep 
-v criteria /path/to/logfile > newlogfile
 
Then,
 
mv 
newlogfile logfile
killall -HUP syslogd
 
--
Laurens van Alphen
Keen on dots
 

-Original Message-From: Craig 
[mailto:[EMAIL PROTECTED] Sent: vrijdag 25 april 2003 
13:44To: Debian-ISPSubject: grep and 
delete
Hi 
Guys
 
I need to grep log 
files and delete certain criteria. Any ideas
and how I can do 
this ?
 
Thanks
Craig


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 ?




AW: grep and delete

2003-04-25 Thread Kaiser, Michael (ZIBP)



 
try 

 
grep 
-v regexp_that_you_want_to_be_deleted file >file2
mv 
file2 file
 
"grep 
-v " shows lines NOT matching your regexp.
 
..
 
regards
Michael Kaiser 
___ HDI V.a.G. Informationsverarbeitung Systemtechnik / ZIBP 
Riethorst 2 30659 Hannover Büro: Podbielskistraße 396 Tel.:  +49 (511) 645-3491 Fax:  +49 (511) 645-4400 E-Mail: [EMAIL PROTECTED] Internet: www.hdi.de 

Wichtiger Hinweis: 
Diese E-Mail (inklusive etwaiger 
Anhänge) ist vertraulich und nur für den Adressaten bestimmt. Wenn Sie diese 
E-Mail irrtümlich erhalten haben, machen wir Sie darauf aufmerksam, dass Ihnen 
eine Kenntnisnahme, eine Vervielfältigung oder Weitergabe nicht gestattet ist. 
Bitte informieren Sie uns umgehend, löschen Sie die E-Mail und vernichten Sie 
etwaige Ausdrucke.
Important Note: This e-mail (including any attachments) is 
confidential and intended only for the use of the addresse (s) named herein. If 
you have recieved this e-mail in error, you are hereby notified that any review, 
copying or distribution of it is strictly prohibited. Please inform us 
immediately and destroy the original e-mail and any printouts.

  -Ursprüngliche Nachricht-Von: Craig 
  [mailto:[EMAIL PROTECTED]Gesendet: Freitag, 25. April 2003 
  13:44An: Debian-ISPBetreff: grep and 
  delete
  Hi 
  Guys
   
  I need to grep log 
  files and delete certain criteria. Any ideas
  and how I can do 
  this ?
   
  Thanks
  Craig


RE: grep and delete

2003-04-25 Thread Javier
Perhaps something like this:

“# grep -l  *.log | xargs rm -rf"

be careful

Javier.
  

-Mensaje original-
De: Craig [mailto:[EMAIL PROTECTED] 
Enviado el: viernes, 25 de abril de 2003 13:44
Para: Debian-ISP
Asunto: grep and delete

Hi Guys
 
I need to grep log files and delete certain criteria. Any ideas
and how I can do this ?
 
Thanks
Craig




Re: Partitioning a Web Server

2003-04-25 Thread Michelle Konzack
Am 18:43 2003-04-15 -0700 hat Daniel Brown geschrieben:
>
>Wrote Randy Kramer:
>
>> On Monday 14 April 2003 11:44 pm, Russell Coker wrote:
>> > On Sat, 5 Apr 2003 13:38, Michelle Konzack wrote:
>> > > I mean, Each Client has 250 Mbyte DiskSpace for ftp,
>> > > http, mail and LOGS and can not use more !!!
>> > >
>> > > But 200-300 partitions on ONE DISK ???
>> 
>> I'm a little late with this, but just thought that someone should 
>> mention that there is some kind of limit on the number of partitions 
>> per disk.  It's something like 63 for IDE disks and 16 for SCSI disks 
>> (but I could have that backwards).
>
>The loop device (mounting filesystems from a file on a disk) is able
>to have more than that -- up to 256 as of recent 2.4 kernels.
>
>The default allocation is small: only 8.  To get more, pass a
>parameter of max_loop=<1-256> when booting the kernel or loading the
>loop module.  Example for lilo.conf:
>
>image=/vmlinuz
>label=Linux
>read-only
>append="max_loop=256"

I think I will look for the right file in the Sources to change 
it permanently 

>Then read losetup(8) manpage and start making some filesystems.

I have done this many times bevore... 

>Really, though, limiting disk allocation for clients is more flexibly
>done by using quotas, where users are simply stopped from using more
>space than they're allowed.

Hmmm, formating a ZIP-100, ZIP-250 or an ZIP-750 with ext2/3 and then 
a 'dd' on it. 

If I client like to get his Diskpace I can 'dd' it to ZIP-Disks ;-))

>Using partitions or loop devices in web-hosting is only a good idea if
>you're providing virtual private servers -- or similar special
>purposes.

Thanks
Michelle

-- 
Registered Linux-User #280138 with the Linux Counter, http://counter.li.org.




Re: order enquiry

2003-04-25 Thread Michelle Konzack
Hey Rich, 

Am 19:08 2003-04-16 -0500 hat Rich Puhek geschrieben:
>
>abiodun mathins wrote:

>
>Dear sirs,
>
>I would be most happy to provide you with the requested equipment at 
>pricing which will be most favorable to you. As you may be aware, my 
>father, the president of Insanely Big Hardware Company Inc. was recently 
>incarcerated on charges of financial misdoing. Once I can clear up 
>certain financial obligations associated with this unfortunate 
>occurrence, I will have access to untold sums of money and equipment, 
>and I will be able to send the equipment to you.
>
>I would like your help to expedite the order. Please send $20,000 
>unmarked US dollars in large plastic bags. Once the financial 
>arrangements are complete, I will ship your order.
>
>

You have forgotten to tell where to send the money... 

www.fsf.org and/or www.debian.de

Michelle

-- 
Registered Linux-User #280138 with the Linux Counter, http://counter.li.org.




grep and delete

2003-04-25 Thread Craig



Hi 
Guys
 
I need to grep log 
files and delete certain criteria. Any ideas
and how I can do 
this ?
 
Thanks
Craig


Re: large files

2003-04-25 Thread Marcel Hicking
--On Thursday, April 24, 2003 15:43:31 -0600 David Bishop 
<[EMAIL PROTECTED]> wrote:

I have a user that really like to create files.  Then,
they don't clean them  up.  We have already put a quota*
on them, but unfortunetly, their directory  is so large
and convaluted, that they can't even figure out where all
the  disk space has gone.  Is there a sane way to
generate a report showing the  disk usage from a certain
point on down, sorted by size?  Heres kinda what I  mean:
for a standard user, I would just run
'du /u/foo | sort -n | tail -20', and tell them to clean
up whatever is there.   However, I've let a du | sort -n
run on this directory for over four hours,  before giving
up in disgust.  It is almost 100Gigs of files, with at
least  four or five directories that have 20K to 30K+
files each (plus hundreds of  other subdirs).  *And*,
it's on a filer, so there are .snapshot directories  that
du thinks it has to plow through, quintupling the amount
of work.   I'd  also like to make this into a weekly
report, so that they can make it part of  their Friday
routine (let's go delete 10 gigs of data! Woohoo!).
Ideas?  Other than killing them, of course, no matter how
tempting that is...

Maybe use find and restrict the search depth to at least 
find some large dirs, plus exclude the snapshots? Sth like 
"find /where/ever -size +1k"  for the larger files, and 
for large dirs maybe, haven't tried, "... -size +1k - type 
d". If you pipe this through awk you can easily sum it up.
I remember once writing a script to reporting disk usage on 
a web server above the purchased amount.

Cheers, Marcel



Re: route to/from xover box

2003-04-25 Thread robjeh
Sorry i didn't send my anser to the maillist but i suggested to use proxyarp
with ip_forwarding and made a small example. ( i think its the fasted way to
solve this problem.

Greatings,
  Robbert Helling

Citeren Tarragon Allen <[EMAIL PROTECTED]>:

> On Fri, 25 Apr 2003 01:04 am, Mark Constable wrote:
> > Not strictly Debian related but the boxes in question are deb powered.
> > I have just been given a /28 (16 node) subnet and until I get a switch
> > in place I have a short xover eth cable between two boxes. I thought I
> > could get away with a couple of static routes in the mean time but the
> > upstream default gateway on the first box keeps arping for the IP on
> > the 2nd box... subnet is x.x.x.144/28 ...
> >
> >  x.x.x.145 <-> eth0:x.x.x.146 eth1:x.x.x.147 <-xover-> eth0:x.x.x.158
> >
> > Any suggestions as to how x.x.x.158 can see the outside world ?
> 
> Well, the gateway is ARPing for x.158 because it thinks it's on the same 
> network, which it isn't. Three suggestions :
> 
> 1) reconfigure the gateway with a static route to x.158 through x.147.
> 
> 2) configure ethernet bridging on x.147 through to x.158.
> 
> 3) use a different subnet for the x.158 box. Of course this will require the
> 
> gateway to be reconfigured as well. Depending on what the x.158 machine needs
> 
> to do, it might be easier to give it a private IP address and NAT it through
> 
> the x.147 machine instead.
> 
> t
> -- 
> GPG : http://n12turbo.com/tarragon/public.key
> 
> 
> -- 
> To UNSUBSCRIBE, email to [EMAIL PROTECTED]
> with a subject of "unsubscribe". Trouble? Contact
> [EMAIL PROTECTED]
> 
> 
> 





__


http://www.wanadoo.nl/




Re: dbmail

2003-04-25 Thread Emmanuel Lacour
On Thu, Apr 24, 2003 at 09:42:08PM -0700, Daniel Brown wrote:
> Wrote Mark Devin:
> 
> With the rewritten delivery agent, and Sendmail using virtusertable
> (sourced from MySQL using a perl script), I got it working the way I
> wanted it to.
> 

Using postfix, you could access directly a mysql database


My 0.1 euros.


-- 
Emmanuel Lacour  Easter-eggs
44-46 rue de l'Ouest  -  75014 Paris   -   France -  Métro Gaité
Phone: +33 (0) 1 43 35 00 37- Fax: +33 (0) 1 41 35 00 76
mailto:[EMAIL PROTECTED]   -http://www.easter-eggs.com




Re: dbmail

2003-04-25 Thread Daniel Brown
Wrote Mark Devin:

> Anyone have experience in setting up dbmail on a debian system?
> 
> I am after a solution that provides imap, pop3, and web based mail
> access using postfix as the MTA.  Can anyone speak from experience
> regarding performance, scalability, reliability and ease of setting up
> of dbmail?
> 
> Regards.
> Mark.

I've test-implemented DBMail on Debian with Sendmail, but not PostFix
or in a production environment (yet).  Here's some of my notes,
though.

The POP/IMAP are very nice and fast.  The SQL schema is simple and
scalability.  The command administration tools are simple, to the
point that you could bypass them with your direct DB manipulation.

My only pieve, though, was the delivery agent: dbmail-smtp.

1) It was not be as well documented as I think it should be for
   integration with an incoming MTA.  An option existed to specify the
   mailbox by its POP/IMAP username, but it wasn't documented.  The
   documented approach only used the email-alias for delivery, but IMO,
   it should be the MTA's role (not DBMail's) to determine what email
   addresses are valid for the mailbox.  Not knowing this information
   kept me confused for days.

2) It didn't give back error codes that say something was wrong, like
   the mail user didn't exist, or quota exceeded.  I had to write my
   own modified copy that would give appropriate errors back to
   Sendmail. After that, it seemed to run like a well-behaved delivery
   agent should.  Some day I might re-implement it with LMTP instead
   of Sendmail return codes, and distribute it back to the developer.

3) A side effect of not using /etc/passwd (or LDAP) as the source of
   user information is that Sendmail is somewhat blind about whether a
   given user exists or not, and has to attempt delivery to find out.
   That's not a good thing if you want an efficient mail system, so
   I resolved it by listing all the users in /etc/mail/virtusertable.
   I plugged up all the @domain catch-all lines with a 550 error,
   which allows Sendmail to immediately reject emails to unknown
   users.

With the rewritten delivery agent, and Sendmail using virtusertable
(sourced from MySQL using a perl script), I got it working the way I
wanted it to.

I looked at DBMail as a possible mail store for a new small web-
hosting company, and might actually use it.  I haven't come close to a
real decision, though, and more well-used solutions like QMail or even
traditional Sendmail are an option.

Someone has created a Debian package for DBMail, but it didn't seem to
be integrated into Debian the way I thought it should be.  I don't
remember why though, and I've since decided to stay with the upstream
source distribution since I have my own injector changes.

  -Daniel

-- 
Daniel Brown <[EMAIL PROTECTED]>