Hi,

here a forward of my mail to achieve what you ask for:

=======================================
Hi all,

maybe it's already mentioned, but I found it now also:
the smtp auth patch does not require you to use the smtp authentication, it
allows you to do so. If you simply ignore the auth parameter (just do a
telnet to port 25) you'll that everything works without authenticating as
well.
Now I think this should be a configurable parameter: require auth, or allow
auth. Anyway, for those who want people to authenticate (so require), here's
how (it's only 4 lines of codechange in qmail-smtpd.c):

1) change (adding a line):

#ifdef USE_SMTPAUTH
#include "base64.h"
#endif

to:

#ifdef USE_SMTPAUTH
#include "base64.h"
static unsigned char authenticated=0;
#endif

and remove the definition of "authenticated" further down in the code.

2) at the beginning of the function smtp_mail, change (adding a line):

  if (!addrparse(arg))

to:

  if (!authenticated || !relayok) { err_wantauthentication(); return; }
  if (!addrparse(arg))

3) now we just need to define this new function err_wantauthentication. So
we change (adding a line)

void err_syntax() { out("555 syntax error (#5.5.4)\r\n"); }

to

void err_syntax() { out("555 syntax error (#5.5.4)\r\n"); }
void err_wantauthentication() { out("503 AUTH first (#5.5.1)\r\n");
logline(3,"'
auth' first"); }

Now recompile, and now for every client that has not authenticated or is not
allowed to relay (RELAYCLIENT set), authentication is required.

Henning, maybe this can be in the patch, with a extra config file that can
set the required auth, and then saying:

if (auth_required && (!authenticated || !relayok)) {
err_wantauthentication(); return; }

The auth_required variable can then be set when reading the config file.

Franky

-----Original Message-----
From: Torgeir Veimo [mailto:[EMAIL PROTECTED]]
Sent: donderdag 13 september 2001 12:01
To: [EMAIL PROTECTED]
Subject: Re: smtp_auth Qs


Torgeir Veimo wrote:
> 
> When using tcpserver, I get the authentication challenge ok, but not
> when I try to mail from a machine that is on the same network as the
> qmail-ldap machine. I want smtp_auth to allways be performed by default.

I just fond the REQUIREAUTH patch. But this patch doesn't seem to be up
to date with the latest smtp_auth patch that works with the august
qmail-ldap interim release, since it doesn't patch cleanly.

Any ideas?

-- 
- Torgeir
OPGELET: VERANDERING VAN E-MAIL ADRES

Vanaf 30 november 2001 zal dit e-mail adres niet meer bereikbaar zijn. 
Het nieuwe e-mail adres is [EMAIL PROTECTED], 
in plaats van het huidige [EMAIL PROTECTED]
Momenteel kunnen beide adressen gebruikt worden. 

Verander nu dit e-mail adres in uw adresboek.


ATTENTION : E-MAIL ADDRESS CHANGE

>From november 30 2001 the sender's e-mail address will change. 
The e-mail-address will change from [EMAIL PROTECTED] to
[EMAIL PROTECTED] 
Currently both addresses are active. 

Please change the address now in your e-mail address book.

Reply via email to