[wplug] telnet for email

Jonathan S. Billings billings at negate.org
Wed Jun 18 10:09:52 EDT 2003


On Tuesday, June 17, 2003, at 09:59  PM, John wrote:

> Hmm,
>
> If you check the pop and pull the messages down once a day like I do, 
> that's
> not a big deal..  What's worse than anything is watching a user get a 
> whole
> cd set about 1.8 gig of 2 meg rar files.

If you are only popping over the files once a day, then I wouldn't say 
you are abusing POP.

>>
>> As a sysadmin who has to deal with users who do this, I have to say 
>> how
> annoying this is.  Using pop3 as if it were IMAP is not what the
>> designers of pop3 had in mind.
>>
>
> This sounds like a piss poor implementation, not a user problem.  Why 
> would
> you want to do this and take the huge IO penalty of copying a file in 
> place
> then opening to the pop daemon?  It's not like servers are not IO 
> limited
> enough as it is.  Are you trying to be redundant and watch what the 
> files
> are doing?

Doing anything with a spool file other than reading requires locking 
the file.  Also, if you want to, say, delete the 26th message out of 
100, you are taking a chunk of data out of the middle of the file.  
These operations all require quite a bit of IO if you require the spool 
be one big file.  Also, we prefer to stay on the side of safety, and 
work on a copy of the file, to avoid corruption.

> Last I looked pop3 daemons don't do that, and here's a trace:
>
> stat64("/var/spool/mail/jstrange", {st_mode=S_IFREG|0660, st_size=0, 
> ...}) =
> 0
> stat64("/var/spool/mail/jstrange", {st_mode=S_IFREG|0660, st_size=0, 
> ...}) =
> 0
> alarm(0)                                = 0
> alarm(0)                                = 0
> alarm(0)                                = 0
> time(NULL)                              = 1055896718
> open("/var/spool/mail/jstrange", O_RDONLY) = 2
> fstat64(2, {st_mode=S_IFREG|0660, st_size=0, ...}) = 0
> close(2)                                = 0
> alarm(0)                                = 0
> alarm(0)                                = 0
> write(1, "+OK Mailbox open, 0 messages\r\n", 30+OK Mailbox open, 0 
> messages

I'd be interested in seeing a strace of your pop daemon when you 
actually HAD messages.  While I'm not familiar with your server's code, 
it probably saw that it was a 0 sized file, and opened it O_RDONLY.  
I'm certain that your server does some form of locking, or else it is 
going to corrupt your spool.  In your example, it opens the file 
readonly and then closes it before it even sends back a message to the 
client.



--
   Jonathan Billings
billings at negate.org




More information about the wplug mailing list