If you want to use GMAIL as your sendmail relay server, Use the below configuration.
{I required it to send DMASOFTLAB RADIUS MANAGER Email notifications to all users regarding there service status, account expiry, renewal , various alerts and other info. that’s why I wrote this guide, it maybe useful for others too . . Syed Jahanzaib }
OS Used: Ubuntu 10.4 / 12.4
First install Sendmail and its utilities.
apt-get install sendmail mailutils
Now configure signed SSL certificates
mkdir /etc/mail/certs chmod 700 /etc/mail/certs cd /etc/mail/certs
openssl dsaparam 1024 -out dsa1024 -out dsa1024.pem
(It will ask you various questiosn , just enter them accordingly, like country code, for Pakistan its PK, and other information you have)
openssl req -x509 -nodes -days 3650 -newkey dsa:dsa1024.pem -out /etc/mail/certs/mycert.pem -keyout /etc/mail/certs/mykey.pem
(It will ask you various questions , just enter them accordingly, like country code, for Pakistan its PK, and other information you have)
openssl req -x509 -new -days 3650 -key /etc/mail/certs/mykey.pem -out /etc/mail/certs/mycert.pem
ln -s /etc/mail/certs/mycert.pem /etc/mail/certs/CAcert.pem chmod 600 /etc/mail/certs/* cd ..
nano /etc/mail/authinfo
AuthInfo:smtp.gmail.com "U:root" "I:USERNAME@gmail.com" "P:PASSWORD" AuthInfo: "U:root" "I:USERNAME@gmail.com" "P:PASSWORD"
Save & Exit & issue below command
makemap hash /etc/mail/authinfo < /etc/mail/authinfo
nano /etc/mail/sendmail.mc
dnl # dnl # SSL Settings define(`CERT_DIR', `MAIL_SETTINGS_DIR`'certs') define(`confCACERT_PATH', `CERT_DIR') define(`confCACERT', `CERT_DIR/CAcert.pem') define(`confSERVER_CERT', `CERT_DIR/mycert.pem') define(`confSERVER_KEY', `CERT_DIR/mykey.pem') define(`confCLIENT_CERT', `CERT_DIR/mycert.pem') define(`confCLIENT_KEY', `CERT_DIR/mykey.pem') dnl # dnl # GMAIL FORWARDING define(`SMART_HOST',`[smtp.gmail.com]')dnl define(`RELAY_MAILER_ARGS', `TCP $h 587')dnl define(`ESMTP_MAILER_ARGS', `TCP $h 587')dnl define(`confAUTH_OPTIONS', `A p')dnl TRUST_AUTH_MECH(`EXTERNAL DIGEST-MD5 CRAM-MD5 LOGIN PLAIN')dnl define(`confAUTH_MECHANISMS', `EXTERNAL GSSAPI DIGEST-MD5 CRAM-MD5 LOGIN PLAIN')dnl FEATURE(`authinfo',`hash -o /etc/mail/authinfo.db')dnl
Now rebuild sendmail config and start the service 😀
make -C /etc/mail service sendmail restart
Test the setup 😉
Use the below command to test the local smtp .
– – – – -??
Regard’s
Syed Jahanzaib
[…] https://aacable.wordpress.com/2012/12/27/howto-configure-gmail-as-sendmail-relay-d-also-can-be-used-w… […]
LikeLike
Pingback by DMASOFTLAB RM: Email Notifications for various events « Syed Jahanzaib Personnel Blog to Share Knowledge ! — December 28, 2012 @ 9:21 AM
you are good!!
please make a new folder “Raidus Manager” how ever every one can found ur RM configs easily.
regards,
Nomi
LikeLike
Comment by Nomi — December 28, 2012 @ 9:30 PM
There is already one.
LikeLike
Comment by Syed Jahanzaib / Pinochio~:) — December 29, 2012 @ 12:18 PM
pls add me on yahoo i want hellp i am rabea from egypt and my mail is lonly_in_my_life1@yahoo.com
LikeLike
Comment by rabea — December 29, 2012 @ 12:33 PM
I dont use chat applications. Please send email
LikeLike
Comment by Syed Jahanzaib / Pinochio~:) — December 29, 2012 @ 5:21 PM
Great !!!!!!
LikeLike
Comment by faizan — December 29, 2012 @ 12:37 PM
Hi
Great work as usual
How can I enter my Email credentials (not Gmail) in Sendmail using Webmin?
Thank you.
David
LikeLike
Comment by David — January 22, 2013 @ 8:15 PM
I have no idea as I have never configured SENDMAIL via webmin, Also its not recommended. Because most of the options in sendmail should be configured via CLI.
LikeLike
Comment by Syed Jahanzaib / Pinochio~:) — January 23, 2013 @ 11:05 AM
can i use this setup to send from my mail servrr if i use my details?
LikeLike
Comment by Harley — March 10, 2013 @ 3:05 PM
Yes you can.
LikeLike
Comment by Syed Jahanzaib / Pinochio~:) — March 10, 2013 @ 7:07 PM
Hi there Syed,
How do i go about changing the sender header from admin@localhost to something more relevant?
LikeLike
Comment by Harley — March 14, 2013 @ 3:19 AM
I would also like to know
LikeLike
Comment by Juan Kilian — April 9, 2013 @ 2:11 PM
I found it – inside system_cfg.php change sender address and restart rmpoller
LikeLike
Comment by Juan Kilian — April 15, 2013 @ 11:49 AM
Salam to all,
dear janzaib i need QOS script for squid bcoz squid consume full bandwidth when it completing any request, so plzzz if u have a time then publish any gud script for QOS in squid or with squid,
thanking you,
LikeLike
Comment by rehmat ali — April 16, 2013 @ 7:01 PM
The better way to restrict squid to use certain fix amount of bandwidth, route all traffic from squid to mikrotik, and create queue for squid ip that can restrict bandwidth.
LikeLike
Comment by Syed Jahanzaib / Pinochio~:) — April 17, 2013 @ 8:09 AM
i googled and find some, delay_pool class parameters
is it can limit the squid to use mentioned bandwidth if yes then i try that squid cant recognize delay_etc, how lusca/squid able to recognize delay_pool etc, plzz mention.
LikeLike
Comment by rehmat ali — April 18, 2013 @ 2:24 AM
Yes delay pool can help you. but its management will be a overhead for you as you have to reserve ip for each user in your pppoe/hotspot profile, so you can create different ip base groups, and based on these ip groups, you can apply different delay bandwidth restrictions.
LikeLike
Comment by Syed Jahanzaib / Pinochio~:) — April 18, 2013 @ 8:08 AM
yes u r right i tried delay_pool methods but i fail to accomplished after that i tried simple queue method and its done thxzzz 4 ur guide man,
keep it up,
LikeLike
Comment by rehmat ali — April 19, 2013 @ 9:14 AM
i have a problem, mt ip = 192.168.9.2 squid ip =192.168.9.1
all tcp 80 traffic passthrough from mt to squid and i m receving zero sized reply on browser.
in cache.log i seen this…..
squidaio_queue_request: WARNING – Queue congestion
lientTryParseRequest: FD 128 (192.168.9.2:4105) Invalid Request
lientTryParseRequest: FD 300 (192.168.9.2:26672) Invalid Request
plzzz resolve this issue or guide me to resolve this.thxzzzzzzzzzz
LikeLike
Comment by rehmat ali — April 21, 2013 @ 8:03 PM
clientEatRequestBodyHandler: FD 51: no more data left in socket; but request header says there should be; aborting for now
LikeLike
Comment by rehmat ali — April 22, 2013 @ 1:13 AM
i did not route all traffic from squid to mikrotik to restrict squid to consume full bandwidth i had just replaced squid wan port from ptcl router to mt lan port and make a firewall rule of src-nat in mt and masqurate all traffic src squid wan ip. also make a simple interface queue to limit squid bandwidth.
i think after this all my squid making a problem its stuck on facebook and zero sized reply on bbc.co.uk after taking some time.
some error may help u in cache.log
2013/04/22 00:42:05| clientTryParseRequest: FD 104 (192.168.9.2:3299) Invalid Request
2013/04/22 00:42:35| clientTryParseRequest: FD 157 (192.168.9.2:17231) Invalid Request
2013/04/22 00:44:08| clientTryParseRequest: FD 348 (192.168.9.2:4714) Invalid Request
2013/04/22 00:44:16| clientTryParseRequest: FD 278 (192.168.9.2:17309) Invalid Request
2013/04/22 00:45:51| squidaio_queue_request: WARNING – Queue congestion
2013/04/22 00:46:56| clientTryParseRequest: FD 40 (192.168.9.2:1430) Invalid Request
2013/04/22 00:47:05| clientTryParseRequest: FD 328 (192.168.9.2:3619) Invalid Request
LikeLike
Comment by rehmat ali — April 22, 2013 @ 1:33 AM
Non Payment Reminder for Expired Users in RADIUS MANAGER 4.x.x:
follow all your instructions, but does not work.
Juan Carlos.
jcgutierrezo@gmail.com
LikeLike
Comment by Juan Carlos — December 23, 2014 @ 8:43 AM
It works for sure, but the real magic works at mikrotik, you have to pay attention on rules at mikrotik level also.
LikeLike
Comment by Syed Jahanzaib / Pinochio~:) — December 29, 2014 @ 9:16 AM
hi can you help, we were unable to login to radius today so did a reboot and can’t get it back !!!
LikeLike
Comment by Liz — January 16, 2015 @ 11:39 PM
what error you are getting? send email for quicker response.
LikeLike
Comment by Syed Jahanzaib / Pinochio~:) — January 17, 2015 @ 10:01 AM
what error?
LikeLike
Comment by Syed Jahanzaib / Pinochio~:) — January 17, 2015 @ 10:08 AM
DearBro
kindly suggest suitable script for IAS for radius manager, for client end.
LikeLike
Comment by Raj — January 31, 2015 @ 7:15 PM
How are you my friends Syed, help me please. email :jramirez@csrconsultores.com regards-
3 15:34:07 debian sm-mta[11348]: t33JY7JE011348: from=, size=436, class=0, nrcpts=1, msgid=, proto=ESMTP, daemon=MTA-v4, relay=localhost [127.0.0.1]
Apr 3 15:34:50 debian sm-mta[11351]: t33JY7JE011348: to=, delay=00:00:43, xdelay=00:00:43, mailer=relay, pri=120436, relay=gmail-smtp-msa.l.google.com. [74.125.137.109], dsn=4.0.0, stat=Deferred: Connection timed out with gmail-smtp-msa.l.google.com.
Apr 3 15:40:34 debian sm-mta[11483]: t33JY7JE011348: to=, delay=00:06:27, xdelay=00:00:42, mailer=relay, pri=210436, relay=gmail-smtp-msa.l.google.com. [74.125.137.109], dsn=4.0.0, stat=Deferred: Connection timed out with gmail-smtp-msa.l.google.com.
LikeLike
Comment by Jose Ramirez — April 4, 2015 @ 12:43 AM
can u tell me how to configure DMASOFTLAB RM 4.0.4 Email Notifications in Debian 7.5 32 bit please
LikeLike
Comment by shanto — May 21, 2015 @ 2:43 PM
I am using CentOS. Please update
LikeLike
Comment by Md Ikhtiaruddin — July 22, 2017 @ 6:17 AM
Can you pls update this solution to work for RM Version 4.1.6 please..
LikeLike
Comment by James Anthony — March 1, 2019 @ 1:28 PM
This can work DMA RM 4.x series , infacet its just a email relay server, so you can use it with any application regardless of operating system architecture.
LikeLike
Comment by Syed Jahanzaib / Pinochio~:) — March 3, 2019 @ 11:03 AM
hello sir
i have face one error——————————— ( Email address banned! )
Telme what is this problem
LikeLike
Comment by Mian Bilal Dolla — August 3, 2019 @ 9:50 PM
New Register account…error
LikeLike
Comment by Mian Bilal Dolla — August 3, 2019 @ 9:51 PM