Re: SMTP-AUTH for LOCALS clients
Michał Grzędzicki <[email protected]>
| Newsgroups | gmane.mail.qmail.ldap |
|---|---|
| Message-ID | <[email protected]> |
Wiadomość napisana w dniu 2009-05-27, o godz. 09:48, przez Carlos García Gómez: > Hi, > > I have applied several patches for my qmail-ldap > > - 1 => qmail-ldap-1.03-20060201.patch > - 2 => Manual SPF Patch > - 3 => qmail-queue-custom-error-ldap.patch > - 4 => qldap-domainalias.patch > - 5 => Manual & Own LastAuth Patch > - 6 => qmail-ldap-bigquota_support.patch > > Now, I looking for a solution in order to local clients ([email protected] > , where somedomain.com is local ) needs to be a authenticated to > send one email to [email protected] (local too) > > I have applied qmail-ldap-1.03-20060201.patch ==> SMTP-AUTH patch. > but this patch enables SMTP-AUTH for remote clients and not locals. > > Any ideas? you might experiment with something along thiese lines, set AUTHIFLOCAL="" in tcpserwer rules to enable the second block is inside smtp_mail() function --- qmail-smtpd.c (wersja 7) +++ qmail-smtpd.c (wersja 8) @@ -293,6 +293,9 @@ const char *greeting421; int spamflag = 0; +//wymagamy autoryzacji jesli obslugujemy domene nadawcy +const char * authiflocal; + stralloc helohost = {0}; char *fakehelo; /* pointer into helohost, or 0 */ @@ -450,6 +453,7 @@ } if (env_get("AUTHREQUIRED")) needauth = 1; authprepend = env_get("AUTHPREPEND"); + authiflocal=env_get("AUTHIFLOCAL"); #ifdef SMTPEXECCHECK execcheck_setup(); @@ -900,6 +904,12 @@ logline2(3,"mail from: ",addr.s); + // if AUTHIFLOCAL env variable is set always require authentication + if(authiflocal && !relayclient && !flagauthok) + if(addrallowed() && (strlen(addr.s)>0)) { + err_nogateway(); + logline(3, "local sender auth needed"); + if (errdisconnect) err_quit(); + return; + } if (needauth && !flagauthok) { out("530 authentication needed\r\n"); logline(3, "auth needed"); -- Michał Grzędzicki