Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > HOWTO-Related Questions

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 24th January 2008, 08:48
thecaoticone thecaoticone is offline
Member
 
Join Date: Nov 2007
Posts: 89
Thanks: 1
Thanked 18 Times in 16 Posts
Default Gutsy Postfix quota email fixed

I finally found my notes with the fix for the empty quota E-mails.

Gutsy is now working.

Make this change to your /etc/postfix/main.cf

change:
virtual_mailbox_extended = yes

to:
virtual_maildir_extended = yes

then reload postfix.

For a fresh install, send a test e-mail to your account. ( I used an attachment that was more than 1% of my quota. )

then login to the server as root and do:
/usr/local/sbin/quota_notify


You should now have an e-mail listing all users at 1% or more and the percentage of the quota used.

You may need to delete the /user/maildirsize file and let Postfix replace it when a new e-mail arrives.

This solution might work for Edgy & Feisty servers that are already running.
I can not promise this as I have not tested it.



It's amazing how one little change can make a difference.

One down side I have found, if I delete a message in a pop3 client it will not remove the message from the server. This I have to do with an imap client like Squirrelmail. Once deleted with the imap client the quota is updated. (this may just be a setting in my pop3 client )

Last edited by thecaoticone; 24th January 2008 at 13:16.
Reply With Quote
Sponsored Links
  #2  
Old 25th January 2008, 06:13
thecaoticone thecaoticone is offline
Member
 
Join Date: Nov 2007
Posts: 89
Thanks: 1
Thanked 18 Times in 16 Posts
Default pop3 client update

The problem with deleting messages via pop3 client was the developers felt the need to change a few things in Thunderbird 2.0

All is well now!
Reply With Quote
  #3  
Old 25th January 2008, 15:30
volksman volksman is offline
Senior Member
 
Join Date: May 2007
Posts: 124
Thanks: 2
Thanked 16 Times in 14 Posts
Default

Well here's the weird thing. I wrote that little script to manually build the maildirsize file on my system. I checked my maildirsize file before I made the above change and it was in the correct format (IE postfix or something else had modified it). Regardless I made the change to the config (box to dir) and restarted postfix. Sent myself an e-mail and nothing changed in the file. Deleted the file to let postfix re-create it (after sending myself a test). It did not.

So I ran my maildirfix script again and it created the maildirsize file. Sent myself an e-mail and Postfix updated the maildirsize file!?!

Something is weird here.....
Reply With Quote
The Following User Says Thank You to volksman For This Useful Post:
feeninuoumn (1st January 2014)
  #4  
Old 25th January 2008, 17:29
thecaoticone thecaoticone is offline
Member
 
Join Date: Nov 2007
Posts: 89
Thanks: 1
Thanked 18 Times in 16 Posts
Default

Okay, attached below is my main.cf file. The only thing I changed was the "box to dir".

The steps I took were:

1) box to dir

2) /etc.init.d/postfix reload

3) cd /home/vmail/domain.com

4) rm -rf user/maildirsize

5) send an email to user

6) nano user/maildirsize (made sure it was replaced)

7) /usr/local/sbin/quota_notify

8) received quota email

DAILY QUOTA REPORT:

----------------------------------------------
| % USAGE | ACCOUNT NAME|
----------------------------------------------
| 4 | user@domain.com |
---------------------------------------------

--
domain


main.txt

Last edited by thecaoticone; 26th January 2008 at 18:38.
Reply With Quote
The Following User Says Thank You to thecaoticone For This Useful Post:
AbannyvabVask (20th December 2013)
  #5  
Old 25th January 2008, 18:00
volksman volksman is offline
Senior Member
 
Join Date: May 2007
Posts: 124
Thanks: 2
Thanked 16 Times in 14 Posts
Default

What is the ownership and privs on your maildirsize files?
Reply With Quote
The Following 2 Users Say Thank You to volksman For This Useful Post:
AbannyvabVask (20th December 2013), feeninuoumn (23rd December 2013)
  #6  
Old 26th January 2008, 04:06
thecaoticone thecaoticone is offline
Member
 
Join Date: Nov 2007
Posts: 89
Thanks: 1
Thanked 18 Times in 16 Posts
Default File Permissions

Here is the result "ls -l" on one my regular users.

-rw------- 1 vmail vmail 21 2008-01-25 20:43

One thing I caught in you first response:

"Deleted the file to let postfix re-create it (after sending myself a test). It did not."

Sorry if I did not explain it clearly, but you need to delete the maildirsize file before sending the test e-mail. Then after the e-mail arrives, check to see if Postfix re-created the maildirsize file.

If we can get Postfix to create the file, then it should update when mail arrives to / removed from the server.

The problem I had was Postfix failed to create the file at all, which seems to be the same problem you are having.

Last edited by thecaoticone; 26th January 2008 at 05:57.
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

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 On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Postfix Quota Notification Email Script asyadiqin Installation/Configuration 14 23rd July 2010 13:35
Postfix Email Delivery Problem sedat1903 HOWTO-Related Questions 2 22nd December 2008 11:19
postfix myysql quota 40esp Server Operation 9 26th July 2008 11:33
Centos 4.4 32bit Hangs, High Server load 3cwired_com Server Operation 11 16th November 2006 15:47
Verify email setup meekish Installation/Configuration 28 27th October 2006 15:36


All times are GMT +2. The time now is 16:55.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.