Openwall GNU/*/Linux - a small security-enhanced Linux distro for servers
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Wed, 22 Jun 2005 20:36:26 +0400
From: Solar Designer <solar@...nwall.com>
To: popa3d-users@...ts.openwall.com
Subject: Re: POP protocol question.

On Tue, Jun 21, 2005 at 10:18:37PM -0400, Nagy Ondrash wrote:
> In short: How do I disable UIDL function on popa3d?

You can do this by removing the following line from pop_trans.c:

	{"UIDL", pop_trans_uidl},

But it is not the right way to achieve your goal and it may not work.

> > I have a dilemma with some clients that are messing around with settings
> > on MS email clients. All email clients have the option to "Leave messages
> > on server", which is all find and dandy, but I would like to be able to
> > disable this function, preferably on the server side. It's painful to
> > remove a few thousand e-mails on Manday after a long weekend.
> > Is it possible to accomplish this and if yes, how would I go about it?

A quick hack would be to patch pop_trans.c: pop_trans_retr(), replacing
this line:

	if (msg->flags & MSG_DELETED) return POP_ERROR;

with:

	db_delete(msg);

That's line number 106 in popa3d 1.0.

This will cause all retrieved messages to be deleted when the client
terminates the session with a QUIT.  (On aborted or crashed sessions,
nothing will be deleted.)

Please note that this simplistic change violates the POP3 protocol by
not only enforcing this policy (which is in fact permitted), but by
causing other POP3 protocol commands to treat the retrieved messages as
marked for deletion.  Although this issue is very subtle and is
unlikely to cause a problem in practice, a more elaborate source code
patch (e.g., introducing a separate MSG_RETRIEVED flag) may be
desirable.

-- 
Alexander Peslyak <solar at openwall.com>
GPG key ID: B35D3598  fp: 6429 0D7E F130 C13E C929  6447 73C3 A290 B35D 3598
http://www.openwall.com - bringing security into open computing environments

Was I helpful?  Please give your feedback here: http://rate.affero.net/solar

Powered by blists - more mailing lists

Your e-mail address:

Powered by Openwall GNU/*/Linux - Powered by OpenVZ