It is necessary to write a bash script for Ubuntu 22.04 that should run on a clean OS and perform the following tasks without user involvement:
Initial conditions: the user uploads text files with data on domains, mailboxes, and IPs to /root:
- domains.txt - a list of domain names that need to be registered on the server, as well as the IP for each domain.
- mailbox.txt - a list of mailboxes that need to be created for each domain.
- mailpass.txt - the password for the created mailboxes (one common password for all).
- site.zip - an archive whose contents need to be unpacked into the root of each domain.
Task of the script:
- Register the domains on the server with their IPs. Unpack the zip archive into the root of each domain.
- The domains should work through the regular HTTP protocol. SSL is not needed. Install Apache and PHP version 5.6.
- Create the necessary mailboxes from the mailbox.txt list on behalf of each domain with the password from mailpass.txt.
- Generate private and public DKIM keys for each domain (for this task, there is already a separate bash script example that generates keys and creates private and public keys in separate txt files for each domain). You can use this ready-made bash, integrate it into a single bash script, or write it separately.
- Install and configure a mail SMTP server based on Exim (or any other) that can send mail.
- Install a mail client to access any mailbox (for example, Roundcube, or any other that allows browser access through authorization to check incoming mail).
- Install MySQL database server 10.3.
Nginx proxy server is NOT needed! It should work through the .htaccess file.
P.S> There is already a separate bash script for creating and making necessary records in DNS for working with DNSmanager from ISPsystem. No operations with DNS need to be written.
Final result of the execution: each domain opens in the browser via http and displays the contents of the unpacked zip archive. It is possible to log in to the mail client at a separate address and check the contents of the selected mailbox. The ability to send mail on behalf of any mailbox when connecting to SMTP through an external mail program.
IMPORTANT: after launching, the script must run automatically without further user involvement. That is, there should not be any dialogs like "Do you want this - click here." That is, if the installation of some module is performed, it happens automatically without additional user intervention.
Work through "safe" and only with the direct performer without intermediaries (companies, teams, etc.)
Please indicate the budget and deadlines in your proposals immediately.