View Single Post
Old 23rd May 2012, 00:03
dar_ek dar_ek is offline
Junior Member
Join Date: Oct 2010
Posts: 17
Thanks: 1
Thanked 3 Times in 2 Posts

Originally Posted by ethraza View Post
First case: <Send copy to>

What happens:
1- a@ reach it's quota limit
2- Everytime postfix try to delivery a email to a@, in the mail.log we will see "Permission denied maildrop: maildir over quota."
3- A copy of this email is sent over to b@
4- Now b@ have a bunch of duplicated emails and they will keep coming till someone clean a@ inbox.

There is a way to "fix" that?
One of solve is to remember what mail we send to CC.
To do this we must generate to ".mailfilter" not only this line:
cc "!"
(that actually ISPconfig do)
but eg. this code:

`reformail -D 8000 /var/vmail/mailfilters/$HOST/$USER/.duplicate.cache`
if ( $RETURNCODE != 0 )
        cc "!"
reformail is a part of courier-maildrop package. -D option do a "Detecting duplicate messages". Thats means that ID's of messages thats already was send (and notified in our .duplicate.cache file are detected and does not resend (cc) on re-queue.

Patch ISPconfig /usr/local/ispconfig/server/plugins-available/ file:

Change line:
$mailfilter_content .= "cc \"!".$data["new"]["cc"]."\"\n";
To this part:

                     $mailfilter_content .= "USER=tolower(\"\$3\")\n";
                     $mailfilter_content .= "HOST=tolower(\"\$4\")\n";
                     $mailfilter_content .= "`reformail -D 8000 /var/vmail/mailfilters/\$HOST/\$USER/.duplicate.cache`\n";
                     $mailfilter_content .= "if ( \$RETURNCODE != 0 )\n";
                     $mailfilter_content .= "\tcc \"!".$data["new"]["cc"]."\"\n";
(and recreate CC file if already exists)
Maybe Till do this in distro?


Last edited by dar_ek; 23rd May 2012 at 00:15.
Reply With Quote