Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save ygun/8c69c40811b3d512e1a1c0acd022cf35 to your computer and use it in GitHub Desktop.
Save ygun/8c69c40811b3d512e1a1c0acd022cf35 to your computer and use it in GitHub Desktop.

Revisions

  1. @raelgc raelgc revised this gist Mar 14, 2018. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion Email Server (Linux, Unix, Mac).md
    Original file line number Diff line number Diff line change
    @@ -40,7 +40,7 @@
    * If not exists, create file /etc/postfix/virtual:
    `sudo nano /etc/postfix/virtual`
    * Add the following 2 lines content, replacing `<your-user>` with your user account:
    * Add the following 2 lines content, replacing `<your-user>` with your **Unix** user account:
    ```
    @localhost <your-user>
    @localhost.com <your-user>
  2. @raelgc raelgc revised this gist Mar 14, 2018. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions Email Server (Linux, Unix, Mac).md
    Original file line number Diff line number Diff line change
    @@ -40,7 +40,7 @@
    * If not exists, create file /etc/postfix/virtual:
    `sudo nano /etc/postfix/virtual`
    * Add the following 2 lines content, replacing <your-user> with your user account:
    * Add the following 2 lines content, replacing `<your-user>` with your user account:
    ```
    @localhost <your-user>
    @localhost.com <your-user>
    @@ -55,7 +55,7 @@
    `sudo postmap /etc/postfix/virtual`
    * Reload postfix:
    `sudo systemctl restart postfix`
    * If you're under **non** `systemd` distro, like Ubuntu 14.04, service restart command **probably** is: `ssudo service postfix reload`
    * If you're under **non** `systemd` distro, like Ubuntu 14.04, service restart command **probably** is: `sudo service postfix reload`
    ## 5 - Install Thunderbird
  3. @raelgc raelgc revised this gist Apr 27, 2017. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions Email Server (Linux, Unix, Mac).md
    Original file line number Diff line number Diff line change
    @@ -66,8 +66,8 @@
    * Click in the Settings button at top right (similar to Chrome settings) then click on Preferences > Account Settings
    * Under Account Actions choose "Add Other Account"
    * Select "Unix Mailspool (Movemail)"
    * Your account will be `<your-user>@localhost` (of course, replace `<your-user>` with your user account). Don't use `<your-user>@(none)`, use `<your-user>@localhost`
    * Ingoing and Outgoing server will be: localhost
    * Your account will be `<your-user>@localhost` (of course, replace `<your-user>` with your user account). **Don't use** `<your-user>@(none)`, use `<your-user>@localhost`
    * Ingoing and Outgoing server will be: `localhost`
    * Restart (close and reopen) Thunderbird.
    ## 7 - Start your Mail Spool file
  4. @raelgc raelgc revised this gist Apr 27, 2017. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions Email Server (Linux, Unix, Mac).md
    Original file line number Diff line number Diff line change
    @@ -54,8 +54,8 @@
    * Activate it:
    `sudo postmap /etc/postfix/virtual`
    * Reload postfix:
    `sudo service postfix reload`
    * If you're under a `systemd` distro, like Fedora or Ubuntu 16.04, service restart command is: `sudo systemctl restart postfix`
    `sudo systemctl restart postfix`
    * If you're under **non** `systemd` distro, like Ubuntu 14.04, service restart command **probably** is: `ssudo service postfix reload`
    ## 5 - Install Thunderbird
  5. @raelgc raelgc revised this gist Apr 21, 2016. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions Email Server (Linux, Unix, Mac).md
    Original file line number Diff line number Diff line change
    @@ -62,7 +62,7 @@
    Ubuntu: `sudo apt-get install thunderbird`
    ## 6 - Configure Thunderbird
    * Skip the first welcome screen (click in the button to use existing accounts);
    * Skip the welcome screen (click in the button to use existing accounts);
    * Click in the Settings button at top right (similar to Chrome settings) then click on Preferences > Account Settings
    * Under Account Actions choose "Add Other Account"
    * Select "Unix Mailspool (Movemail)"
    @@ -72,7 +72,7 @@
    ## 7 - Start your Mail Spool file
    * This step have two purposes: test your install and stop the `Unable to locate mail spool file.` message.
    * Send new email to `<your-user>@localhost`, replacing `<your-user>` with your user account
    * Using Thunderbird, send new email to `<your-user>@localhost`, replacing `<your-user>` with your user account
    * Click on "Get Mail"
    * Test catch-all: send new email to `averagejoe@localhost`
    * Click on "Get Mail" and you'll see the message at `Inbox`.
  6. @raelgc raelgc revised this gist Apr 20, 2016. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions Email Server (Linux, Unix, Mac).md
    Original file line number Diff line number Diff line change
    @@ -70,9 +70,9 @@
    * Ingoing and Outgoing server will be: localhost
    * Restart (close and reopen) Thunderbird.
    ## 7 - Test Thunderbird
    ## 7 - Start your Mail Spool file
    * This step have two purposes: test your install and stop the `Unable to locate mail spool file.` message.
    * Send new email to `<your-user>@localhost`, replacing `<your-user>` with your user account
    * Click on "Get Mail"
    * Test catch-all: send new email to `averagejoe@localhost`
    * Click on "Get Mail" and you'll see the message at `Inbox`.
    * This will stop the `Unable to locate mail spool file.` message.
  7. @raelgc raelgc revised this gist Apr 20, 2016. 1 changed file with 3 additions and 1 deletion.
    4 changes: 3 additions & 1 deletion Email Server (Linux, Unix, Mac).md
    Original file line number Diff line number Diff line change
    @@ -55,6 +55,7 @@
    `sudo postmap /etc/postfix/virtual`
    * Reload postfix:
    `sudo service postfix reload`
    * If you're under a `systemd` distro, like Fedora or Ubuntu 16.04, service restart command is: `sudo systemctl restart postfix`
    ## 5 - Install Thunderbird
    @@ -73,4 +74,5 @@
    * Send new email to `<your-user>@localhost`, replacing `<your-user>` with your user account
    * Click on "Get Mail"
    * Test catch-all: send new email to `averagejoe@localhost`
    * Click on "Get Mail"
    * Click on "Get Mail" and you'll see the message at `Inbox`.
    * This will stop the `Unable to locate mail spool file.` message.
  8. @raelgc raelgc revised this gist Apr 20, 2016. 1 changed file with 12 additions and 1 deletion.
    13 changes: 12 additions & 1 deletion Email Server (Linux, Unix, Mac).md
    Original file line number Diff line number Diff line change
    @@ -17,7 +17,18 @@

    ## 3 - Configure Postfix to Local only

    * During postfix install process, the configure text dialog will display five options: "No Configurartion", "Internet Site", "Internet with Smarthost", "Satellite Systems", "Local Only".
    * During postfix install process, the configure text dialog will display five options:

    ```term
    General type of mail configuration:
    No configuration
    Internet Site
    Internet with smarthost
    Satellite system
    Local only
    ```
    * Select "Local Only".
    * For the domain name, use the default suggested and finish the install.
  9. @raelgc raelgc revised this gist Apr 1, 2014. 1 changed file with 4 additions and 4 deletions.
    8 changes: 4 additions & 4 deletions Email Server (Linux, Unix, Mac).md
    Original file line number Diff line number Diff line change
    @@ -30,10 +30,10 @@
    * If not exists, create file /etc/postfix/virtual:
    `sudo nano /etc/postfix/virtual`
    * Add the following 2 lines content, replacing <your-user> with your user account:
    ```
    @localhost <your-user>
    @localhost.com <your-user>
    ```
    ```
    @localhost <your-user>
    @localhost.com <your-user>
    ```
    * Save and close the file.
    * Configure postifx to read this file:
    * Open /etc/postfix/main.cf:
  10. @raelgc raelgc revised this gist Apr 1, 2014. 1 changed file with 4 additions and 2 deletions.
    6 changes: 4 additions & 2 deletions Email Server (Linux, Unix, Mac).md
    Original file line number Diff line number Diff line change
    @@ -30,8 +30,10 @@
    * If not exists, create file /etc/postfix/virtual:
    `sudo nano /etc/postfix/virtual`
    * Add the following 2 lines content, replacing <your-user> with your user account:
    `@localhost <your-user>`
    `@localhost.com <your-user>`
    ```
    @localhost <your-user>
    @localhost.com <your-user>
    ```
    * Save and close the file.
    * Configure postifx to read this file:
    * Open /etc/postfix/main.cf:
  11. @raelgc raelgc revised this gist Apr 1, 2014. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion Email Server (Linux, Unix, Mac).md
    Original file line number Diff line number Diff line change
    @@ -25,7 +25,7 @@

    Enabling this, you can use any email address ending with "@localhost" or "@localhost.com".

    Example: here, my unique account is rael@localhost. But while testing systems, I can use any address like joe@localhost, foo@localhost, etc, because all will be redirected to rael@localhost
    Example: here, my unique account is rael@localhost.com. But while testing systems, I can use any address like joe@localhost.com, foo@localhost.com, etc, because all will be redirected to rael@localhost.com

    * If not exists, create file /etc/postfix/virtual:
    `sudo nano /etc/postfix/virtual`
  12. @raelgc raelgc revised this gist Nov 1, 2013. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion Email Server (Linux, Unix, Mac).md
    Original file line number Diff line number Diff line change
    @@ -5,7 +5,7 @@
    Most of programs will not accept an email using just @localhost as domain.
    So, edit `/etc/hosts` file to make the domain localhost.com point to your machine, including this content to the file:

    127.0.0.1 localhost.com
    `127.0.0.1 localhost.com`

    ## 2 - Install Postfix

  13. @raelgc raelgc renamed this gist Nov 1, 2013. 1 changed file with 16 additions and 8 deletions.
    24 changes: 16 additions & 8 deletions gistfile1.md → Email Server (Linux, Unix, Mac).md
    Original file line number Diff line number Diff line change
    @@ -1,29 +1,37 @@
    # Setup a Local Only Email Server (Linux, Unix, Mac)

    ## 1 - Install Postfix
    ## 1 - Point localhost.com to your machine

    Most of programs will not accept an email using just @localhost as domain.
    So, edit `/etc/hosts` file to make the domain localhost.com point to your machine, including this content to the file:

    127.0.0.1 localhost.com

    ## 2 - Install Postfix

    Fedora/CentOS/RHEL: `sudo yum install postfix`

    Ubuntu: `sudo apt-get install postfix`

    MacOSX: Postfix is already installed by default.

    ## 2 - Configure Postfix to Local only
    ## 3 - Configure Postfix to Local only

    * During postfix install process, the configure text dialog will display five options: "No Configurartion", "Internet Site", "Internet with Smarthost", "Satellite Systems", "Local Only".
    * Select "Local Only".
    * For the domain name, use the default suggested and finish the install.

    ## 3 - Configure a Catch-all Address
    ## 4 - Configure a Catch-all Address

    Enabling this, you can use any email address ending with "@localhost".
    Enabling this, you can use any email address ending with "@localhost" or "@localhost.com".

    Example: here, my unique account is rael@localhost. But while testing systems, I can use any address like joe@localhost, foo@localhost, etc, because all will be redirected to rael@localhost

    * If not exists, create file /etc/postfix/virtual:
    `sudo nano /etc/postfix/virtual`
    * Add the following content, replacing <your-user> with your user account:
    * Add the following 2 lines content, replacing <your-user> with your user account:
    `@localhost <your-user>`
    `@localhost.com <your-user>`
    * Save and close the file.
    * Configure postifx to read this file:
    * Open /etc/postfix/main.cf:
    @@ -35,11 +43,11 @@
    * Reload postfix:
    `sudo service postfix reload`

    ## 4 - Install Thunderbird
    ## 5 - Install Thunderbird

    Ubuntu: `sudo apt-get install thunderbird`

    ## 5 - Configure Thunderbird
    ## 6 - Configure Thunderbird
    * Skip the first welcome screen (click in the button to use existing accounts);
    * Click in the Settings button at top right (similar to Chrome settings) then click on Preferences > Account Settings
    * Under Account Actions choose "Add Other Account"
    @@ -48,7 +56,7 @@
    * Ingoing and Outgoing server will be: localhost
    * Restart (close and reopen) Thunderbird.

    ## 6 - Test Thunderbird
    ## 7 - Test Thunderbird
    * Send new email to `<your-user>@localhost`, replacing `<your-user>` with your user account
    * Click on "Get Mail"
    * Test catch-all: send new email to `averagejoe@localhost`
  14. @raelgc raelgc revised this gist Aug 9, 2013. 1 changed file with 2 additions and 0 deletions.
    2 changes: 2 additions & 0 deletions gistfile1.md
    Original file line number Diff line number Diff line change
    @@ -6,6 +6,8 @@

    Ubuntu: `sudo apt-get install postfix`

    MacOSX: Postfix is already installed by default.

    ## 2 - Configure Postfix to Local only

    * During postfix install process, the configure text dialog will display five options: "No Configurartion", "Internet Site", "Internet with Smarthost", "Satellite Systems", "Local Only".
  15. @raelgc raelgc revised this gist Aug 9, 2013. 1 changed file with 2 additions and 0 deletions.
    2 changes: 2 additions & 0 deletions gistfile1.md
    Original file line number Diff line number Diff line change
    @@ -2,6 +2,8 @@

    ## 1 - Install Postfix

    Fedora/CentOS/RHEL: `sudo yum install postfix`

    Ubuntu: `sudo apt-get install postfix`

    ## 2 - Configure Postfix to Local only
  16. @raelgc raelgc revised this gist Jul 19, 2013. 1 changed file with 3 additions and 2 deletions.
    5 changes: 3 additions & 2 deletions gistfile1.md
    Original file line number Diff line number Diff line change
    @@ -12,8 +12,9 @@

    ## 3 - Configure a Catch-all Address

    * Enabling this, you can use any email address ending with "@localhost".
    * Example: here, my unique account is rael@localhost. But while testing systems, I can use any address like joe@localhost, foo@localhost, etc, because all will be redirected to rael@localhost
    Enabling this, you can use any email address ending with "@localhost".

    Example: here, my unique account is rael@localhost. But while testing systems, I can use any address like joe@localhost, foo@localhost, etc, because all will be redirected to rael@localhost

    * If not exists, create file /etc/postfix/virtual:
    `sudo nano /etc/postfix/virtual`
  17. @raelgc raelgc revised this gist Jul 19, 2013. 2 changed files with 50 additions and 49 deletions.
    50 changes: 50 additions & 0 deletions gistfile1.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,50 @@
    # Setup a Local Only Email Server (Linux, Unix, Mac)

    ## 1 - Install Postfix

    Ubuntu: `sudo apt-get install postfix`

    ## 2 - Configure Postfix to Local only

    * During postfix install process, the configure text dialog will display five options: "No Configurartion", "Internet Site", "Internet with Smarthost", "Satellite Systems", "Local Only".
    * Select "Local Only".
    * For the domain name, use the default suggested and finish the install.

    ## 3 - Configure a Catch-all Address

    * Enabling this, you can use any email address ending with "@localhost".
    * Example: here, my unique account is rael@localhost. But while testing systems, I can use any address like joe@localhost, foo@localhost, etc, because all will be redirected to rael@localhost

    * If not exists, create file /etc/postfix/virtual:
    `sudo nano /etc/postfix/virtual`
    * Add the following content, replacing <your-user> with your user account:
    `@localhost <your-user>`
    * Save and close the file.
    * Configure postifx to read this file:
    * Open /etc/postfix/main.cf:
    `sudo nano /etc/postfix/main.cf`
    * And check if this line is enabled, or add it if not exists:
    `virtual_alias_maps = hash:/etc/postfix/virtual`
    * Activate it:
    `sudo postmap /etc/postfix/virtual`
    * Reload postfix:
    `sudo service postfix reload`

    ## 4 - Install Thunderbird

    Ubuntu: `sudo apt-get install thunderbird`

    ## 5 - Configure Thunderbird
    * Skip the first welcome screen (click in the button to use existing accounts);
    * Click in the Settings button at top right (similar to Chrome settings) then click on Preferences > Account Settings
    * Under Account Actions choose "Add Other Account"
    * Select "Unix Mailspool (Movemail)"
    * Your account will be `<your-user>@localhost` (of course, replace `<your-user>` with your user account). Don't use `<your-user>@(none)`, use `<your-user>@localhost`
    * Ingoing and Outgoing server will be: localhost
    * Restart (close and reopen) Thunderbird.

    ## 6 - Test Thunderbird
    * Send new email to `<your-user>@localhost`, replacing `<your-user>` with your user account
    * Click on "Get Mail"
    * Test catch-all: send new email to `averagejoe@localhost`
    * Click on "Get Mail"
    49 changes: 0 additions & 49 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -1,49 +0,0 @@
    Install Postfix

    Ubuntu: sudo apt-get install postfix

    Configure Postfix to Local only

    During postfix install process, the configure text dialog will display five options: "No Configurartion", "Internet Site", "Internet with Smarthost", "Satellite Systems", "Local Only".
    Select "Local Only".
    For the domain name, use the default suggested and finish the install.

    Configure a Catch-all Address

    Enabling this, you can use any email address ending with "@localhost".
    Example: here, my unique account is rael@localhost. But while testing systems, I can use any address like joe@localhost, foo@localhost, etc, because all will be redirected to rael@localhost

    If not exists, create file /etc/postfix/virtual:
    sudo nano /etc/postfix/virtual
    Add the following content, replacing <your-user> with your user account:
    @localhost <your-user>
    Save and close the file.
    Configure postifx to read this file:
    Open /etc/postfix/main.cf:
    sudo nano /etc/postfix/main.cf
    And check if this line is enabled, or add it if not exists:
    virtual_alias_maps = hash:/etc/postfix/virtual
    Activate it:
    sudo postmap /etc/postfix/virtual
    Reload postfix:
    sudo service postfix reload

    Install Thunderbird

    Ubuntu:
    sudo apt-get install thunderbird

    Configure Thunderbird
    Skip the first welcome screen (click in the button to use existing accounts);
    Click in the Settings button at top right (similar to Chrome settings) then click on Preferences > Account Settings
    Under Account Actions choose "Add Other Account"
    Select "Unix Mailspool (Movemail)"
    Your account will be <your-user>@localhost (of course, replace <your-user> with your user account). Don't use <your-user>@(none), use <your-user>@localhost
    Ingoing and Outgoing server will be: localhost
    Restart (close and reopen) Thunderbird.

    Test Thunderbird
    Send new email to <your-user>@localhost, replacing <your-user> with your user account
    Click on "Get Mail"
    Test catch-all: send new email to averagejoe@localhost
    Click on "Get Mail"
  18. @raelgc raelgc created this gist Jul 18, 2013.
    49 changes: 49 additions & 0 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,49 @@
    Install Postfix

    Ubuntu: sudo apt-get install postfix

    Configure Postfix to Local only

    During postfix install process, the configure text dialog will display five options: "No Configurartion", "Internet Site", "Internet with Smarthost", "Satellite Systems", "Local Only".
    Select "Local Only".
    For the domain name, use the default suggested and finish the install.

    Configure a Catch-all Address

    Enabling this, you can use any email address ending with "@localhost".
    Example: here, my unique account is rael@localhost. But while testing systems, I can use any address like joe@localhost, foo@localhost, etc, because all will be redirected to rael@localhost

    If not exists, create file /etc/postfix/virtual:
    sudo nano /etc/postfix/virtual
    Add the following content, replacing <your-user> with your user account:
    @localhost <your-user>
    Save and close the file.
    Configure postifx to read this file:
    Open /etc/postfix/main.cf:
    sudo nano /etc/postfix/main.cf
    And check if this line is enabled, or add it if not exists:
    virtual_alias_maps = hash:/etc/postfix/virtual
    Activate it:
    sudo postmap /etc/postfix/virtual
    Reload postfix:
    sudo service postfix reload

    Install Thunderbird

    Ubuntu:
    sudo apt-get install thunderbird

    Configure Thunderbird
    Skip the first welcome screen (click in the button to use existing accounts);
    Click in the Settings button at top right (similar to Chrome settings) then click on Preferences > Account Settings
    Under Account Actions choose "Add Other Account"
    Select "Unix Mailspool (Movemail)"
    Your account will be <your-user>@localhost (of course, replace <your-user> with your user account). Don't use <your-user>@(none), use <your-user>@localhost
    Ingoing and Outgoing server will be: localhost
    Restart (close and reopen) Thunderbird.

    Test Thunderbird
    Send new email to <your-user>@localhost, replacing <your-user> with your user account
    Click on "Get Mail"
    Test catch-all: send new email to averagejoe@localhost
    Click on "Get Mail"