DMASOFTLAB Radius Manager 4.0.4 have interesting feature of email notifications for various events like account expiry warning, account renewal notification, send custom email to all users, password recovery via email verification code and many more. By default RM uses authentication less smtp server of your ISP, but in most cases Email sent from the RM box arrives in JUNK/SPAM folder in users email box, and sometimes bounces back due to black listed IP’s . This happens very frequent in my country as we widely use national telecom company internet service called PTCL, whose ip’s usually get blocked by many email services. Therefore I created this method by installing SENDMAIL in RM box, and uses my GMAIL account as SENDMAIL SMTP RELAY. This way RM sends mail via localhost, which uses valid GMAIL account to send email and email arrives in users INBOX directly 🙂
First we need to configure sendmail with gmail smtp relay. Use the below link to install.
After you have verified your smtp server is working fine by sending test email to your Hotmail/gmail/yahoo mail account.
You need to edit the following files.
/etc/radiusmanager.cfg
/var/www/radiusmanager/config/system_cfg.php
Radius Manager 4.0.4 Email Configuration SAMPLES:
/etc/radiusmanager.cfg
smtp_relay localhost ; smtp relay mail_from GMAILID@gmail.com ; email sender address mail_reply GMAILID@gmail.com ; email reply adddress mail_localdomain 127.0.0.1 ; email local domain
/var/www/radiusmanager/config/system_cfg.php
define("smtp_relay", "localhost"); // SMTP relay define("mail_from", "GMAILID@gmail.com"); // warning email sender define("mail_reply", "GMAILID@gmail.com"); // warning email return path define("mail_preview", "GMAILID@gmail.com"); // preview user of mass mail define("mail_newuser", "GMAILID@gmail.com"); // self registered new user notification define("mail_localdomain", "127.0.0.1"); // default domain name
.
Now Open RM ACP (Administrator Control Panel) ,
Goto SYSTEM > SYSTEM SETTINGS
& check the following settings.
As showed in the image below . . .
Now Administrator & user will receive various Email Notifications.
As showed in the images below . . .
.
Account Expiry before 5 Days (days are configurable via admin panel / home ,settings)
.
.
Welcome Message for newly registered users
.
Recover Password by Email
.
.
Account Renewed Notification
.
Note: Please check JUNK email folder, because sometimes email gets in JUNK folder if your ISP ips are listed in any dns black list as spam. Mark it safe so future mails comes into INBOX directly.
To edit various Texts appeared in the notifications, you can edit following files.
/var/www/radiusmanager/lang/English/
mailaccrenewfail_tpl.txt
mailnewpsw_tpl.txt
mailwarnexp_tpl.txt
reg_terms.txt
mailforgotpsw_tpl.txt
mailselfreg_tpl.txt
mailwarntraff_tpl.txt
strings.txt
mailaccrenewed_tpl.txt
mailiasreg_tpl.txt
mailsrvchg_tpl.txt
mailwelcomeuser_tpl.txt
texts.txt
/var/www/radiusmanager/
userlogin_tpl.htm
–
Radius Manager 4.1.x Email Configuration SAMPLES:
/etc/radiusmanager.cfg
mail_localdomain 127.0.0.1 ; email local domain
/var/www/radiusmanager/config/system_cfg.php
// SMTP definitions define('smtp_relay', 'localhost'); // SMTP relay define('smtp_port', 25); // SMTP port define('smtp_auth', FALSE); // SMTP authentication define('smtp_user', 'YOUR_GMAIL_ID@gmail.com'); // SMTP user name define('smtp_psw', 'YOUR_GMAIL_PASSWORD'); // SMTP password define('mail_from', 'YOUR_GMAIL_ID@gmail.com'); // sender address define('mail_fromname', 'SYED JAHANZAIB Support'); // sender name define('mail_newuser', 'YOUR_GMAIL_ID@gmail.com'); // self registered new user notification define('mail_localdomain', '127.0.0.1'); // default domain name
Regard’s
Syed Jahanzaib
Thanks
LikeLike
Comment by jackobarca — November 21, 2012 @ 1:31 AM
where can find the config file for sms alerts
LikeLike
Comment by tamilmaran — November 21, 2012 @ 9:17 AM
as per manual.
SMS gateway
The SMS gateway is configured in file api.php. It implements the HTTP to SMS gateway function
s. The api.php fiie is not encoded with ionCube, so You can add your own SMS gateway using PHP
programming language.
You can call your own SMS gateway (HTTP gateway with CURL or a shell script to use your
own mobile phone) to send the notifications or verification code for the user.
LikeLike
Comment by Syed Jahanzaib / Pinochio~:) — November 21, 2012 @ 4:26 PM
Thanks, but in maillog radius send “…stat=Deferred: 451-The server has reached its limit for processing requests from your host.
“
LikeLike
Comment by Carlos García — December 2, 2012 @ 1:46 AM
[…] https://aacable.wordpress.com/2012/11/20/dmasoftlab-rm-email-notifications-for-various-events/ […]
LikeLike
Pingback by Howto setup Mini ISP using Mikrotik as PPPoE Server + DMASOFTLAB Radius Manager Scratch Card Billing System+ Linux Transparent Firewall Bridge + Ubuntu SQUID 2.7 Proxy Server « Syed Jahanzaib Personnel Blog to Share Knowledge ! — December 28, 2012 @ 8:44 AM
bro, tell me could u configure my RM server with mikrotik.
and if any services charges or any other charges, tell me plz.
funwithnomi@yahoo.com
LikeLike
Comment by nomi — February 20, 2013 @ 7:01 PM
Check Your email. Your query have been replied.
LikeLike
Comment by Syed Jahanzaib / Pinochio~:) — February 20, 2013 @ 8:02 PM
hello what to do in mikrotik firewall just to allow gmail and yahoo.mail to the users and all other websites
LikeLike
Comment by lalit — June 4, 2013 @ 9:13 AM
Dear Sir,
kia yeh mumken ha k mikrotik k concation per 1 ya 1 sy ziyda port farwad ki ja skti ha
plz replay sir
LikeLike
Comment by Rana Shahid — June 29, 2013 @ 2:27 PM
Yes You can. Depend on the requirements.
LikeLike
Comment by Syed Jahanzaib / Pinochio~:) — July 1, 2013 @ 9:32 AM
hello sir , hw r u?
i m small isp provider in india. Last 2 or 3 days my coustomer facing a problem to open this website http://www.techysoul.com/ only my network but in other networks like (airtel , bsnl, reliance etc.) this website is running . So plz tell me sir where is problem in my network .
i also want to tell before 2 or 3 this website http://www.techysoul.com/ is also open in my network. \
plz reply me sir as early as possible.
LikeLike
Comment by bhupinder singh — July 7, 2013 @ 2:13 PM
please consult your local ISP to troubleshoot this issue.
LikeLike
Comment by Syed Jahanzaib / Pinochio~:) — July 9, 2013 @ 8:13 AM
A.o.A
Dear All, I have required help of MikroTik router, We have two ISP’s One for my Marketing dept and one for executives, how can I manage both ISP’s via Mikrotik and also both ISPs fail-over of each others.
I have configured but my configuration is create same issue, during browsing ISP 1 users move ISP2 and same ISP 2 users move on ISP1 time to time.
Please provide help.
Thanks
LikeLike
Comment by Faraz Hussain — July 17, 2013 @ 5:29 PM
Actually it depends on your exact goal.
Read the following for general info . ..
https://aacable.wordpress.com/2013/04/12/mikrotik-multiple-wan-fail-over-scripts/
LikeLike
Comment by Syed Jahanzaib / Pinochio~:) — July 18, 2013 @ 10:02 AM
sir good work i want to cashe server joint to wifi network with rb 750gl how it is posible?
LikeLike
Comment by abdul wahab soomro — August 2, 2013 @ 11:47 AM
for beginning, try this
https://aacable.wordpress.com/tag/aacable-mikrotik-dstnat/
LikeLike
Comment by Syed Jahanzaib / Pinochio~:) — August 3, 2013 @ 10:10 AM
Can this configuration works with RM version 4.1.X ?
LikeLike
Comment by Yus — December 19, 2013 @ 4:28 PM
in RM 4.0.x , you have to use authenticationless smtp gateway , thats why I integrated GMAIL via sendmail on the same RM box.
4.1.x now supports other SMTP servers too. Its much easier in 4.1.x
LikeLike
Comment by Syed Jahanzaib / Pinochio~:) — December 20, 2013 @ 10:55 AM
RM 4.1.x smtp not support SSL.. it mean i still need to using this method?
LikeLike
Comment by Yus — December 20, 2013 @ 4:36 PM
Dear Sir
Do ineed to configure both Local SMTP server and External SMTP server on my RM in order to use Email feature.
LikeLike
Comment by Pratik M — August 29, 2014 @ 6:07 PM
Dear sir when i submit make -C /etc/mail this command this error shown and email notification did not works please help me
root@ubuntu:~# make -C /etc/mail
make: Entering directory `/etc/mail’
Updating auth …
sasl2-bin not installed, not configuring sendmail support.
To enable sendmail SASL2 support at a later date, invoke “/usr/share/sendmail/up
Creating /etc/mail/relay-domains
# Optional file…
make: Warning: File `/etc/mail/authinfo.db’ has modification time 4.5e+04 s in t
The following file(s) have changed:
** ** You should issue `/etc/init.d/sendmail reload` ** **
make: warning: Clock skew detected. Your build may be incomplete.
make: Leaving directory `/etc/mail’
LikeLike
Comment by shanto — May 22, 2015 @ 5:06 PM
i try this method and dont works please answer me to kostas@terabyte,gr
LikeLike
Comment by konstantinos kirikos — June 21, 2016 @ 5:55 AM
getting error on gmail account smtp could not connect to smtp host
LikeLike
Comment by patel deepak — June 23, 2016 @ 9:37 PM
My bulk email section is working and while i create an user it is sending welcome message but when I update a user manually (suppose for 10 days), email is not sent. Is there any problem with my server? My server is Ubuntu 12.05 LTS and radius version 4.1.5.
I hope you can suggest me if radius is not capable of doing this.
LikeLike
Comment by Praveen — July 19, 2016 @ 4:54 PM
Assalamu’alaikum…
Sir, can send email dmaradius with html format?
LikeLike
Comment by choepru — September 10, 2017 @ 8:25 PM
I got thes (SMTP Error: Could not connect to SMTP host.) my Radius Manager 4.1.6 PLEZ HELP
LikeLike
Comment by Mohamed — December 1, 2017 @ 11:53 PM
You are a genius, for most of the problems your already shared a solution.
seriously i am your big fan.
LikeLike
Comment by Amit — April 10, 2018 @ 9:55 PM
Receiving following error: 😦
Wrong user name or email address
LikeLike
Comment by Fahad Sabir — September 25, 2018 @ 12:39 PM