artlife3 / dazed-confused-vagrant-vm

MIT License
3 stars 0 forks source link

Add mailcatcher #2

Closed artlife3 closed 7 years ago

artlife3 commented 7 years ago

https://mailcatcher.me

artlife3 commented 7 years ago

Check point

chkconfig

# /etc/rc.local
/usr/bin/ruby /usr/bin/mailcatcher --http-ip 192.168.33.10

php.ini

// php.ini
smtp_port = 1025
sendmail_path = /usr/bin/env /opt/chef/embedded/bin/catchmail

Start up command

Starting MailCatcher
==> smtp://127.0.0.1:1025
==> http://192.168.2.10:1080
*** MailCatcher runs as a daemon ....

Open 1080,1025 port

sudo iptables -A INPUT -p tcp -m tcp --dport 1080 -j ACCEPT

sudo service iptables save
iptables: Saving firewall rules to /etc/sysconfig/iptables:[  OK  ]

sudo service iptables restart
artlife3 commented 7 years ago

The problems were not these. It seems that it should have started at 0.0.0.0.

/opt/rbenv/shims/mailcatcher --http-ip 0.0.0.0 --smtp-ip 0.0.0.0 -v -f > /var/log/mailcatcher/mailcatcher.log&