Showing posts with label Gmail. Show all posts
Showing posts with label Gmail. Show all posts

Sunday, November 22, 2015

Bigpond SMTP Fails

That's right! my Bigpond Internet service fails to deliver!

Fail 1
It does not allow outbound SMTP from my network to anywhere else except their own SMTP server

Fail 2
It has got limited number email relay allowed per day or month

I understand this to block their customers become spammer. However, their solution is stereotyping every single one of their customers as spammers.

To avoid this I use gmail to relay my email, bypassing bigpond all together.
So what I did:

Create a new gmail account - specifically used for relaying only, which a very strong password

then

Install required software

sudo apt-get install mailutils libsasl2-2 ca-certificates libsasl2-modules
Create Gmail credential file

vi /etc/postfix/sasl_passwd
add the following content

[smtp.gmail.com]:587    USERNAME@gmail.com:PASSWORD
Modify the credential file permissions

sudo chmod 400 /etc/postfix/sasl_passwd
sudo postmap /etc/postfix/sasl_passwd
Copy the CA certificate

cat /etc/ssl/certs/Thawte_Premium_Server_CA.pem | sudo tee -a /etc/postfix/cacert.pem
Modify main.conf and add the following line

relayhost = [smtp.gmail.com]:587
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
smtp_sasl_security_options = noanonymous
smtp_tls_CAfile = /etc/postfix/cacert.pem
smtp_use_tls = yes
Reload

sudo /etc/init.d/postfix reload
Now my outbound SMTP relay is going through Gmail SMTP server authenticated.


Saturday, February 07, 2009

Gmail and Hotmail Fetcher

I use fetchmail to fetch emails from any POP3 account. Since Gmail support POP3 (you need to enable it), I can fetch it use the following command:

poll pop.gmail.com proto pop3 and options no dns
user
'myemail@gmail.com' there with password 'mypassword' is myforwardemail@localemail.com options ssl

Hotmail is a little bit trickier, because it is a HTTP based email.
To Fetch Hotmail, I use GetLive:

Before you set GetLive, make sure you set your 'reading pane' to off in your Hotmail setting
Get GetLive from the Internet (just Google it)
Create a config file (getlive.conf):

UserName=myusername
Password=mypassword
Domain=hotmail.com
Downloaded=/var/log/getlive.log
processor=sendmail -i
myforwardemail@localemail.com
Delete=Yes
Folder=Inbox
mode=200810


and create a cron job to execute:

GetLive.pl --config-file getlive.conf