How To: Send email from one Cloudron that can't via another that can!
Since I had to set this up twice recently, I thought I'd jot it down.
The use case is as follows: A home based Cloudron is installed on a dynamic IP and a dynamic DNS, and the IP is often blacklisted or worse.
So how do we get emails out from this Cloudron to it's users and keep the admins informed?
One could sign up for a commercial email service to send email on your behalf.
Or one could ask a friend with another Cloudron to send emails for you! ( make friends, get emails )
Overview, we want emails from cloudron.home to be sent via cloudron.mail who can send emails w/o issue, so we set up the following on the destination:
- a user for cloudron.home on cloudron.mail
- cloudron.home domain on cloudron.mail as manual provider
- enable email for cloudron.home & create mailbox for the user of cloudron.home
- enable masquerading in email settings
On the source set up the following:
- enable email & set the outbound as an external SMTP server.
- use the user & email client port settings created on the destination for auth to the mail server
- set the MX record for cloudron.home to point to cloudron.mail
Now when any mail is sent from cloudron.home, it will log into cloudron.mail and drop its payload, then cloudron.mail picks it up and sends it on to the final destinations as the sender (any email@example.com).