• Hi, Pleskians! We are running a UX testing of our upcoming product intended for server management and monitoring.
    We would like to invite you to have a call with us and have some fun checking our prototype. The agenda is pretty simple - we bring new design and some scenarios that you need to walk through and succeed. We will be watching and taking insights for further development of the design.
    If you would like to participate, please use this link to book a meeting. We will sent the link to the clickable prototype at the meeting.
  • Our UX team believes in the in the power of direct feedback and would like to invite you to participate in interviews, tests, and surveys.
    To stay in the loop and never miss an opportunity to share your thoughts, please subscribe to our UX research program. If you were previously part of the Plesk UX research program, please re-subscribe to continue receiving our invitations.
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.

command line mail in chroot

SeanieR

New Pleskian
Is there any way for a client to use command line mail in a script.
Client has ssh access via chromed environment.

Wants their script to be able to send an email on completion.

Any suggestions on how to achieve this?
plesk 12 on Centos6.6

thanks
Seanie
 
Don't know specifically through command line, but a workaround could be create a user, load the script and set crono to run it throught plesk's control panel - using this new user - where an email can be sent every time the script is run.

Regards
 
Of-course it's possible!!!
The basic PHP mail function still works through SHELL + you have SendMail + They can also use SMTP ..
 
Of-course it's possible!!!
The basic PHP mail function still works through SHELL + you have SendMail + They can also use SMTP ..
Hi Abdi

Can you help a bit more please on this?
To give more details from my end, the client has created a bash script to parse a log file, lookup a record and then send off a custom email to a user. They are not using php, so don't think i can suggest that to them, unless its a last option.
They want to be able to use something like this in the bash script:
mail -s 'test subject' -r '[email protected]' [email protected] < msgfile.txt

When you say they have sendmail, what do you mean here? Sendmail is not available in a chroot env. And how can they use SMTP?

Thanks for the help.
Seanie
 
hi
Thanks for the suggestions. Unfortunately, sendemail will not work as it needs perl :
bash: ./sendEmail: /usr/bin/perl: bad interpreter: No such file or directory

I will check out the other suggestions.

Is there any way to add command line mail via the chroot_update.sh script?

thanks
 
Back
Top