Re: SMTP external authentication is not worjing
Spon Spon via xmail <[email protected]> Tue, 5 Mar 2019 16:29:10 +0000 (UTC)
| Newsgroups | gmane.mail.xmail.general |
|---|---|
| Message-ID | <[email protected]> |
--===============1363740495==
Content-Type: multipart/alternative;
boundary="----=_Part_9394600_984709408.1551803350861"
Content-Length: 17691
------=_Part_9394600_984709408.1551803350861
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
Hi,checkSmtpAuth.sh is for sure created as I print input parameters and the=
y seems fine.=C2=A0 The created RFILE gave 644 permission being owned by ro=
ot.root.=C2=A0 Indeed, if exit code is different than 0 I received authenti=
cation error, so the script works. See below the content of checkSmtpAuth.s=
h :#!/bin/sh
set -x
AUTH=3D$1
USER=3D$2
PASS=3D$3
RFILE=3D$4
c=3D`doveadm auth $USER $PASS`
echo "Perms=3DMRVZ" > $RFILE
exit 0
No matter if I write something in RFILE or not the result is the same.=C2=
=A0 550 Relay Denied.=C2=A0 I looked in the code, and it seems that if noth=
ing is written in RFILE default should be used (MRVZ), which seems not the =
case.
Having the same configuration, nothing else changed, if I use internal auth=
entication(by emptying smtpextauth.tab), everything works fine.
Thank You
From: Bart Mortelmans via xmail <[email protected]>
To: Spon Spon via xmail <[email protected]>=20
Sent: Tuesday, March 5, 2019 5:33 PM
Subject: Re: [xmail] SMTP external authentication is not worjing
=20
I understand that you can be sure that your checkSmtpAuth.sh is indeed bei=
ng called, because you see that the RFILE is created, with the contents you=
expect your script to put in there?=20
In that case my guess is that XMail is having trouble accessing your RFIL=
E. If the exit code wasn't seen as "0", then you should either get "451 Req=
uested action aborted" or "503 Authentication failed".=20
The error "550 Relay denied" most probably is based on the fact that it i=
sn't finding "R" (for relaying) in the RFILE. In theory, it should also del=
ete the RFILE. So the fact that they're still there, also seems to indicate=
a problem with the RFILE.=20
- What would happen if you don't write this RFILE and don't specify the @=
@RFILE parameter in smtpextauth.tab? In theory the default from server.tab =
would be used.
- Anything strange about permissions of the RFILE's that have not been re=
moved? - Could it be that your script has somehow not finished writing the =
file yet by the time XMail tries to read it?=20
=20
=20
Bart=20
=20
=20
Op 5/03/19 om 07:41 schreef Spon Spon via xmail:
=20
=20
Hello,=20
I have a mixed setup with DOVECAT for IMAP access, and XMAIl 1.27 for the=
rest. =C2=A0The relay is cosed until authentication is made In order to ha=
ve a centralized place for authentication I used in XMAIL external authenti=
cation. =C2=A0However seems it is not working as I receive 550 Relay Denied=
when I try to send an email using this XMAIL server.=20
The setup is as following:=20
In=C2=A0smtpextauth.tab I put following line:=20
"LOGIN" "/config/scripts/checkSmtpAuth.sh" "@@AUTH" "@@USER" "@@PASS" "@@=
RFILE"
In server tab I have: "DefaultSmtpPerms" "MRVZ"
=20
In checkSmtpAuth.sh I always exit with 0 for testing. =C2=A0However I rec=
eived 550 Relay denied each time I tried to send an email. =C2=A0If the scr=
ipt exits with 1 then the error is different, (Authentication error).=C2=A0
=20
I tried also populating RFILE with Perms=3DMR but without success. I trie=
d also with Perms=3DMRVZ . No change.=20
Also another issue is the fact that those RFILE files were never get dele=
ted. =C2=A0For each email, that file is created and stays there forever (ne=
ed external action to delete it)=20
Is there any other settings that need to be made or is this a bug ?=20
Using internal authentication (smtpauth.tab or mailuser.tab) emptying smt=
pextauth.tab =C2=A0there is no such error, and everything works as expected=
..=20
Unfortunately there is no debug log in application, so only way to figure=
out is DEBUG, and currently it is installed on an embedded router so no wa=
y to debug. =C2=A0=20
Thanks, Spon=20
=20
_______________________________________________
xmail mailing list
[email protected]
http://xmailserver.org/mailman/listinfo/xmail
=20
_______________________________________________
xmail mailing list
[email protected]
http://xmailserver.org/mailman/listinfo/xmail
=20
------=_Part_9394600_984709408.1551803350861
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
<html><head></head><body><div style=3D"color:#000; background-color:#fff; f=
ont-family:Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font=
-size:16px"><div id=3D"yui_3_16_0_ym19_1_1551799190179_23349"></div><div id=
=3D"yui_3_16_0_ym19_1_1551799190179_23350">Hi,</div><div dir=3D"ltr" id=3D"=
yui_3_16_0_ym19_1_1551799190179_23351">checkSmtpAuth.sh
is for sure created as I print input parameters and they seems fine. =
=20
The created RFILE gave 644 permission being owned by root.root. Indee=
d,
if exit code is different than 0 I received authentication error, so=20
the script works. See below the content of checkSmtpAuth.sh :</div><div dir=
=3D"ltr" id=3D"yui_3_16_0_ym19_1_1551799190179_23352">#!/bin/sh<br id=3D"yu=
i_3_16_0_ym19_1_1551799190179_23353" clear=3D"none">set -x<br id=3D"yui_3_1=
6_0_ym19_1_1551799190179_23354" clear=3D"none"><br id=3D"yui_3_16_0_ym19_1_=
1551799190179_23355" clear=3D"none">AUTH=3D$1<br id=3D"yui_3_16_0_ym19_1_15=
51799190179_23356" clear=3D"none">USER=3D$2<br id=3D"yui_3_16_0_ym19_1_1551=
799190179_23357" clear=3D"none">PASS=3D$3<br id=3D"yui_3_16_0_ym19_1_155179=
9190179_23358" clear=3D"none">RFILE=3D$4<br id=3D"yui_3_16_0_ym19_1_1551799=
190179_23359" clear=3D"none"><br id=3D"yui_3_16_0_ym19_1_1551799190179_2336=
0" clear=3D"none">c=3D`doveadm auth $USER $PASS`<br id=3D"yui_3_16_0_ym19_1=
_1551799190179_23361" clear=3D"none">echo "Perms=3DMRVZ" > $RFILE<br id=
=3D"yui_3_16_0_ym19_1_1551799190179_23362" clear=3D"none"><br id=3D"yui_3_1=
6_0_ym19_1_1551799190179_23363" clear=3D"none">exit 0<br id=3D"yui_3_16_0_y=
m19_1_1551799190179_23364" clear=3D"none"></div><div dir=3D"ltr" id=3D"yui_=
3_16_0_ym19_1_1551799190179_23365"><br id=3D"yui_3_16_0_ym19_1_155179919017=
9_23366" clear=3D"none"></div><div dir=3D"ltr" id=3D"yui_3_16_0_ym19_1_1551=
799190179_23367">No
matter if I write something in RFILE or not the result is the same. =
=20
550 Relay Denied. I looked in the code, and it seems that if nothing =
is
written in RFILE default should be used (MRVZ), which seems not the=20
case.</div><div dir=3D"ltr" id=3D"yui_3_16_0_ym19_1_1551799190179_23368"><b=
r id=3D"yui_3_16_0_ym19_1_1551799190179_23369" clear=3D"none"></div><div di=
r=3D"ltr" id=3D"yui_3_16_0_ym19_1_1551799190179_23370">Having
the same configuration, nothing else changed, if I use internal=20
authentication(by emptying smtpextauth.tab), everything works fine.</div><d=
iv dir=3D"ltr" id=3D"yui_3_16_0_ym19_1_1551799190179_23371"><br id=3D"yui_3=
_16_0_ym19_1_1551799190179_23372" clear=3D"none"></div><div dir=3D"ltr" id=
=3D"yui_3_16_0_ym19_1_1551799190179_23373">Thank You<br id=3D"yui_3_16_0_ym=
19_1_1551799190179_23374" clear=3D"none"></div><div dir=3D"ltr" id=3D"yui_3=
_16_0_ym19_1_1551799190179_23375"><div dir=3D"ltr" id=3D"yui_3_16_0_ym19_1_=
1551799190179_23377"><br id=3D"yui_3_16_0_ym19_1_1551799190179_23376" clear=
=3D"none"></div></div><div id=3D"yui_3_16_0_ym19_1_1551799190179_22058"><sp=
an></span></div><div class=3D"qtdSeparateBR" id=3D"yui_3_16_0_ym19_1_155179=
9190179_22059"><br><br></div><div class=3D"yahoo_quoted" id=3D"yui_3_16_0_y=
m19_1_1551799190179_23309" style=3D"display: block;"> <div style=3D"font-f=
amily: Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; font-si=
ze: 16px;" id=3D"yui_3_16_0_ym19_1_1551799190179_23308"> <div style=3D"font=
-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sa=
ns-serif; font-size: 16px;" id=3D"yui_3_16_0_ym19_1_1551799190179_23307"> <=
div dir=3D"ltr" id=3D"yui_3_16_0_ym19_1_1551799190179_23306"> <font id=3D"y=
ui_3_16_0_ym19_1_1551799190179_23311" size=3D"2" face=3D"Arial"> <hr id=3D"=
yui_3_16_0_ym19_1_1551799190179_23310" size=3D"1"> <b><span style=3D"font-w=
eight:bold;">From:</span></b> Bart Mortelmans via xmail <xmail@xmailserv=
er.org><br> <b><span style=3D"font-weight: bold;">To:</span></b> Spon Sp=
on via xmail <[email protected]> <br> <b><span style=3D"font-weig=
ht: bold;">Sent:</span></b> Tuesday, March 5, 2019 5:33 PM<br> <b><span sty=
le=3D"font-weight: bold;">Subject:</span></b> Re: [xmail] SMTP external aut=
hentication is not worjing<br> </font> </div> <div class=3D"y_msg_container=
"><br><div id=3D"yiv5236965045"><div>
<div class=3D"yiv5236965045moz-cite-prefix">I understand that you can b=
e sure that
your checkSmtpAuth.sh is indeed being called, because you see that
the RFILE is created, with the contents you expect your script to
put in there?</div>
<div class=3D"yiv5236965045moz-cite-prefix"><br clear=3D"none">
</div>
<div class=3D"yiv5236965045moz-cite-prefix">In that case my guess is th=
at XMail is
having trouble accessing your RFILE. If the exit code wasn't seen
as "0", then you should either get "451 Requested action aborted"
or "503 Authentication failed". <br clear=3D"none">
</div>
<div class=3D"yiv5236965045moz-cite-prefix">The error "550 Relay denied=
" most
probably is based on the fact that it isn't finding "R" (for
relaying) in the RFILE.</div>
<div class=3D"yiv5236965045moz-cite-prefix">In theory, it should also d=
elete the
RFILE. So the fact that they're still there, also seems to
indicate a problem with the RFILE.</div>
<div class=3D"yiv5236965045moz-cite-prefix"><br clear=3D"none">
</div>
<div class=3D"yiv5236965045moz-cite-prefix">- What would happen if you =
don't write
this RFILE and don't specify the @@RFILE parameter in
smtpextauth.tab? In theory the default from server.tab would be
used.<br clear=3D"none">
</div>
<div class=3D"yiv5236965045moz-cite-prefix">- Anything strange about pe=
rmissions of
the RFILE's that have not been removed?</div>
<div class=3D"yiv5236965045moz-cite-prefix">- Could it be that your scr=
ipt has
somehow not finished writing the file yet by the time XMail tries
to read it?</div>
<div class=3D"yiv5236965045moz-cite-prefix"><br clear=3D"none">
</div>
<div class=3D"yiv5236965045moz-cite-prefix"><br clear=3D"none">
</div>
<div class=3D"yiv5236965045moz-cite-prefix"><br clear=3D"none">
</div>
<div class=3D"yiv5236965045moz-cite-prefix">Bart</div>
<div class=3D"yiv5236965045moz-cite-prefix"><br clear=3D"none">
</div>
<div class=3D"yiv5236965045moz-cite-prefix"><br clear=3D"none">
</div>
<div class=3D"yiv5236965045moz-cite-prefix"><br clear=3D"none">
</div>
<div class=3D"yiv5236965045moz-cite-prefix">Op 5/03/19 om 07:41 schreef=
Spon Spon
via xmail:<br clear=3D"none">
</div>
<blockquote type=3D"cite">
</blockquote></div><div><div class=3D"yiv5236965045yqt9417665959" id=
=3D"yiv5236965045yqt59742"><div style=3D"color:#000;background-color:#fff;f=
ont-family:Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font=
-size:16px;">
<div id=3D"yiv5236965045yui_3_16_0_ym19_1_1551766825845_5605">Hello=
,</div>
<div id=3D"yiv5236965045yui_3_16_0_ym19_1_1551766825845_5606"><br c=
lear=3D"none">
</div>
<div dir=3D"ltr" id=3D"yiv5236965045yui_3_16_0_ym19_1_1551766825845=
_5607">I have
a mixed setup with DOVECAT for IMAP access, and XMAIl 1.27 for
the rest. The relay is cosed until authentication is made I=
n
order to have a centralized place for authentication I used in
XMAIL external authentication. However seems it is not
working as I receive 550 Relay Denied when I try to send an
email using this XMAIL server.</div>
<div dir=3D"ltr" id=3D"yiv5236965045yui_3_16_0_ym19_1_1551766825845=
_5608"><br clear=3D"none">
</div>
<div dir=3D"ltr" id=3D"yiv5236965045yui_3_16_0_ym19_1_1551766825845=
_5609">The
setup is as following:</div>
<div dir=3D"ltr" id=3D"yiv5236965045yui_3_16_0_ym19_1_1551766825845=
_5610"><br clear=3D"none">
</div>
<div dir=3D"ltr" id=3D"yiv5236965045yui_3_16_0_ym19_1_1551766825845=
_5611">In smtpextauth.tab
I put following line:</div>
<div dir=3D"ltr" id=3D"yiv5236965045yui_3_16_0_ym19_1_1551766825845=
_5612"><br clear=3D"none">
</div>
<div dir=3D"ltr" id=3D"yiv5236965045yui_3_16_0_ym19_1_1551766825845=
_5613">"LOGIN"<span id=3D"yiv5236965045yui_3_16_0_ym19_1_1551766825845_5588=
" style=3D"white-space:pre-wrap;">=09</span>"/config/scripts/checkSmtpAuth.=
sh"<span id=3D"yiv5236965045yui_3_16_0_ym19_1_1551766825845_5589" style=3D"=
white-space:pre-wrap;">=09</span>"@@AUTH"<span id=3D"yiv5236965045yui_3_16_=
0_ym19_1_1551766825845_5590" style=3D"white-space:pre-wrap;">=09</span>"@@U=
SER"<span id=3D"yiv5236965045yui_3_16_0_ym19_1_1551766825845_5591" style=3D=
"white-space:pre-wrap;">=09</span>"@@PASS"<span id=3D"yiv5236965045yui_3_16=
_0_ym19_1_1551766825845_5592" style=3D"white-space:pre-wrap;">=09</span>"@@=
RFILE"<br clear=3D"none">
</div>
<div dir=3D"ltr" id=3D"yiv5236965045yui_3_16_0_ym19_1_1551766825845=
_5613">In
server tab I have:</div>
<div dir=3D"ltr" id=3D"yiv5236965045yui_3_16_0_ym19_1_1551766825845=
_5613">"DefaultSmtpPerms"<span id=3D"yiv5236965045yui_3_16_0_ym19_1_1551766=
825845_5921" style=3D"white-space:pre-wrap;">=09</span>"MRVZ"<br clear=3D"n=
one">
</div>
<div dir=3D"ltr" id=3D"yiv5236965045yui_3_16_0_ym19_1_1551766825845=
_5615"><br clear=3D"none">
</div>
<div dir=3D"ltr" id=3D"yiv5236965045yui_3_16_0_ym19_1_1551766825845=
_5616">In
checkSmtpAuth.sh I always exit with 0 for testing. However =
I
received 550 Relay denied each time I tried to send an email.
If the script exits with 1 then the error is different,
(Authentication error). <br clear=3D"none">
</div>
<div dir=3D"ltr" id=3D"yiv5236965045yui_3_16_0_ym19_1_1551766825845=
_5616"><br clear=3D"none">
</div>
<div dir=3D"ltr" id=3D"yiv5236965045yui_3_16_0_ym19_1_1551766825845=
_5616">I tried
also populating RFILE with Perms=3DMR but without success. I
tried also with Perms=3DMRVZ . No change.</div>
<div dir=3D"ltr" id=3D"yiv5236965045yui_3_16_0_ym19_1_1551766825845=
_5616"><br clear=3D"none">
</div>
<div dir=3D"ltr" id=3D"yiv5236965045yui_3_16_0_ym19_1_1551766825845=
_5616">Also
another issue is the fact that those RFILE files were never
get deleted. For each email, that file is created and stays
there forever (need external action to delete it)</div>
<div dir=3D"ltr" id=3D"yiv5236965045yui_3_16_0_ym19_1_1551766825845=
_5616"><br clear=3D"none">
</div>
<div dir=3D"ltr" id=3D"yiv5236965045yui_3_16_0_ym19_1_1551766825845=
_5616">Is
there any other settings that need to be made or is this a bug
?</div>
<div dir=3D"ltr" id=3D"yiv5236965045yui_3_16_0_ym19_1_1551766825845=
_5616"><br clear=3D"none">
</div>
<div dir=3D"ltr" id=3D"yiv5236965045yui_3_16_0_ym19_1_1551766825845=
_5616">Using
internal authentication (smtpauth.tab or mailuser.tab)
emptying smtpextauth.tab there is no such error, and
everything works as expected.</div>
<div dir=3D"ltr" id=3D"yiv5236965045yui_3_16_0_ym19_1_1551766825845=
_5616"><br clear=3D"none">
</div>
<div dir=3D"ltr" id=3D"yiv5236965045yui_3_16_0_ym19_1_1551766825845=
_5616">Unfortunately
there is no debug log in application, so only way to figure
out is DEBUG, and currently it is installed on an embedded
router so no way to debug. </div>
<div dir=3D"ltr" id=3D"yiv5236965045yui_3_16_0_ym19_1_1551766825845=
_5616"><br clear=3D"none">
</div>
<div dir=3D"ltr" id=3D"yiv5236965045yui_3_16_0_ym19_1_1551766825845=
_5616">Thanks,</div>
<div dir=3D"ltr" id=3D"yiv5236965045yui_3_16_0_ym19_1_1551766825845=
_5616">Spon</div>
<div dir=3D"ltr" id=3D"yiv5236965045yui_3_16_0_ym19_1_1551766825845=
_5616"><br clear=3D"none">
</div>
</div></div>
<br clear=3D"none">
<fieldset class=3D"yiv5236965045mimeAttachmentHeader"></fieldset>
<pre class=3D"yiv5236965045moz-quote-pre">___________________________=
____________________
xmail mailing list
<a rel=3D"nofollow" shape=3D"rect" class=3D"yiv5236965045moz-txt-link-abbre=
viated" ymailto=3D"mailto:[email protected]" target=3D"_blank" href=3D"=
mailto:[email protected]">[email protected]</a>
<a rel=3D"nofollow" shape=3D"rect" class=3D"yiv5236965045moz-txt-link-freet=
ext" target=3D"_blank" href=3D"http://xmailserver.org/mailman/listinfo/xmai=
l">http://xmailserver.org/mailman/listinfo/xmail</a>
</pre>
=20
<div><br clear=3D"none">
</div>
</div></div><div class=3D"yqt9417665959" id=3D"yqt70226">________________=
_______________________________<br clear=3D"none">xmail mailing list<br cle=
ar=3D"none"><a shape=3D"rect" ymailto=3D"mailto:[email protected]" href=
=3D"mailto:[email protected]">[email protected]</a><br clear=3D"non=
e"><a shape=3D"rect" href=3D"http://xmailserver.org/mailman/listinfo/xmail"=
target=3D"_blank">http://xmailserver.org/mailman/listinfo/xmail</a><br cle=
ar=3D"none"></div><br><br></div> </div> </div> </div></div></body></html>
------=_Part_9394600_984709408.1551803350861--
--===============1363740495==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
_______________________________________________
xmail mailing list
[email protected]
http://xmailserver.org/mailman/listinfo/xmail
--===============1363740495==--