Comments (12)
Postfix is not supported in Vesta.
Yes, everything is possible if you modify vesta scripts... but on next myVesta update your modified scripts will be overwitten... so... not good idea... except if you make your own fork.
Why not call sudo /usr/local/vesta/bin/v-add-mail-account
from your PHP code instead to add mysql row?
Yes, in that case you need to remove shell_exec
from disabled_functions in php.ini
from vesta.
Fun fuct:
- you can remove
disable_functions
from in php.ini - and move
disable_functions
one level down, in pool.d config files - in domain that you need
shell_exec
just removeshell_exec
fromdisable_functions
(it can be some subdomain dedicated only for work with Vesta commands)
Bonus pack:
- php scripts in /usr/local/vesta/web/custom/ folder WILL NOT be overrided nor removed.
So you can also put script under the myVesta, just you will have php 5.6 :)
shell_exec
is enabled there.
from vesta.
Third solution - you can send POST request (from your PHP) to https://yourhost:8083/api/index.php π
Just first enable it - https://wiki.myvestacp.com/index.php?title=Why_API_is_not_working%3F
from vesta.
exec ("VESTA=/usr/local/vesta && export VESTA && sudo /usr/local/vesta/bin/v-list-mail-accounts admin domain.com", $output, $return_var);
tested, works π
from vesta.
ya you right , i was also thinking of enabling shell_exec
and calling vesta cli
from vesta.
thanks for amazing tips :) vesta is big world we need to keep it exploring and building it .
from vesta.
great :)
from vesta.
i tried to call vesta command from web root like
exec ("sudo /usr/local/vesta/bin/v-list-mail-accounts "admin domain.com, $output, $return_var);
and getting blank response
Array ( [0] => ACCOUNT ALIAS FWD DISK DATE [1] => ------- ----- --- ---- ---- )
however the same script when i run from ssh bash shell as root like php myscript.php
i get correct output of all mail accounts on terminal ,
so looks like when executed under apache php-fpm there is permission issue.
i have chroot enabled so do u think its issue ? i had created link of that vesta command to web root so that can be execute in webroot but no success same blank response.
updated : tested on another server with no chroot , same issue blank response
from vesta.
maybe issue with $VESTA env variablle.
try:
exec ("source /etc/profile && PATH=$PATH:/usr/local/vesta/bin && export PATH && sudo /usr/local/vesta/bin/v-list-mail-accounts admin domain.com", $output, $return_var);
from vesta.
maybe issue with $VESTA env variablle.
try:
exec ("source /etc/profile && PATH=$PATH:/usr/local/vesta/bin && export PATH && sudo /usr/local/vesta/bin/v-list-mail-accounts admin domain.com", $output, $return_var);
its returning blank array and 127 code in $output, $return_var
Array ( ) 127
from vesta.
is that domain/subdomain under admin account?
from vesta.
from vesta.
Related Issues (20)
- update Roundcube Webmail 1.6.1 HOT 2
- feat req: considering change the dovecrak and eximload to courier suite
- change phpmyadmin by admine to support postgresql and mysql in same interface
- multiphp repos only points to php surys crap, so older debian will fails HOT 2
- mysql raised minor error notice Cant connect to local MySQ
- php configurations buttons points to 404 not found
- deprecated nginx configuration for ssl
- Whatβs the answer to the forum security question?
- Backup Restore Failed [Urgent]
- SFTP Accounts not listing files
- Using email relay as a domain for websitte
- Feature Request: Quick info about banned IP at Fail2Ban list (Host/Banlist/Location) HOT 2
- rename the project from vesta or myvesta
- Auto renew Lets Encrypt SSL broke custom Nginx config HOT 1
- Forum - Unable to register
- phppgadmin is not in the debian repo
- Debian 12.6 MultiPHP install error: unable to locate package php5.6* HOT 3
- error in awstats.tpl
- The password that I specified was NOT used for my admin user
- why sudo?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vesta.