V
varet
Guest
Hi ppl,
I have a strange problem, when i create an e-mail account with mailbox, sometimes (half of them) missing a line on .qmail file!
This line is sending mails to null! (and i have missing mails)
The missing line is:
I have created the following script in order to fix the problem!
Can someone help me with this issue?
Script:
I have a strange problem, when i create an e-mail account with mailbox, sometimes (half of them) missing a line on .qmail file!
This line is sending mails to null! (and i have missing mails)
The missing line is:
| /usr/bin/deliverquota ./Maildir
I have created the following script in order to fix the problem!
Can someone help me with this issue?
Script:
#!/bin/sh
grep=/bin/grep
find /var/qmail/mailnames/ | grep /.qmail > result
sed '/.qmail-default/d' result >result2
echo > semifinalresult
for sitestoexport in `cat result2`
do
echo `grep deliverquota $sitestoexport` $sitestoexport >> semifinalresult
done
sed '/deliverquota/d' semifinalresult > finalresult
maildomainlist=`cat finalresult | awk 'FS="/" { print $6 "@" $5 }'`
for maildirs in $maildomainlist
do
mailbox=`/usr/local/psa/bin/mail -i $maildirs | grep Mailbox`
echo $mailbox
echo "Fixed $maildirs"
echo Fixed $maildirs >> fixed
/usr/local/psa/bin/mail -u $maildirs -mailbox false
/usr/local/psa/bin/mail -u $maildirs -mailbox true