DEV Community

David Velho
David Velho

Posted on • Originally published at gist.github.com

1 2

Not so pro tips for mail-in-a-box users

Disclaimer: I am in no way a professional. I'm just a student who has had the (un)fortunate experience of maintaining a mailinabox server. I thought i would share my experiences along the way so that i may save some time for those looking for it.
I've used DigitalOcean here , but similar steps can be followed with your cloud provider of choice.

I want to move Mail-in-a-box to another Digital Ocean account (The Shortcut, but not recommended)

  • If you have any important data, be sure to always keep a backup
  • Create a snapshot of your droplet (you can power off the droplet after the snapshot)
  • Change the owner of your snapshot, see this guide
  • Resume the transferred snapshot
  • Change the DNS records to point to the new droplet
  • Log into the web admin panel at /admin . If there are no errors, everything is good. If there are errors (red text), re-install Mail-in-a-box

How do i re-install Mail-in-a-box ? (Unofficial, however, this should work in most cases)

  • Delete the mailinabox directory commonly located at ~/mailinabox
  • Rename the /etc/nginx/conf.d/local.conf to /etc/nginx/conf.d/local.conf.deleted if you would want a copy - Rename the /etc/nginx/conf.d/ssl.conf to /etc/nginx/conf.d/ssl.conf.deleted if you want to keep a copy - Restart nginx systemctl reload nginx . - Run the installer from the official website and once its done, everything should continue to work as normal.

BCC-ing people: (credits namsnath )

BCC all mails sent to a given address:

  • nano /etc/postfix/main.cnf
  • add to the end: sender_bcc_maps = hash:/etc/postfix/sender_bcc_maps
  • nano /etc/postfix/sender_bcc_maps
  • Add lines in this format: <sender@email.com> <bcc@email.com>

BCC all mails recieved on a given address:

  • nano /etc/postfix/main.cnf
  • add to the end: recipient_bcc_maps = hash:/etc/postfix/recipient_bcc_maps
  • nano /etc/postfix/recipient_bcc_maps
  • Add lines in this format: <recipient@email.com> <bcc@email.com>

Fancy Skins:

Heroku

Simplify your DevOps and maximize your time.

Since 2007, Heroku has been the go-to platform for developers as it monitors uptime, performance, and infrastructure concerns, allowing you to focus on writing code.

Learn More

Top comments (0)

Image of Docusign

🛠️ Bring your solution into Docusign. Reach over 1.6M customers.

Docusign is now extensible. Overcome challenges with disconnected products and inaccessible data by bringing your solutions into Docusign and publishing to 1.6M customers in the App Center.

Learn more