Davide
   I really appreciate your response, you are doing a great job.
   It would be nice also change the XMail manual. Especially in the External
Authentication section, the phrase "for now only POP3" and indicate a
reference to the smtpextauth.tab for SMTP authentication.

   The "end of line" change in the mail files has greatly facilitated the
creation of filters and their treatment, especially those who work with
POSIX platforms. It also has improved integration with other products (such
as IMAPServers) that share the Maildir.

   Thanks again!

   Cesar L. Meloni


2009/9/28 Davide Libenzi <davi...@xmailserver.org>

> On Mon, 28 Sep 2009, Cesar Meloni wrote:
>
> > Hello all!
> >
> >    I have an XMail server v1.26 runing on Linux (with CourierIMAP for
> IMAP clients, really work great)...
> >    CourierIMAP authenticated with a script through AuthProg (pipe).
> >    XMail POP3 clients authenticated withan external bash script that
> works correctly.
> >    The same bash script I use for SMTP authentication but has not been
> successful, my configuration is:
> >
> >   For POP3 userauth/pop3/mydomain..tab:
> >
> "userauth"<TAB>"/var/MailRoot/bin/xmailldapauth.sh"<TAB>"@@USER"<TAB>"@@PASSWD"<TAB>"serverip"<TAB>"domainame"
> >
> >   For SMTP smtpextauth.tab (FAIL)
> >
> "PLAIN"<TAB>"/var/MailRoot/bin/xmailldapauth.sh"<TAB>"@@USER"<TAB>"@@PASS"<TAB>"serverip"<TAB>"domainame"
> >
> >   XMail debug mode displays the following message:
> >   "SMTP client connection from [1.2.3.4]
> >     execv error: cmd='username'"
> >
> >   XMail try to run the @@USER macro, just by intuition, if I put the next
> field in the configuration file, it
> > works correctly:
> >
>  
> "PLAIN"<TAB>"DummyField"<TAB>"/var/MailRoot/bin/xmailldapauth.sh"<TAB>"@@USER"<TAB>"@@PASS"<TAB>"serverip"<TAB>"
> > domainame"
> >
> >   What is happening?
>
> You hit a bug ;)
> I fixed it in 1.27, but you can easily fix it in 1.26 with the following
> patch.
>
>
>
> - Davide
>
>
> diff --git a/SMTPSvr.cpp b/SMTPSvr.cpp
> index 13c7177..5614ed5 100644
> --- a/SMTPSvr.cpp
> +++ b/SMTPSvr.cpp
> @@ -2442,7 +2442,7 @@ static int SMTPExternalAuthenticate(BSOCK_HANDLE
> hBSock, SMTPSession &SMTPS,
>        /* Call external program to compute the response */
>        int iExitCode = -1;
>
> -       if (SysExec(ppszAuthTokens[2], &ppszAuthTokens[2],
> SVR_SMTP_EXTAUTH_TIMEOUT,
> +       if (SysExec(ppszAuthTokens[1], &ppszAuthTokens[1],
> SVR_SMTP_EXTAUTH_TIMEOUT,
>                    SYS_PRIORITY_NORMAL, &iExitCode) < 0) {
>                ErrorPush();
>                SysRemove(szRespFile);
>
> _______________________________________________
> xmail mailing list
> xmail@xmailserver.org
> http://xmailserver.org/mailman/listinfo/xmail
>
>
_______________________________________________
xmail mailing list
xmail@xmailserver.org
http://xmailserver.org/mailman/listinfo/xmail

Reply via email to