Re: qmail-pop3d alternative needed ASAP.

2001-11-29 Thread cbunnell

Yea, my company has experienced a similar problem.  It WAS traced down to
the router.  I was getting "malloc fail"  which is memory allocation
failure.  Basically, a bad SIMM in the router.  I replaced the DRAM and all
is well now...  The symptoms were exactly the same as what was described.  I
don't know what router you are using, mine was a Cisco 7206.  If you're
running Cisco IOS, try logging in, enabling, and doing a "term mon" from the
vty.  Look for memory errors or any other weird errors going on on the
router.  Also try a "show mem alloc fail" command.  That'll show you if you
have any memory failure history.

Aside from that, are you running anything across NFS?  I found some quirky
things when dealing with my mail server cluster and NFS...

Good luck!

- Original Message -
From: "Ken Jones" <[EMAIL PROTECTED]>
To: "Steve Fulton" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Wednesday, November 28, 2001 10:34 AM
Subject: Re: qmail-pop3d alternative needed ASAP.


> I saw this once with an ISP.
> They traced it down to some networking router configurations.
> I never found out the details tho.
>
> Ken
>
> On Wed, 2001-11-28 at 12:08, Steve Fulton wrote:
> > Hi all,
> >
> >I need an alternative POP daemon to use that's compatiable with
> > Vpopmail.  This is urgent, so I'd appreciate any feedback on your
> > experiences with what is available..
> >
> >FYI, I'm having 2 clients with severe POP problems -- basically their
> > POP sessions drop mid way thru downloading mail.  Unfortunately its not
at
> > one message or one type of message.  It seems to be very random.  If
anyone
> > has experienced this problem, I'd also appreciate some feedback.
> >
> > -- Steve.
> >
> >
>
>
>




lastauth table in Vpop5

2001-10-06 Thread cbunnell

Anyone else notice that the lastauth table in 5.0 (maybe anything after
4.9.10 too...) doesn't use a "nice" timestamp anymore?  It used to be human
readable format, now it's ticks...  or have I screwed something up during
install?

No big deal, just wondering why it changed - or more importantly - if I
screwed up.

Chris Bunnell

Senior Engineer - Network Implementation
Sonic Internet Services
9719 Lincoln Village Dr. #505
Sacramento, CA. 95827
(916) 854-5940
www.sonicisp.net
Powered by Sun.
My other OS is
your Linux box.




Re: Using rbl on a per domain basis?

2001-10-01 Thread cbunnell

Just an FYI, I used to use RBL and then they quit providing the service for
free.  It in fact broke my qmail/vpopmail implementation because I had them
in my /service/qmail-xxx scripts.  That was kinda fun to try to figure out
why the thing was just timing out...

Anyway, just wanted to point that out.  Didn't know if the how-to's had been
updated to reflect RBL's new charge policy.

Chris

- Original Message -
From: "Gabriel Ambuehl" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, October 01, 2001 12:54 AM
Subject: Using rbl on a per domain basis?


> -BEGIN PGP SIGNED MESSAGE-
>
> Hello,
> I'm currently thinking about deploying rblsmtpd here, but I'm
> somewhat
> hesitating to do it without giving the users the possibility to
> switch
> it on or off. I don't see any possibility to do this with rblsmtpd
> itself (correct me if it actually is possible) so now I'm wondering
> whether
> it would be possible to integrate some rbl functionality into
> vdelivermail
> so it would be possible for the users to decide themselves
> (preferably
> in qmailadmin) whether they want blacklists to be used or not.
> Thoughts?
>
> Apropos SPAM fighting: how's eps status?
>
>
>
>
>
> Best regards,
>  Gabriel
>
> -BEGIN PGP SIGNATURE-
> Version: PGP 6.5i
>
> iQEVAwUBO7gTJcZa2WpymlDxAQFcxQf/W26K6MY272+vdCIkxC8ev4VJZbF2SlD1
> Lfxn3VnbHU1y6WtoxnJfOv3l2iyQS+DkG6zwbUG86KdVRjmvbeZNfzv2djp7/v3y
> 01LpGoJPobmoraRjOKLxiuEWAp0VhzQ3PIYYyJL8A6PT4pjPUCL+k0BuA/SixpOY
> 97PDa8YD+lRQqMcLdRA5PCkcQbcyhLaYkP6ataEPhFMidWyYU5WsP+PFzZEeRxcj
> EcbqkpfpupZfXgNT3ZxQSi4+bTCgwzZ+qs3X6R0A3kpRdf+OU96+4KQPqAQ2GBrE
> rI3ycg5xfq7mN+8ER5ZuxdKzPby3L1rsntkXcz3iTQIHmcY9wdomPA==
> =NIXa
> -END PGP SIGNATURE-
>
>




Re: vpopmail5 w/ mysql

2001-09-21 Thread cbunnell

you've got mysql replication turned on, but I doubt you have multiple mysql
server...  turn replication OFF and re-compile.

- Original Message -
From: "alexus" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, September 20, 2001 8:09 PM
Subject: vpopmail5 w/ mysql


> hello
>
> I've been successfully able to compile and run vpopmail 4.9.10 and sine
> inter7 is very close for release next version of vpopmail (5.0) I've
decided
> to try it on.. along with new sqwebmail 3.0.. here is my configuration
line
> that I've used; after that I just did gmake;gmake install; everything went
> smoothly no errors or warning of any kind however once again I'm having
> problem(s) with mysql;( I did edit vmysql.h and enter my settings such as:
> my uid,pwd,db (I'm able to logon into mysql using mysql client)).. here is
> what I'm getting when I'm trying to auth:
>
> su-2.05# telnet localhost pop3
> Trying ::1...
> Trying 127.0.0.1...
> Connected to localhost.
> Escape character is '^]'.
> +OK <[EMAIL PROTECTED]>
> USER [EMAIL PROTECTED]
> +OK
> PASS xx (not actual password) :)
> could not connect to mysql update server
> -ERR authorization failed
> Connection closed by foreign host.
> su-2.05#
>
> su-2.05#
>
./configure --enable-ip-alias-domains=y --enable-qmail-ext=y --enable-roamin
>
g-users=y --enable-relay-clear-minutes=18 --enable-auth-logging=y --enable-m
>
ysql-logging=y --enable-valias=y --enable-logging=y --enable-mysql=y --enabl
>
e-sqwebmail-pass=y --enable-learn-passwords=y --enable-tcprules-prog=/usr/lo
> cal/bin --enable-mysql-replication=y
>
>vpopmail 5.0pre5
> Current settings
> ---
>
> vpopmail directory = /var/qmail/vpopmail
>uid = 1026
>gid = 1015
>   ip alias = ON  --enable-ip-alias-domains=y
> address extentions = ON  --enable-qmail-ext=y
>  roaming users = ON  --enable-roaming-users=y
> tcpserver file = /etc/tcp.smtp
> open_smtp file = /var/qmail/vpopmail/etc/open-smtp
> user quota = OFF --enable-hardquota=n default
>auth module = mysql --enable-mysql=y
>  mysql replication = ON  --enable-mysql-replication=y
> table optimization = many domains --enable-many-domains=y default
>   system passwords = OFF --enable-passwd=n default
>   file locking = ON  --enable-file-locking=y default
>  file sync = ON  --enable-file-sync=y default
>   auth logging = ON  --enable-auth-logging=y
>  mysql logging = ON  --enable-mysql-logging=y
> mysql clear passwd = OFF --enable-clear-passwd=n default
>  valias processing = ON  --enable-valias=y
> pop syslog = show successful and failure login attempts
>  --enable-logging=y
> default domain =  --enable-default-domain=
>   auth inc = -I/usr/local/include/mysql
>   auth lib = -L/usr/local/lib/mysql  -lmysqlclient -lz
>
>
> su-2.05#
>
> my OS is FreeBSD-4.4STABLE (if this any relevant)
>
> oh and another thing is (this might be help) in vmysql.h MYSQL_UPDATE and
> MYSQL_READ are exactly the same..
> could someone point me where i can read more about why is there two mysql
> varibles in vpopmail5 instead of one in vpopmail4? i've looked in FAQ and
in
> INSTALL that comes with vpopmail5 it doesn't say anything about it..
>
> thank you in advance
>
>
>




Vpopmail Ver 5 release

2001-09-13 Thread cbunnell

Hello Ken, Inter7!

I'm sure things have been effected by current events, but I was wondering
how the final release is looking?  Any changes?  Or should I go for pre5 ?

Thanks!

Chris Bunnell

Senior Engineer - Network Implementation
Sonic Internet Services
9719 Lincoln Village Dr. #505
Sacramento, CA. 95827
(916) 854-5940
www.sonicisp.net





Suggestions for upgrading from 4.9.10 w/ MySQL to 4.10.36 ??

2001-09-01 Thread cbunnell

Hello list,

I would like to upgrade from 4.9.10 w/ MySQL to 4.10.36 on a development
machine, only the MySQL database IS in production.  I want to implement all
the bells and whistles that 4.10.36 has to offer, so I'm quite sure that the
current sql database doesn't have all the tables that it would need.

I'm looking for suggestions on how to upgrade the database that is running
4.9.10.  I thought about maybe using vconvert (the one in 4.9.10) to take
the database back to cdb, then run vconvert (the current one in 4.10.36) to
rebuild everything.

Another suggestion that I already found in the archives was to use sql
commands to "add" the necessary columns, etc. to make the database
up-to-date with what 4.10.36 would be needing...if this has worked for
someone, could you email me with the sql commands?  I know VERY little sql!
:)

Any thoughts?

Thanks!

Chris Bunnell

Senior Engineer - Network Implementation
Sonic Internet Services
9719 Lincoln Village Dr. #505
Sacramento, CA. 95827
(916) 854-5940
www.sonicisp.net





OT: idle timeouts for dial-in users

2001-08-31 Thread cbunnell

Hello list,

I know that this is OT for this list, but I know that there's lots of people
on this list that may have some input to my problem...

I need to disconnect abusers of my dial-up network that are sitting idle for
extended periods of time.  I am running a Cisco 72xx terminating an L2
tunnel with the traffic going into VPDN's.  The Cisco IOS command for ppp
timeout idle should work, but unfortunately, with virtual-templates, you
can't set what is considered "interesting traffic."  So the abusers have
found that setting their email client to pop their mailbox resets this timer
and they are able to stay on.

So far, my only option has been to set an "absolute" timer which kicks them
off regardless of their traffic.  I would prefer to not do this in this
manner as it's not fair to someone who is truly x-fer'ing a large file...  I
am an "unlimited" service...

Any suggestions?  I thank you for reading this OT message.

Sincerely,

Chris Bunnell

Senior Engineer - Network Implementation
Sonic Internet Services
9719 Lincoln Village Dr. #505
Sacramento, CA. 95827
(916) 854-5940
www.sonicisp.net





Re: ANNOUCEMENT: virge-vpopmail patch how-to

2001-08-13 Thread cbunnell

Is this better than qmail-scanner?

also, is it free?  It appeared from the very brief visit to their web site,
that they charge for this proggie...

I'm just getting ready to implement this (to protect the morons I mean
innocent ) so this thread comes at a good time...

Thanks,
Chris Bunnell
- Original Message -
From: "Sean C Truman" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, August 13, 2001 9:38 AM
Subject: ANNOUCEMENT: virge-vpopmail patch how-to


> Hey all,
>
> Here is the first attempt at documenting the Virge virus scanner
install
> for vpopmail. This setup is working on my development machine if anyone
> would like an account to help test please let me know.
>
> HOWTO Virge Virus Scanner for Vpopmail
> 
> Author: Sean C Truman ([EMAIL PROTECTED])
>
> HOWTO:
>  1. Obtain http://www.prodigysolutions.com/virge-vpopmail.patch.gz
>  2. Obtain http://www.vanja.com/tools/virge/virge-2.05.tar.gz
>  3. Obtain http://www.vanja.com/tools/sophie/sophie-1.15.tar.gz
>  4. Obtain and Install Sophos Virus scanner for Unix
http://www.sophos.com/
>   4a. linux forget to run ldconfig
>  5. cat virge-2.05.tar.gz | gunzip | tar xvf -
>  6. cat sophie-1.15.tar.gz | gunzip | tar xvf -
>  7. cat virge-vpopmail.patch.gz | gunzip
>  8. mv virge-vpopmail.patch virge-2.05
>  9. cd sophie-1.15
>  10. ./configure
>  11. make
>  12. cp sophia /home/vpopmail/bin
>  13. /home/vpopmail/bin/sophia -D (Must be ran as vpopmail)
>  14. cd virge source directory
>  15. cd virge-2.05
>  16. patch -c1 < virge-vpopmail.patch
>  17. ./configure
>  18. make
>  19. cp virge /home/vpopmail/bin
>  20. mkdir /home/vpopmail/virge
>  21. mkdir /home/vpopmail/virge/etc
>  22. chown vpopmail:vchkpw /home/vpopmail/virge
>  23. edit etc/virge.conf to your liking.
>   23a. Please change the virge_dir from /virge to /home/vpopmail/virge
>  24. cp etc/virge.conf /etc
>  25. cp etc/allow.users /home/vpopmail/virge/etc
>  26. cp etc/extensions /home/vpopmail/virge/etc
>  27. edit your .qmail-default delete "| /home/vpopmail/bin/vdelivermail ''
> bounce-no-mailbox" line.
>  28. edit your .qmail-default add "| /home/vpopmail/bin/virge -f
$SENDER -d
> $EXT@$USER" line
>  29. Done!
>
> Thats it it should be working..
>
>
>
>
>
>




Re: Closing an account when a customer hasn't paid?

2001-07-24 Thread cbunnell

snip.

All WAY too much work.  Use the power that vpopmail gives you.

ns3:~ 4% /RAID/vpopmail/bin/vmoduser
vmoduser: usage: [options] email_addr or domain (for the entire domain)
options: -n (don't rebuild the vpasswd.cdb file)
 -u (set no dialup flag)
 -d (set no password changing flag)
 -p (set no pop access flag)
 -w (set no web mail access flag)
 -i (set no imap access flag)
 -b (set bounce mail flag)
 -r (set no external relay flag)
 -c comment (set the comment/gecos field)
 -x (clear all flags)


vmoduser the user and set the -p flag.  Then they're email will continue to
queue up, but they can't POP in to get it until they pay up.  If they go
delinquent long enough (see company policy) then vdeluser them!

If they pay, vmoduser -x to reset them to be able to pop.

Hope this helps.

Chris Bunnell

- Original Message -
From: "Mike Rogers" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>; "Jesper Hess Nielsen" <[EMAIL PROTECTED]>
Sent: Tuesday, July 24, 2001 12:21 PM
Subject: Re: Closing an account when a customer hasn't paid?


> Easy methods:
>
> 1.They don't get mail while not paying:
> 1.remove the line from /var/qmail/control files.  it doesn't
see
> it as local, but the passwords and existing usernames/messages exist.
> 2.move the password file (or dump and delete the MySQL rows)
for
> the domain.  Mail coming in will not be recieved and they will not be able
> to authenticate.  Since they can't authenticate, they can't open a relay.
> 2.They DO get mail while not paying:
> 1.simply backup the password file and make a simple awk or sed
> script to change the password field to maybe 'haha' or something.  Of
> course, who knows what encrypted string that is, so unless they are really
> ___REALLY___ lucky, they won't be able to login to get their mail.  They
> will however still receive mail [useful for 'payment is in the mail'-  you
> don't want your customers business failing because you lost their big
> contract and big client] and it will queue up on the server and be there
> when you do get paid.  When you get paid, copy the password file back and
> you're set.  Be sure to run ./vmkpasswd after any changes if you use CDB
> files.  On SQL, this is easier, as you can just make an update where
> domain="domain.com" password="haha" or something like that.
>
> These are valid solutions.  THey make sense and work quite well.  Your
> alternate is to maybe place a file in the domain directory.  If it exists,
> it should not allow anything to happen for the domain... this of course
> requires a code hack
>
> Cheers-  Hopefully good temporary solutions
> --
> Mike
>
>
> - Original Message -
> From: "Jesper Hess Nielsen" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Monday, July 23, 2001 3:52 PM
> Subject: Closing an account when a customer hasn't paid?
>
>
> > Hi,
> >
> > Is there an easy way to close a domain temporarily, allowing me to shut
> off
> > all incoming and outgoing mail when a customer hasn't paid? - It would
be
> > cool if you could send a message to people when they log on via pop3
> saying
> > "Pay up or ship out" :-)
> >
> > /Jesper
> >
> >
>




vconvert 4.9.10

2001-07-15 Thread cbunnell

Hello list,

I'm trying to use vconvert 4.9.10 stable.  It does about a dozen of my
domains, then seg faults.

./vconvert -c -s


The dozen seem to look fine inside mysql.  IE. looks like it was successful
at converting.

When I manually vconvert the next domain (IE, the one it WOULD have done
next had it not seg faulted,) it converts it fine too.  Then I manually do
the next, and the next, and the next...  they all work fine.

If no one has an answer, I guess I'll just use a Perl script to read the
domains dir, and vconvert each domain one at a time...  that will probably
work.

Any ideas?




Re: C editors/compiliers

2001-07-06 Thread cbunnell


- Original Message -
From: "Robin S. Socha" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, July 06, 2001 2:53 PM
Subject: Re: C editors/compiliers


> * Ken Jones <[EMAIL PROTECTED]> [010706 01:25]:
> > Dood, install Linux on your machine and install the
> > development packages.


Thanks for all the suggestions (and opinons, no matter how opinonated they
may have been :)

I'm now setting up my Sparc20 as my development system.  GDB and DDD looks
pretty cool.

It's going to rock being able to step thru my C programs!

See 'ya all on the other side.

btw, one more thing that I'm sure will start another "intense" discussion.
Netscape - on Solaris anyway - SUCKS!  You can't even create a dir in the
"save as"...  it has to exist already!  LAME!  What's the browser of choice
on a *nix enviroment?  Or do I just have a crappy version of Netscape?

Chris Bunnell




Re: C editors/compiliers

2001-07-06 Thread cbunnell

>
> 
>
> I'm shocked you are using Windows! Shocked I tell you!
>
> 
>
> Ken Jones
>

Damn!  I knew I'd get beat up when I posted that message, but not THAT bad!
:)


That's ok.  I asked for it.  I DO believe Windoz machines have a place in
the world.  I personally have strong feelings towards Linux...  about as
strong as you (Ken) do towards windows.  I'd NEVER use Linux in an
Enterprise - or Windows for that matter...  I'm a Sun Solaris dude.  The
only Windows stuff at my company is 2k adv. server for the IIS - and the
only reason for that was for the ease of setup of a web server that
supported Front Page.  It was a customer requirement - being an ISP and
all...

Anyway, I don't want to get off topic (and into an argument) anymore than we
already have.  I know how "touchy" most people are about their choice of OS.

I appreciate the response.  If I need to do this development stuff on a *nix
platform to be able to do it right, that's fine with me.  I've got a Sparc20
just sittin' here.  I do tend to like the "...fancy screen based code
development systems..."  so I guess I'll look into Code Warrior.  I've
basically been doing my editing with an equivalent of vi (ultraedit) and
then make, and have found it hard to deal with.  I'm just too green of a "C"
programmer.  I need some debugging tools.  IE. ability to step through a
program, view variables, etc...  You can't do that with just vi and make.

Thanks for the info.

Chris - yea, I use windows machines (but not for servers!) - Bunnell

;)







C editors/compiliers

2001-07-05 Thread cbunnell

Hello list,

I've been working very hard at getting the "over quota" message stuff
working but am having a rough time debugging my code.  I'm working on a PC
platform using UltraEdit32 to do my editing.  Ultraedit has a built in FTP,
so that's convenient to upload and then do a compile on my Solaris platform.

Debugging this way SUCKS!  What are the vpopmail maintainers (Ken, and co.)
using?  I need a way to trace through the program, set/check variables, etc.
I've got Borland C++ but it doesn't do me much good running on a PC when the
program is going to run on Unix

(I'm spoiled by Perl's -d function... ;)


Suggestions?

Thanks,
Chris Bunnell




Re: patch to vpopmail.c to fix Solaris unlink() bug

2001-07-02 Thread cbunnell

Good job on this patch David!

I noticed the same behavior, but didn't put 2 and 2 together quite as well
as you did...


On a different note, in regard to bugs, have you noticed that the
".current_size" code in vdelivermail is broken?  .current_size never reduces
as you delete mail.  It just keeps getting bigger and bigger

I was working on a "user over quota" message when I discovered it.  Made my
code a real pain in the ass to figure out.  I kept blaming my code for some
of the things I was seeing happen.  I finally realized that even the "stock"
code was broken.

I'm working on it, but I'm not much of a C programmer..  I'm struggling
pretty hard with this stuff.  Maybe you'd be interested in taking a look at
it?  (Now that I've pointed it out, you'd probably look into it anyway.  :)

Chris Bunnell

- Original Message -
From: "David Wartell" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, July 02, 2001 12:05 PM
Subject: patch to vpopmail.c to fix Solaris unlink() bug


> Here is a patch to fix a bug that was found in int vdelfiles( char *) in
vpopmail.c.  The problem is that vdelfiles assumes that
> calling unlink() on a directory will return an error.  This is true on
Linux but is NOT true on Solaris.  What the vdelfiles() code
> does on Solaris without this patch on Solaris is unlink the given
directory from its parent which leaves the file system corrupted
> and the disk space and inodes used even though the entry looks like it is
deleted.  The patch should make the code more portable (at
> least across Linux AND Solaris).
>
> Here is a sequence of commands which repoduce the error on a Solaris host.
The commands were run on a fresh install of vpopmail
> 4.10.24, although 4.10.26 and earlier produce the same error on Solaris.
The patch is known to patch cleanly against 4.10.24 and
> 4.10.26
>
> --testing reproducing the
error---
> Notice the link count for the domains directory.
> apollo:/var/vpopmail # ls -l -d domains
> drwx--   2 vpopmail vchkpw512 Jun 29 14:51 domains/
>
> I add a domain and of course the link count goes up as expected because a
directory was added to domains
> apollo:/var/vpopmail # bin/vadddomain foo.com 2782y2
> apollo:/var/vpopmail # ls -l -d domains
> drwx--   3 vpopmail vchkpw512 Jun 29 14:52 domains/
>
> I add a second domain and the link count of domain goes up again as
expected
> apollo:/var/vpopmail # bin/vadddomain foo2.com 2782y2
> apollo:/var/vpopmail # ls -l -d domains
> drwx--   4 vpopmail vchkpw512 Jun 29 14:52 domains/
>
> Now I remove a domain and the link count of domains does NOT go down!
This means the disk space and inodes are still being used.
> apollo:/var/vpopmail # bin/vdeldomain foo2.com
> apollo:/var/vpopmail # ls -l -d domains
> drwx--   4 vpopmail vchkpw512 Jun 29 14:52 domains/
> apollo:/var/vpopmail # ls -l domains
> total 1
> drwx--   3 vpopmail vchkpw512 Jun 29 14:52 foo.com/
> apollo:/var/vpopmail #
>
>
> the
patch--
> diff vpopmail.c ../vpopmail-4.10.24.dist/vpopmail.c
>
> 425,434c425,448
> <   /* try to unlink the file, this will fail on directories
> <* but it will succeed on symbolic links, because it a
> <* file ;) this is how we erase an aliased domain from
> <* the file system.
> <* On success, return success
> <*/
> < if ( unlink(dir) == 0 ) {
> <   /* return success */
> <   return(0);
> <   }
> ---
> > /* Modified By David Wartell [EMAIL PROTECTED] to work with
Solaris.
> >  * Unlike Linux, Solaris will NOT return error when unlink() is called
on a
> >  * directory.   A correct implementation to support Linux & Solaris is
to test
> >  * to see if the file is a directory.  If it is not a directory unlink()
it.
> >  * If unlink() returns an error return error.
> >  */
> >
> > if (lstat(dir, &statbuf) == 0) {
> > // if dir is not a directory unlink it
> >   if ( !( S_ISDIR(statbuf.st_mode) ) ) {
> >   if ( unlink(dir) == 0 ) {
> >   /* return success we deleted the file */
> >   return(0);
> > }
> >   else {
> > /* error, return error to calling function, we couldn't
unlink the file */
> > return(-1);
> > }
> > }
> >
> > } else {
> > /* error, return error to calling function, we couldn't lstat
the file */
> >   return(-1);
> > }
>
> -David Wartell
> ActionWeb Services
> [EMAIL PROTECTED]
>
>




Re: .current_size fails to update

2001-07-02 Thread cbunnell

Update:

Well, that was an easy fix..  All I had to do was reverse the order in this
IF statement.

/* If the message is greater than 1000 bytes and
 * the user is over thier quota, return it back
 * to the sender. We allow messages less than 1000 bytes
 * to go through. This is so system admins can send a
 * user over quota message
 */
from--> if (message_size>1000 &&
user_over_quota(address, quota)==1) {
change to --> if (user_over_quota(address, quota)==1 &&
message_size>1000) {
  printf("user is over quota\n");
  return(-1);

cool stuff.  I've been enrolled at the "C" school of hard knocks all
weekend...  I've learned A LOT!

I'll update this list and Ken when I get the over_quota message stuff
done...  It should be today.

Chris Bunnell


- Original Message -
From: "chris" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, July 02, 2001 9:56 AM
Subject: FYI: .current_size fails to update


> Just an FYI:
>
>
> While working on mods to vdelivermail for "user over quota messages," I
> discovered a bug.  It seems that due to the way checks are made for
messages
> under 1000 bytes, the .current_size file in each users mailbox isn't
getting
> updated for all messages.  Any message under 1000 bytes gets delivered
> without updating the .current_size file.  Once you send a message >1000
> bytes, the file gets updated, but only with the current messages size!  It
> doesn't "catch up" with all the smaller message sizes...
>
> I'll look at fixing this while I work on my over quota message part of the
> code...
>
> Chris Bunnell
>
>