LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 09-10-2019, 08:32 AM   #1
l0f4r0
Member
 
Registered: Jul 2018
Location: Paris
Distribution: Debian
Posts: 852

Rep: Reputation: 286Reputation: 286Reputation: 286
Question quotacheck & mail incompatibility


Hello,

Here is a mystery.
My script is the following:
Code:
#!/bin/bash
set -xv
quota_report=$(mktemp)
{ quotaoff -va && quotacheck -vafmn; quotaon -va; } &>$quota_report
mail -s "[QUOTA] [$(uname -n)] Mise  jour des quotas" "root@localhost" <"$quota_report"
echo "rc=$?"
Output seems ok, temporary file is created and its content is OK but NO email is sent (I have nothing in inbox, spam or any folder).
Quote:
Originally Posted by output
quota_report=$(mktemp)
++ mktemp
+ quota_report=/tmp/tmp.tmZYsMCkLp
echo "quota_report=$quota_report"
+ echo quota_report=/tmp/tmp.tmZYsMCkLp
quota_report=/tmp/tmp.tmZYsMCkLp
{ quotaoff -va && quotacheck -vafmn; quotaon -va; } &>$quota_report
mail -s "[QUOTA] [$(uname -n)] Mise jour des quotas" "root@localhost" <"$quota_report"
++ uname -n
+ mail -s '[QUOTA] [MDSSRV001] Mise jour des quotas' root@localhost
echo "rc=$?"
+ echo rc=0
rc=0
Quote:
Originally Posted by /tmp/tmp.tmZYsMCkLp
+ quotaoff -va
/dev/sda1 [/]: user quotas turned off
/dev/sda5 [/home]: user quotas turned off
+ quotacheck -vafmn
quotacheck: Scanning /dev/sda1 [/] quotacheck: Old group file name could not been determined. Usage will not be subtracted.
quotacheck: Checked 20766 directories and 217679 files
quotacheck: Scanning /dev/sda5 [/home] done
quotacheck: Old group file name could not been determined. Usage will not be subtracted.
quotacheck: Checked 488 directories and 1351 files
done
+ quotaon -va
/dev/sda1 [/]: user quotas turned on
/dev/sda5 [/home]: user quotas turned on
If I just modify:
Code:
{ quotaoff -va && quotacheck -vafmn; quotaon -va; } &>$quota_report
into:
Code:
{ quotaoff -va; quotaon -va; } &>$quota_report
Mail is sent as expected initially.
quotacheck seems to be problematic for mail...

Can somebody explain me this behavior please?
Thanks in advance

PS: how can I inspect mail logs with journalctl please? I'm using exim4

Last edited by l0f4r0; 09-10-2019 at 08:55 AM.
 
Old 09-12-2019, 01:59 AM   #2
MadeInGermany
Senior Member
 
Registered: Dec 2011
Location: Simplicity
Posts: 1,179

Rep: Reputation: 533Reputation: 533Reputation: 533Reputation: 533Reputation: 533Reputation: 533
One question:
what is the purpose of running quotacheck?
It is high stress for the disk.
 
  


Reply

Tags
mail;


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
chkconfig & quotacheck slackware07 Fedora 0 05-15-2006 08:27 PM
Ph&#7909;c h&#7891;i d&#7919; li&#7879;u b&#7883; m&#7845;t???, c&#7913; pollsite General 1 06-27-2005 12:39 PM
quotacheck command not found richlawson Mandriva 1 11-30-2003 01:48 PM
Gotta love those &#1649;&#1649;&#1649;&#1649;&#1649;&#1649;&#1649;&# iLLuSionZ Linux - General 5 11-18-2003 07:14 AM
Quotacheck? mikeshn Linux - General 1 06-07-2003 01:41 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 05:08 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration