• We value your experience with Plesk during 2024
    Plesk strives to perform even better in 2025. To help us improve further, please answer a few questions about your experience with Plesk Obsidian 2024.
    Please take this short survey:

    https://pt-research.typeform.com/to/AmZvSXkx
  • 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.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

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