ddavness / power-mailinabox

A Mail-in-a-Box with extra capabilities and more customizability. Not just for power users!
Creative Commons Zero v1.0 Universal
168 stars 31 forks source link

Incorporate Mail in Nextcloud #122

Open capitancurt opened 1 year ago

capitancurt commented 1 year ago

My experience is that jailbreaking the admin doesn't help. All available mail apps in Nextcloud refuse to connect or are rejected by the imap server (and presumably smtp as well).

Would it be possible to incorporate one of the mail apps in the standard distro (preferably the default mail app), so that users have only to log into the nextcloud panel to have full functionality?

ddavness commented 1 year ago

Hmmmmm... I get where you're coming from; however I'm not exactly sure how to feel about piling more stuff on to the Nextcloud installation at this point in time.

capitancurt commented 8 months ago

Okay, I can see how you may want to avoid that. Could be a little than you want to deal with.


For those of us who need it, and aren't going to run too many or too large a box, here is my solution....

--==INITIALIZE ADMIN USER PROFILE==-- browse to http://[lanip]/cloud Log out

--==CREATE ADMIN.SH==--

sudo nano admin.sh

--==PASTE INTO ADMIN.SH==--

!/bin/bash

This script will give you administrative access to the Nextcloud

instance running here.

Run this at your own risk. This is for testing & experimentation

purpopses only. After this point you are on your own.

source /etc/mailinabox.conf # load global vars

ADMIN=$(management/cli.py user admins | head -n 1) test -z "$1" || ADMIN=$1

echo I am going to unlock admin features for $ADMIN. echo You can provide another user to unlock as the first argument of this script. echo echo WARNING: you could break mail-in-a-box when fiddling around with Nextcloud\'s admin interface echo If in doubt, press CTRL-C to cancel. echo echo Press enter to continue. read

sudo -u www-data php /usr/local/lib/owncloud/occ group:adduser admin "$ADMIN" && echo Done.

--==UNLOCK ADMIN==--

sudo bash admin.sh [ADMINACCOUNT@FQDN.com]

--==ADD NEXTCLOUD APPS==-- Log into admin profile and add these apps Mail Notes Photos

--==REROUTE DEFAULT HTML TO CLOUD==-- make copy of index.html and edit

su root

cd/home/user-data/www/default

mv index.html index.html.bak

(verify file renamed to backup copy)

ls

nano index.html

--==PASTE INTO INDEX.HTML==--

[FQDN HUMAN NAME]

--==ENABLE MAIL CLIENT IN NEXTCLOUD==-- In home/user-data/owncloud/config.php add these lines between end of 'arguments' array and 'memcache.local'...

'app.mail.verify-tls-peer' => false, 'allow_local_remote_servers' => true,

--==VERIFY FIREWALL PORTS==--

sudo ufw status numbered

--==REBOOT==--

sudo reboot -n