Re: [xmail] SMTP external authentication is not worjing
Dear, I have version 1.26 of XMail. I have found that the configuration file smtpextauth.tab is not interpreted correctly. The parameters have a shift. It is necessary to add a "Dummy" field, like this: "LOGIN" "*Dummy*" "/etc/dovecot/user_auth.sh" "@@USER""@@PASS" "@@RFILE" Regards! Cesar Meloni El mar., 5 mar. 2019 a las 4:43, Spon Spon via xmail () escribió: > Hello, > > 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 In 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. > > The setup is as following: > > In smtpextauth.tab I put following line: > > "LOGIN" "/config/scripts/checkSmtpAuth.sh" "@@AUTH" "@@USER" "@@PASS" > "@@RFILE" > In server tab I have: > "DefaultSmtpPerms" "MRVZ" > > 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). > > I tried also populating RFILE with Perms=MR but without success. I tried > also with Perms=MRVZ . No change. > > 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) > > Is there any other settings that need to be made or is this a bug ? > > Using internal authentication (smtpauth.tab or mailuser.tab) emptying > smtpextauth.tab there is no such error, and everything works as expected.. > > 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. > > Thanks, > Spon > > ___ > xmail mailing list > xmail@xmailserver.org > http://xmailserver.org/mailman/listinfo/xmail > ___ xmail mailing list xmail@xmailserver.org http://xmailserver.org/mailman/listinfo/xmail
Re: [xmail] SMTP external authentication is not worjing
Hi,checkSmtpAuth.sh is for sure created as I print input parameters and they seems fine. The created RFILE gave 644 permission being owned by root.root. Indeed, if exit code is different than 0 I received authentication error, so the script works. See below the content of checkSmtpAuth.sh :#!/bin/sh set -x AUTH=$1 USER=$2 PASS=$3 RFILE=$4 c=`doveadm auth $USER $PASS` echo "Perms=MRVZ" > $RFILE exit 0 No matter if I write something in RFILE or not the result is the same. 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 case. Having the same configuration, nothing else changed, if I use internal authentication(by emptying smtpextauth.tab), everything works fine. Thank You From: Bart Mortelmans via xmail To: Spon Spon via xmail Sent: Tuesday, March 5, 2019 5:33 PM Subject: Re: [xmail] SMTP external authentication is not worjing I understand that you can be 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? In that case my guess is that 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". The error "550 Relay denied" most probably is based on the fact that it isn't finding "R" (for relaying) in the RFILE. In theory, it should also delete the RFILE. So the fact that they're still there, also seems to indicate a problem with the RFILE. - 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 removed? - Could it be that your script has somehow not finished writing the file yet by the time XMail tries to read it? Bart Op 5/03/19 om 07:41 schreef Spon Spon via xmail: Hello, 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 In 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. The setup is as following: In smtpextauth.tab I put following line: "LOGIN" "/config/scripts/checkSmtpAuth.sh" "@@AUTH" "@@USER" "@@PASS" "@@RFILE" In server tab I have: "DefaultSmtpPerms" "MRVZ" 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). I tried also populating RFILE with Perms=MR but without success. I tried also with Perms=MRVZ . No change. 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) Is there any other settings that need to be made or is this a bug ? Using internal authentication (smtpauth.tab or mailuser.tab) emptying smtpextauth.tab there is no such error, and everything works as expected.. 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. Thanks, Spon ___ xmail mailing list xmail@xmailserver.org http://xmailserver.org/mailman/listinfo/xmail ___ xmail mailing list xmail@xmailserver.org http://xmailserver.org/mailman/listinfo/xmail ___ xmail mailing list xmail@xmailserver.org http://xmailserver.org/mailman/listinfo/xmail
Re: [xmail] SMTP external authentication is not worjing
Hi, smtp.ipmap.tab contains "0.0.0.0" "0.0.0.0" "ALLOW" 1smtprelay.tab contains only local addresses, therefore not the IP from where I try (internet). But htis hsould be fine, because this is why I use authentication. To summarize: I want to connect to the xmail server from internet, and send an email to a different domain (internet). I have following scenarios (all other settings remaining unchanged)1. Leaving smtpextauth empty, if I send a mail using a user/pass defined in mailusers.tab mail is properly send 2. Leaving smtpextauth empty, if I send a mail using a user/pass defined in smtpauth.tab mail is properly send 3. If I put an entry in smtpextauth with a script that always return 1, no matter what user/pass I'll use I received AUTH=EFAIL:TYPE=LOGIN in the log, the user not being authenticated, which is as expected, mail not being sent.4. If I put an entry in smtpextauth with a script that always return 0 , no matter what user/pass I'll use I received RCPT=ERELAY in the log, the user BEING authenticated, which is fine, but error not being sent because of RELAY DENIED. In this step 4 no matter if I put something in RFILE (Perms=MRZV) or nothing, the result is the same. The problem seems to be related to external authentication, because the internal one works fine. Thank You From: Edinilson - ATINET To: Spon Spon Cc: "xmail@xmailserver.org" Sent: Tuesday, March 5, 2019 4:51 PM Subject: Re: [xmail] SMTP external authentication is not worjing Is your ip range allowed in smtprelay.tab? And about smtp.ipmap.tab ? Do you have installed a new Xmail Server OR it stops after some time of use? Edinilson Original Message From: Spon Spon via xmail To: "xmail@xmailserver.org" Sent: Ter, Mar 5, 2019, 4:44 AM Subject: [xmail] SMTP external authentication is not worjing Hello, 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 In 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. The setup is as following: In smtpextauth.tab I put following line: "LOGIN" "/config/scripts/checkSmtpAuth.sh" "@@AUTH" "@@USER" "@@PASS" "@@RFILE" In server tab I have:"DefaultSmtpPerms" "MRVZ" 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). I tried also populating RFILE with Perms=MR but without success. I tried also with Perms=MRVZ . No change. 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) Is there any other settings that need to be made or is this a bug ? Using internal authentication (smtpauth.tab or mailuser.tab) emptying smtpextauth.tab there is no such error, and everything works as expected. 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. Thanks,Spon ___ xmail mailing list xmail@xmailserver.org http://xmailserver.org/mailman/listinfo/xmail
Re: [xmail] SMTP external authentication is not worjing
I understand that you can be 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? In that case my guess is that 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". The error "550 Relay denied" most probably is based on the fact that it isn't finding "R" (for relaying) in the RFILE. In theory, it should also delete the RFILE. So the fact that they're still there, also seems to indicate a problem with the RFILE. - 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 removed? - Could it be that your script has somehow not finished writing the file yet by the time XMail tries to read it? Bart Op 5/03/19 om 07:41 schreef Spon Spon via xmail: Hello, 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 In 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. The setup is as following: In smtpextauth.tab I put following line: "LOGIN""/config/scripts/checkSmtpAuth.sh""@@AUTH""@@USER""@@PASS""@@RFILE" In server tab I have: "DefaultSmtpPerms""MRVZ" 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). I tried also populating RFILE with Perms=MR but without success. I tried also with Perms=MRVZ . No change. 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) Is there any other settings that need to be made or is this a bug ? Using internal authentication (smtpauth.tab or mailuser.tab) emptying smtpextauth.tab there is no such error, and everything works as expected. 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. Thanks, Spon ___ xmail mailing list xmail@xmailserver.org http://xmailserver.org/mailman/listinfo/xmail smime.p7s Description: S/MIME-cryptografische ondertekening ___ xmail mailing list xmail@xmailserver.org http://xmailserver.org/mailman/listinfo/xmail
Re: [xmail] SMTP external authentication is not worjing
Is your ip range allowed in smtprelay.tab? And about smtp.ipmap.tab ? Do you have installed a new Xmail Server OR it stops after some time of use? Edinilson Original Message From: Spon Spon via xmail To: "xmail@xmailserver.org" Sent: Ter, Mar 5, 2019, 4:44 AM Subject: [xmail] SMTP external authentication is not worjing Hello, 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 In 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. The setup is as following: In smtpextauth.tab I put following line: "LOGIN" "/config/scripts/checkSmtpAuth.sh" "@@AUTH" "@@USER" "@@PASS" "@@RFILE" In server tab I have:"DefaultSmtpPerms" "MRVZ" 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). I tried also populating RFILE with Perms=MR but without success. I tried also with Perms=MRVZ . No change. 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) Is there any other settings that need to be made or is this a bug ? Using internal authentication (smtpauth.tab or mailuser.tab) emptying smtpextauth.tab there is no such error, and everything works as expected. 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. Thanks,Spon ___ xmail mailing list xmail@xmailserver.org http://xmailserver.org/mailman/listinfo/xmail