The News‎ > ‎

Get public IP and email it to yourself using Ubuntu

posted Dec 4, 2016, 5:15 AM by Leigh Williams
1.) Get your current public IP and write it to a file:
dig +short >> myip.txt (got this off the internet, thanks to the guy that posted this!)

2.) Read the file contents and email it:
Basically, follow this tutorial:
If you get an error like this one below then do this: 
ERROR: warning: unable to look up public/pickup: No such file or directory
DO THIS: mkfifo /var/spool/postfix/public/pickup

3.) Your config file should look like this:
relayhost = []:587
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
smtp_sasl_security_options =
smtp_tls_CAfile = /etc/ssl/certs/ca-certificates.crt
smtp_use_tls = yes