• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion
  • Inviting everyone to the UX test of a new security feature in the WP Toolkit
    For WordPress site owners, threats posed by hackers are ever-present. Because of this, we are developing a new security feature for the WP Toolkit. If the topic of WordPress website security is relevant to you, we would be grateful if you could share your experience and help us test the usability of this feature. We invite you to join us for a 1-hour online session via Google Meet. Select a convenient meeting time with our friendly UX staff here.

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