Showing posts with label gmail. Show all posts
Showing posts with label gmail. Show all posts

27 October 2016

Auto-forward Webmails

After much toiling to get webmails to be pushed to mobile, I was still dissatisfied with it.

It only fetched mails if I was connected to the intranet.

So I figured since a lot of us have access to a work station that runs 24*7 and is connected to both the internet and the intranet, why not use it as a relay for webmails.


So here is a guide to do the same -

1. Make an account on mail-gun. Register for it using the email you want to forward your webmails to and verify your account to enable a sandbox domain.

We will be using mail-gun's https api to forward our mails ( Since our institute blocks all ports apart from 80 or 443, so no gmail pop3/imap to the rescue)

2. Once you have created an account and verified it go to the following link -
https://mailgun.com/app/domains

You will see a sandbox domain. Click on it and keep a copy of the domain and the api-key.

Your domain will look something like this -

sandboxd6eebfa15f55422ab904868718950d50.mailgun.org

Your api-key will look like the following - 
key-##################77ae

Be careful not to copy the spaces after the key or the domain.

3.  Now run the following commands - 

sudo apt-get install python-requests


Right click on it and save it at an appropriate location.

5. Run the above script and fill in the appropriate values. ( Make sure the email-id you are forwarding to is the same as the one you registered for mailgun)

To run the script, cd to the appropriate directory and run "python mail.py"



6. The script will create the necessary files and send a few email depending on your input.

7. To auto-push the mails, add a cronjob for the above script.

If you configured the above script correctly, it should have displayed a line of code to configure the cronjob for your particular system.

8. Copy that line.

9. Run  the following command in terminal - 

crontab -e

Crontab should open with your default editor.
If you haven't picked one already, pick nano.

Paste the line copied in step 8 at the end of the crontab file that opened.

Press Ctrl+X and then Y to confirm the addition of the new cronjob.

Voila, enjoy.


If you know of a better method to forward webmails, please let me know in the comments :)


4 January 2015

Setting up your IITG email account on Android

1. Open your Gmail app.
2. Open the left drawer by sliding it.
3. Click on 'Add account'.

4. Select 'Personal (IMAP/POP).


5. Type your webmail id.

6. In the type of account screen, select Personal (POP3).

7. In the next screen type your webmail password.

8. In the incoming sever settings type your username (without @iitg.ernet.in) , password.

9. Set your server address according to the mail server provided to you.
List of server addresses-
  •  Teesta 202.141.80.12
  •  Naambor 202.141.80.9
  •  Disang 202.141.80.10
  • Tamdil 202.141.80.11
  •  Dikrong 202.141.80.13


10. Set the Security type to SSL/TLS (Accept all cerificates).
11. Change the port to 995.

12. Set the outgoing SMTP server address to 202.141.80,23 (it's the CC's address but since outgoing smtp server settings don't seem to work, I had to go with a this to complete the email setup. If anyone gets the Outgoing server settings working, let me know!)
13. Set the security type to 'None'.
14. Set the port to 25.

15.Next setup your sync frequency and notification settings accordingly.
16. Done!! enjoy checking your webmail without having to enter that fricking captcha ever again.

 P.S. This only works on IIT networks (either your own personal Wi-Fi, connectify or IITG wifi/Hostel Wifi, not on cellular data).