Giter Site home page Giter Site logo

Additional custom folders about dockerized HOT 5 CLOSED

iredmail avatar iredmail commented on August 10, 2024
Additional custom folders

from dockerized.

Comments (5)

iredmail avatar iredmail commented on August 10, 2024
  1. www --> for custom web pages/scripts which can be referenced from custom nginx configs (e.g. for the mail autoconfig script)

In iRedMail Easy, we have custom directories for Nginx like this:

nginx /                 # This is /opt/iredmail/custom/nginx/
    |- conf-enabled/    # config snippet loaded in `http {}` block.
    |- sites-enabled/   # config files for custom virtual hosts
    |- custom.sh        # (Bash) shell script for advanced customization.
                        # e.g. you can remove files in /etc/nginx/ to avoid duplicate parameters.

Would you like me to introduce this directory structure in Docker edition too?

  1. cron.d --> for custom cronjobs (e.g. I have a backup-mx script to sync the domains and mail addresses with another server)
  • How are you going to use this directory?
  • How about add a cron file and append it to root's cron job list? e.g. /opt/iredmail/custom/cron/root.cron. We already have volume for /opt/iredmail/custom.
  1. scripts --> for custom scripts (e.g. the backup-mx sync script from 2.)

How about detect and run (Bash) script /opt/iredmail/custom/custom.sh each time the container runs? Again, we already have volume for /opt/iredmail/custom.

from dockerized.

mibuthu avatar mibuthu commented on August 10, 2024

Thanks for your reply.
Ah, I didn't noticed that the custom volume is one folder inside the container.
So additional folders can be created there, and these folders will be available in the container.
In my opinion this is sufficient for the 1st and 3rd point above, so no change is required.

Regarding the cronjobs:

How are you going to use this directory?

I thought it would be good to include a directory similar to /etc/cron.d where custom cronjobs can be added. But it seems that this is not possible and also /etc/cron.d is not available in alpine linux.

How about add a cron file and append it to root's cron job list? e.g. /opt/iredmail/custom/cron/root.cron. We already have volume for /opt/iredmail/custom.

I my opinion that would be great.
But is that possible? In my quick search regarding crontab in alpine linux I didn't found a solution for that.

An alternative would be to add the cronjobs in the host system and call the script inside the container from there.

from dockerized.

mibuthu avatar mibuthu commented on August 10, 2024

An off-topic question regarding autoconfig:
There is an nginx-template available (see /etc/nginx/templates/autoconfig.tmpl).
But the referenced files /opt/www/autoconfig/autoconfig.php and /opt/www/autoconfig/autodiscover.php are not available.
Wouldn't it be good to include these scripts within iredmail?

from dockerized.

iredmail avatar iredmail commented on August 10, 2024

But is that possible? In my quick search regarding crontab in alpine linux I didn't found a solution for that.

We runs cron daemon with supervisord, so cron service is running inside the container.

An alternative would be to add the cronjobs in the host system and call the script inside the container from there.

How often should we call this script? This should leave to crond.

An off-topic question regarding autoconfig:
There is an nginx-template available (see /etc/nginx/templates/autoconfig.tmpl).
But the referenced files /opt/www/autoconfig/autoconfig.php and /opt/www/autoconfig/autodiscover.php are not available.
Wouldn't it be good to include these scripts within iredmail?

No plan yet. autodiscover is slowly retired by Microsoft, Office 365 is not supported by this autodiscover implementation. (365 looks for a JSON file, but we have XML file).

from dockerized.

mibuthu avatar mibuthu commented on August 10, 2024

Thanks for your reply.

How often should we call this script? This should leave to crond.

If it is not possible to specify custom times then the only reasonable times are the common hourly, daily, weekly in my opinion.
I think for my use case I will then use the system cron instead and call the scripts inside the container from there.

No plan yet. autodiscover is slowly retired by Microsoft, Office 365 is not supported by this autodiscover implementation. (365 looks for a JSON file, but we have XML file).

O.k., thanks for the information regarding autodiscover, so I think I will also remove it from my installation soon.
Probably it then should also be removed from the nginx templates in iredmail in one of the next version.

But what about autoconfig? I my opinion it is supported by many clients and is a huge benefit when setting up an account.

from dockerized.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.