From owner-freebsd-questions@FreeBSD.ORG Tue Sep 23 01:06:10 2008 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3D6B8106566B for ; Tue, 23 Sep 2008 01:06:10 +0000 (UTC) (envelope-from gfazio@n3gqf.us) Received: from QMTA07.emeryville.ca.mail.comcast.net (qmta07.emeryville.ca.mail.comcast.net [76.96.30.64]) by mx1.freebsd.org (Postfix) with ESMTP id 1916B8FC20 for ; Tue, 23 Sep 2008 01:06:10 +0000 (UTC) (envelope-from gfazio@n3gqf.us) Received: from OMTA03.emeryville.ca.mail.comcast.net ([76.96.30.27]) by QMTA07.emeryville.ca.mail.comcast.net with comcast id Hmfv1a0080b6N64A70q5Su; Tue, 23 Sep 2008 00:50:05 +0000 Received: from mail.lunaticcafe.us ([76.117.49.207]) by OMTA03.emeryville.ca.mail.comcast.net with comcast id J0q31a0024UDAGk8P0q4eB; Tue, 23 Sep 2008 00:50:04 +0000 X-Authority-Analysis: v=1.0 c=1 a=WxYKXQ1dUd8A:10 a=ADXB5-GtkkcA:10 a=lkMxy8epBGpEqgrACvIA:9 a=Jw3J0qwAYRMLNQoJVl4A:7 a=-MBlWonKr9hw-bJx7LgMOQt4rekA:4 a=oltf0pfCdT4A:10 Received: from [10.42.69.30] (gf-xp3200.lunaticcafe.us [10.42.69.30]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: djdagan) by mail.lunaticcafe.us (Postfix) with ESMTPSA id DE77F3F42F; Mon, 22 Sep 2008 20:50:13 -0400 (EDT) Message-ID: <48D83E06.2050005@n3gqf.us> Date: Mon, 22 Sep 2008 20:53:26 -0400 From: George Fazio User-Agent: Thunderbird 2.0.0.16 (Windows/20080708) MIME-Version: 1.0 To: Da Rock References: <1222072176.4625.48.camel@laptop1.herveybayaustralia.com.au> In-Reply-To: <1222072176.4625.48.camel@laptop1.herveybayaustralia.com.au> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-questions@freebsd.org Subject: Re: Postfix, maildir's, and writing filters X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Sep 2008 01:06:10 -0000 Da Rock wrote: > Howdy. This may seem simple, but I'm completely green on this: I have a > postfix server with a courier-imap client frontend using maildir's. I'm > using imap for an internal mta, but I need to setup a system which > retains copies of sent emails on the network and not on individual > workstations (which is what happens currently). > When you say courier-imap client, do you mean you're using maildrop to deliver the message to the user's maildir or that there is an end-user courier-imap client? I am only familiar with the maildrop piece of courier. > I've looked at some of the solutions (bcc and send to a psuedo account > for each user, bcc to the user and filter the incoming mail on this) but > it seems like a very roundabout way of doing things. I've read up on > Postfix, and there is support for custom filters, so: > 1. what does it take to write one? > 2. how does one copy email from one folder to another in maildirs? Is it > possible? > > This is a classic case of over engineering. You do not want to bcc back to the user, or filter the mta, just move the outgoing messages to the sent folder. You might need bcc for the purposes of journaling all email, if you have any legal requirement (sox, hippa, etc.) that require it. But, that it another ball of wax entirely. > This idea I have should filter the outgoing mail and copy the messages > to the sent folder as well as retaining its place in the queue. > > If the end-user's client is using imap and configured properly, it should do this for you. Thurderbird, the full version of Outlook (and probably Express), and many other clients support this natively - you just have to make sure the client is configured to do that. Typically, in the configuration of the client, there is something that says something like "save a copy of sent messages to ". I don't know what client you're using. I use Pine/Alpine, Thunderbird, and Outlook (when I have no other choice). If the end-user's client is using pop, then you have a problem that may require a custom solution like you speak of above. > Any ideas? Maybe a link to some good info? I would like to know how to > do this myself so I can do more in the future so info and pointers would > be great (if you have a script you'd like to share then please show me > how it works :) ). > > Cheers > > My mail system is running postfix (mta) w/ dovecot (for imap or pop access from the clients), maildrop (for delivering to a maildir), and amavis-new (for spam filtering and virus scanning w/ clamav). My mail clients are configured for imap, and they save copies of sent mail to the sent folder as expected. While I am using dovecot, and not courier, for my imap server - I cannot imagine that any other imap server would handle things any differently ... it's core functionality that ever imap server should have imho. -George