Skip to content

Instantly share code, notes, and snippets.

@jaddek
Forked from shark0der/setup_mailcatcher.sh
Created April 27, 2018 13:24
Show Gist options
  • Save jaddek/e4beaf5bcd02376f9485b6fa97dcdc24 to your computer and use it in GitHub Desktop.
Save jaddek/e4beaf5bcd02376f9485b6fa97dcdc24 to your computer and use it in GitHub Desktop.

Revisions

  1. @shark0der shark0der revised this gist May 5, 2016. No changes.
  2. @shark0der shark0der revised this gist May 5, 2016. 1 changed file with 13 additions and 3 deletions.
    16 changes: 13 additions & 3 deletions setup_mailcatcher.sh
    Original file line number Diff line number Diff line change
    @@ -1,7 +1,10 @@
    #!/bin/bash

    # Install dependencies
    apt-get install build-essential libsqlite3-dev ruby1.9.1-dev
    # older ubuntus
    #apt-get install build-essential libsqlite3-dev ruby1.9.1-dev
    # xenial
    apt install build-essential libsqlite3-dev ruby-dev

    # Install the gem
    gem install mailcatcher
    @@ -11,9 +14,16 @@ echo "@reboot root $(which mailcatcher) --ip=0.0.0.0" >> /etc/crontab
    update-rc.d cron defaults

    # Make php use it to send mail
    echo "sendmail_path = /usr/bin/env $(which catchmail) -f 'www-data@localhost'" >> /etc/php5/mods-available/mailcatcher.ini
    # older ubuntus
    #echo "sendmail_path = /usr/bin/env $(which catchmail) -f 'www-data@localhost'" >> /etc/php5/mods-available/mailcatcher.ini
    # xenial
    echo "sendmail_path = /usr/bin/env $(which catchmail) -f 'www-data@localhost'" >> /etc/php/7.0/mods-available/mailcatcher.ini

    # Notify php mod manager (5.5+)
    php5enmod mailcatcher
    # older ubuntus
    #php5enmod mailcatcher
    # xenial
    phpenmod mailcatcher

    # Start it now
    /usr/bin/env $(which mailcatcher) --ip=0.0.0.0
  3. @shark0der shark0der revised this gist Nov 24, 2015. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion setup_mailcatcher.sh
    Original file line number Diff line number Diff line change
    @@ -11,7 +11,7 @@ echo "@reboot root $(which mailcatcher) --ip=0.0.0.0" >> /etc/crontab
    update-rc.d cron defaults

    # Make php use it to send mail
    echo "sendmail_path = /usr/bin/env $(which catchmail)" >> /etc/php5/mods-available/mailcatcher.ini
    echo "sendmail_path = /usr/bin/env $(which catchmail) -f 'www-data@localhost'" >> /etc/php5/mods-available/mailcatcher.ini
    # Notify php mod manager (5.5+)
    php5enmod mailcatcher

  4. @shark0der shark0der revised this gist Oct 22, 2015. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions setup_mailcatcher.sh
    Original file line number Diff line number Diff line change
    @@ -11,9 +11,9 @@ echo "@reboot root $(which mailcatcher) --ip=0.0.0.0" >> /etc/crontab
    update-rc.d cron defaults

    # Make php use it to send mail
    sudo echo "sendmail_path = /usr/bin/env $(which catchmail)" >> /etc/php5/mods-available/mailcatcher.ini
    echo "sendmail_path = /usr/bin/env $(which catchmail)" >> /etc/php5/mods-available/mailcatcher.ini
    # Notify php mod manager (5.5+)
    sudo php5enmod mailcatcher
    php5enmod mailcatcher

    # Start it now
    /usr/bin/env $(which mailcatcher) --ip=0.0.0.0
  5. @shark0der shark0der revised this gist Oct 1, 2015. 1 changed file with 4 additions and 3 deletions.
    7 changes: 4 additions & 3 deletions setup_mailcatcher.sh
    Original file line number Diff line number Diff line change
    @@ -1,12 +1,13 @@
    #!/bin/bash

    # Install dependencies
    apt-get install libsqlite3-dev ruby1.9.1-dev
    apt-get install build-essential libsqlite3-dev ruby1.9.1-dev

    # Install the gem
    gem install mailcatcher

    # Make it start on boot
    echo "@reboot $(which mailcatcher) --ip=0.0.0.0" >> /etc/crontab
    echo "@reboot root $(which mailcatcher) --ip=0.0.0.0" >> /etc/crontab
    update-rc.d cron defaults

    # Make php use it to send mail
    @@ -15,4 +16,4 @@ sudo echo "sendmail_path = /usr/bin/env $(which catchmail)" >> /etc/php5/mods-av
    sudo php5enmod mailcatcher

    # Start it now
    /usr/bin/env $(which mailcatcher) --ip=0.0.0.0
    /usr/bin/env $(which mailcatcher) --ip=0.0.0.0
  6. @conroyp conroyp created this gist Aug 23, 2014.
    18 changes: 18 additions & 0 deletions setup_mailcatcher.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,18 @@
    #!/bin/bash

    # Install dependencies
    apt-get install libsqlite3-dev ruby1.9.1-dev
    # Install the gem
    gem install mailcatcher

    # Make it start on boot
    echo "@reboot $(which mailcatcher) --ip=0.0.0.0" >> /etc/crontab
    update-rc.d cron defaults

    # Make php use it to send mail
    sudo echo "sendmail_path = /usr/bin/env $(which catchmail)" >> /etc/php5/mods-available/mailcatcher.ini
    # Notify php mod manager (5.5+)
    sudo php5enmod mailcatcher

    # Start it now
    /usr/bin/env $(which mailcatcher) --ip=0.0.0.0