Syed Jahanzaib Personal Blog to Share Knowledge !

November 20, 2012

DMASOFTLAB RM 4.x Email Notifications for various events

Filed under: Linux Related, Mikrotik Related, Radius Manager — Tags: — Syed Jahanzaib / Pinochio~:) @ 2:30 PM

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.




Radius Manager 4.0.4 Email Configuration SAMPLES:



smtp_relay              localhost                       ; smtp relay
mail_from                    ; email sender address
mail_reply                   ; email reply adddress
mail_localdomain                       ; email local domain


define("smtp_relay", "localhost");                            // SMTP relay
define("mail_from", "");                   // warning email sender
define("mail_reply", "");                  // warning email return path
define("mail_preview", "");                // preview user of mass mail
define("mail_newuser", "");                // self registered new user notification
define("mail_localdomain", "");                      // default domain name


Now Open RM ACP (Administrator Control Panel) ,
& check the following settings.
As showed in the image below . . .

5- email setting.

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)

1- Account Expire Warning



Welcome Message for newly registered users

2- Welcome New User.


Recover Password by Email

3- Recover password by email



Account Renewed Notification

4- Account Renewed


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.






Radius Manager 4.1.x Email Configuration SAMPLES:


mail_localdomain            ; email    local domain



// SMTP definitions

define('smtp_relay', 'localhost');                // SMTP relay
define('smtp_port', 25);                    // SMTP port
define('smtp_auth', FALSE);                    // SMTP authentication
define('smtp_user', '');                // SMTP user name
define('smtp_psw', 'YOUR_GMAIL_PASSWORD');                // SMTP password
define('mail_from', '');            // sender address
define('mail_fromname', 'SYED JAHANZAIB Support');            // sender name
define('mail_newuser', '');            // self registered new user notification
define('mail_localdomain', '');        // default domain name




Syed Jahanzaib


  1. Thanks

    Comment by jackobarca — November 21, 2012 @ 1:31 AM

  2. where can find the config file for sms alerts

    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.

      Comment by Syed Jahanzaib / Pinochio~:) — November 21, 2012 @ 4:26 PM

  3. Thanks, but in maillog radius send “…stat=Deferred: 451-The server has reached its limit for processing requests from your host.

    Comment by Carlos García — December 2, 2012 @ 1:46 AM

  4. bro, tell me could u configure my RM server with mikrotik.
    and if any services charges or any other charges, tell me plz.

    Comment by nomi — February 20, 2013 @ 7:01 PM

  5. hello what to do in mikrotik firewall just to allow gmail and yahoo.mail to the users and all other websites

    Comment by lalit — June 4, 2013 @ 9:13 AM

  6. 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

    Comment by Rana Shahid — June 29, 2013 @ 2:27 PM

  7. 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 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 is also open in my network. \
    plz reply me sir as early as possible.

    Comment by bhupinder singh — July 7, 2013 @ 2:13 PM

  8. 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.

    Comment by Faraz Hussain — July 17, 2013 @ 5:29 PM

  9. sir good work i want to cashe server joint to wifi network with rb 750gl how it is posible?

    Comment by abdul wahab soomro — August 2, 2013 @ 11:47 AM

  10. Can this configuration works with RM version 4.1.X ?

    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

      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?

        Comment by Yus — December 20, 2013 @ 4:36 PM

  11. Dear Sir

    Do ineed to configure both Local SMTP server and External SMTP server on my RM in order to use Email feature.

    Comment by Pratik M — August 29, 2014 @ 6:07 PM

  12. 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’

    Comment by shanto — May 22, 2015 @ 5:06 PM

  13. i try this method and dont works please answer me to kostas@terabyte,gr

    Comment by konstantinos kirikos — June 21, 2016 @ 5:55 AM

  14. getting error on gmail account smtp could not connect to smtp host

    Comment by patel deepak — June 23, 2016 @ 9:37 PM

  15. 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.

    Comment by Praveen — July 19, 2016 @ 4:54 PM

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Blog at

%d bloggers like this: