MailHops is an email route API.
998
MailHops is an email route API. It does two things:
The route will contain DNSBL lookup results, hostname lookup results, what3words geo locations and the current weather of the senders location.
https://hub.docker.com/r/avantassel/mailhops-api/
docker pull avantassel/mailhops-api
docker run --name mailhops -p 8080:80 avantassel/mailhops-api
Install the Docker Toolbox
docker build .
# copy Image Id
docker images
# run container for mailhops with php-fpm network
docker run --name mailhops -p 8080:80 [Image Id]
# get your Docker IP
docker-machine ip default
# SSH into the container
docker exec -t -i mailhops /bin/bash
Now open your browser to http://[Docker Ip]:8080
brew install ansible
ansible-galaxy install avantassel.php7.ansible.role geerlingguy.letsencrypt
ansible-playbook -i Ansible.inventory Ansiblefile.aws.yml
Get the geoip file, install composer, pear, node, npm and php 5.5 or greater
# get the geoip binary file from MaxMind
mkdir geoip
./cron_get_geoip.sh
curl -sS https://getcomposer.org/installer | php
mv composer.phar /usr/local/bin/composer
composer install
curl -O http://pear.php.net/go-pear.phar
sudo php -d detect_unicode=0 go-pear.phar
sudo pear install Net_DNSBL
# PHP 5.5 Update (AWS)
yum remove php*
yum remove httpd.x86_64 httpd-devel.x86_64 httpd-tools.x86_64
# install web server
yum install nginx
# OR
yum install httpd24.x86_64 httpd24-devel.x86_64 httpd24-tools.x86_64
cat nginx.conf >> /etc/nginx/conf.d/mailhops.conf
yum install php55.x86_64 php55-common.x86_64 php55-devel.x86_64 php55-fpm
yum install nodejs npm --enablerepo=epel
# make sure httpd starts on boot
chkconfig httpd on
OR
chkconfig nginx on
chkconfig php-fpm-5.5 on
/etc/init.d/httpd start
# OR
/etc/init.d/nginx start
/etc/init.d/php-fpm-5.5 start
MaxMind updates on the first Tuesday of the month so lets run this at midnight on the first Wednesday
0 0 * * 3 /path/to/cron_get_geoip.sh
npm install -g bower
npm install
options are set in the config.json file
mv config.sample.json config.json
Add connection info in config.json
# install the mongo PHP driver
pecl install mongo
# add extension=mongo.so to the php.ini
# php5 now stores it in
vim /etc/php-5.5.ini
# install default collections
mongorestore -h [host:port] -d mailhops -u [user] -p [pass] v1/mongo/mailhops/
Add API key in config.json
Add API key in config.json
You may want to use OpenDNS if running locally, there are issues with Google DNS servers.
php -S 127.0.0.1:8080 -t .
Content type
Image
Digest
Size
241.5 MB
Last updated
over 10 years ago
docker pull avantassel/mailhops-api