Hi!
I have followed the recommended steps in my AC66U:
1.- Updated my AC66U from 48E2 -> 48D3
2.- Installed wicens.sh script downloaded from
@Maverickcdn 's Github (updated according to the latest script from
@john9527 )
It works almost correctly already !! Congratulations!
Just a small problem (at least for me, hehe), the
sendmail of this latest release does not work well, I have tried it with SMTP Gmail (587) and also with SMTP Outlook (587).
Wicens log:
My shipping method (Gmail) used in other scripts (It has always worked well with 48E2):
Example:
Bash:
#!/bin/sh
FROM="xxx@gmail.com"
AUTH="xxx@gmail.com"
PASS="xxxxxxx"
FROMNAME="Router RT-AC66U"
TO="xxxyyy@gmail.com"
echo "Subject: DDNS: Nueva IP WAN" >/tmp/mail.txt
echo "From: \"$FROMNAME\"<$FROM>" >>/tmp/mail.txt
echo "Date: `date -R`" >>/tmp/mail.txt
echo "" >>/tmp/mail.txt
echo "Servidor NO-IP actualizado correctamente con IP: `nvram get wan0_ipaddr`" >>/tmp/mail.txt
echo "Fecha Sistema: `date -R`" >>/tmp/mail.txt
echo "" >>/tmp/mail.txt
echo "----- " >>/tmp/mail.txt
echo "Enviado desde ASUS RT-AC66U" >>/tmp/mail.txt
cat /tmp/mail.txt | /usr/sbin/sendmail -H"exec openssl s_client -quiet \
-CAfile /jffs/configs/Equifax_Secure_Certificate_Authority.pem \
-connect smtp.gmail.com:587 -tls1 -starttls smtp" \
-f"$FROM" -au"$AUTH" -ap"$PASS" $TO
rm /tmp/mail.txt
Result:
Log with verbose option (sendmail -v):
Code:
admin@RT-AC66U-2940:/jffs/scripts# ./tmail.sh
sendmail: send:'NOOP'
depth=2 OU = GlobalSign Root CA - R2, O = GlobalSign, CN = GlobalSign
verify return:1
depth=1 C = US, O = Google Trust Services, CN = GTS CA 1O1
verify return:1
depth=0 C = US, ST = California, L = Mountain View, O = Google LLC, CN = smtp.gmail.com
verify return:1
250 SMTPUTF8
sendmail: recv:'250 2.0.0 OK d204sm3314037wmc.17 - gsmtp'
sendmail: send:'EHLO RT-AC66U-2940'
sendmail: recv:'250-smtp.gmail.com at your service, [2a0c:5a80:16ff:ffff::567f:fc29]'
sendmail: recv:'250-SIZE 35882577'
sendmail: recv:'250-8BITMIME'
sendmail: recv:'250-AUTH LOGIN PLAIN XOAUTH2 PLAIN-CLIENTTOKEN OAUTHBEARER XOAUTH'
sendmail: recv:'250-ENHANCEDSTATUSCODES'
sendmail: recv:'250-PIPELINING'
sendmail: recv:'250-CHUNKING'
sendmail: recv:'250 SMTPUTF8'
sendmail: send:'AUTH LOGIN'
sendmail: recv:'334 VXNlcm5hbWU6'
sendmail: send:''
sendmail: recv:'334 UGFzc3dvcmQ6'
sendmail: send:''
sendmail: recv:'534-5.7.14 <https://accounts.google.com/signin/continue?sarp=1&scc=1&plt=AKgnsbu'
sendmail: recv:'534-5.7.14 XlATGtsDndqNyvL7huEOu4RQuw2SQ3Qk3OdN19Vsa-pLUO8w8Q'
sendmail: recv:'534-5.7.14 6hvuNtvxrl2AZ-9vsciomSDRzkouxdw_KJokbZZQZhTtlL8D3OCLNFpmDqAd7Nbu>'
sendmail: recv:'534-5.7.14 Please log in via your web browser and then try again.'
sendmail: recv:'534-5.7.14 Learn more at'
sendmail: recv:'534 5.7.14 https://support.google.com/mail/answer/78754 d204sm3314037wmc.17 - gsmtp'
sendmail: failed
admin@RT-AC66U-2940:/jffs/scripts#
Certificate used:
/jffs/configs/Equifax_Secure_Certificate_Authority.pem
Code:
-----BEGIN CERTIFICATE-----
MIIDIDCCAomgAwIBAgIENd70zzANBgkqhkiG9w0BAQUFADBOMQswCQYDVQQGEwJV
UzEQMA4GA1UEChMHRXF1aWZheDEtMCsGA1UECxMkRXF1aWZheCBTZWN1cmUgQ2Vy
dGlmaWNhdGUgQXV0aG9yaXR5MB4XDTk4MDgyMjE2NDE1MVoXDTE4MDgyMjE2NDE1
MVowTjELMAkGA1UEBhMCVVMxEDAOBgNVBAoTB0VxdWlmYXgxLTArBgNVBAsTJEVx
dWlmYXggU2VjdXJlIENlcnRpZmljYXRlIEF1dGhvcml0eTCBnzANBgkqhkiG9w0B
AQEFAAOBjQAwgYkCgYEAwV2xWGcIYu6gmi0fCG2RFGiYCh7+2gRvE4RiIcPRfM6f
BeC4AfBONOziipUEZKzxa1NfBbPLZ4C/QgKO/t0BCezhABRP/PvwDN1Dulsr4R+A
cJkVV5MW8Q+XarfCaCMczE1ZMKxRHjuvK9buY0V7xdlfUNLjUA86iOe/FP3gx7kC
AwEAAaOCAQkwggEFMHAGA1UdHwRpMGcwZaBjoGGkXzBdMQswCQYDVQQGEwJVUzEQ
MA4GA1UEChMHRXF1aWZheDEtMCsGA1UECxMkRXF1aWZheCBTZWN1cmUgQ2VydGlm
aWNhdGUgQXV0aG9yaXR5MQ0wCwYDVQQDEwRDUkwxMBoGA1UdEAQTMBGBDzIwMTgw
ODIyMTY0MTUxWjALBgNVHQ8EBAMCAQYwHwYDVR0jBBgwFoAUSOZo+SvSspXXR9gj
IBBPM5iQn9QwHQYDVR0OBBYEFEjmaPkr0rKV10fYIyAQTzOYkJ/UMAwGA1UdEwQF
MAMBAf8wGgYJKoZIhvZ9B0EABA0wCxsFVjMuMGMDAgbAMA0GCSqGSIb3DQEBBQUA
A4GBAFjOKer89961zgK5F7WF0bnj4JXMJTENAKaSbn+2kmOeUJXRmm/kEd5jhW6Y
7qj/WsjTVbJmcVfewCHrPSqnI0kBBIZCe/zuf6IWUrVnZ9NA2zsmWLIodz2uFHdh
1voqZiegDfqnc1zqcPGUIWVEX/r87yloqaKHee9570+sB3c4
-----END CERTIFICATE-----
With another provider (Outlook):
Bash:
#!/bin/sh
FROM="xxx@outlook.com"
AUTH="xxx@outlook.com"
PASS="xxxxxx"
FROMNAME="Router RT-AC66U"
TO="xxxyyy@gmail.com"
echo "Subject: DDNS: Nueva IP WAN" >/tmp/mail.txt
echo "From: \"$FROMNAME\"<$FROM>" >>/tmp/mail.txt
echo "Date: `date -R`" >>/tmp/mail.txt
echo "" >>/tmp/mail.txt
echo "Servidor NO-IP actualizado correctamente con IP: `nvram get wan0_ipaddr`" >>/tmp/mail.txt
echo "Fecha Sistema: `date -R`" >>/tmp/mail.txt
echo "" >>/tmp/mail.txt
echo "----- " >>/tmp/mail.txt
echo "Enviado desde ASUS RT-AC66U" >>/tmp/mail.txt
cat /tmp/mail.txt | /usr/sbin/sendmail -H"exec openssl s_client -quiet \
-CAfile /jffs/configs/Equifax_Secure_Certificate_Authority.pem \
-connect smtp-mail.outlook.com:587 -tls1 -starttls smtp" \
-f"$FROM" -au"$AUTH" -ap"$PASS" $TO
rm /tmp/mail.txt
Result:
I'm sure the problem is with FW 48D3, if you have modified sendmail and some part of the firmware that does not allow the use of the certificate (with 48E2 the scripts sent emails correctly). I have also tried from my NAS sending email from the same GMAIL account and it works fine, but nothing comes out of the router.
EDIT: It's funny, when I reboot (2 times) it, at startup, the script, for example,
wan-start if it sends the email correctly but then sendmail no longer works.
EDIT2: Everything solved, it was a problem with my Gmail account (from). I have created a new account and now everything works fine.
Many, many, thank you for your great work!
EDIT3: Thanks also to
@Maverickcdn for his great script!
Best regards.