From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1Rzt6K-0006of-D8 for garchives@archives.gentoo.org; Tue, 21 Feb 2012 17:02:04 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id C8092E13D3; Tue, 21 Feb 2012 17:01:53 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 35274E1185 for ; Tue, 21 Feb 2012 17:00:53 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp.gentoo.org (Postfix) with ESMTP id B500D1B401B for ; Tue, 21 Feb 2012 17:00:52 +0000 (UTC) X-Virus-Scanned: by amavisd-new using ClamAV at gentoo.org X-Spam-Flag: NO X-Spam-Score: -2.577 X-Spam-Level: X-Spam-Status: No, score=-2.577 tagged_above=-999 required=5.5 tests=[AWL=-1.568, BAYES_00=-1.9, DKIM_ADSP_CUSTOM_MED=0.001, FREEMAIL_FROM=0.001, FSL_RCVD_USER=0.001, NML_ADSP_CUSTOM_MED=0.9, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01] autolearn=no Received: from smtp.gentoo.org ([127.0.0.1]) by localhost (smtp.gentoo.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Xp4zgpMdwInZ for ; Tue, 21 Feb 2012 17:00:47 +0000 (UTC) Received: from plane.gmane.org (plane.gmane.org [80.91.229.3]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id BF16B1B4021 for ; Tue, 21 Feb 2012 17:00:43 +0000 (UTC) Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1Rzt4x-0000LS-OJ for gentoo-user@gentoo.org; Tue, 21 Feb 2012 18:00:39 +0100 Received: from dsl.comtrol.com ([64.122.56.22]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 21 Feb 2012 18:00:39 +0100 Received: from grant.b.edwards by dsl.comtrol.com with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 21 Feb 2012 18:00:39 +0100 X-Injected-Via-Gmane: http://gmane.org/ To: gentoo-user@lists.gentoo.org From: Grant Edwards Subject: [gentoo-user] Re: Looking for IMAP->IMAP spam filtering Date: Tue, 21 Feb 2012 17:00:21 +0000 (UTC) Message-ID: References: Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: dsl.comtrol.com User-Agent: slrn/pre0.9.9-102 (Linux) X-Archives-Salt: 596ff539-c8d2-403e-a8ed-c76d33c4f08d X-Archives-Hash: 1f0f8c330b492d1300237900ea9b50b4 On 2012-02-21, Pandu Poluan wrote: > Okay, I may have misunderstood your needs the first time around > (blame it to not having my first cuppa tea of the day). > > So, you want to do these steps: > - Pull email from an IMAP account in box A > - Filter it in box B > - Push it to box C Skip the box B part. Pull an e-mail from IMAP mailbox A, filter it, then either discard it or append it to IMAP mailbox C (with A and C possibly on different servers). > So, the third step is not an LDA. Right. Nothing's local except the filtering. > There are some alternatives, none of them are simple, though. The > 'easiest' I think would be: > > - have fetchmail (on box B) pull email from box A, and deliver to local > maildir (on B) via procmail+SA > > - have Dovecot watch the local maildir > > - have *another* fetchmail instance pull email from the local Dovecot and > push it to an SMTP MTA on box C If I'm going to use the SMTP server on box C, then I don't think there's a need for the intermediate maildir stop, since I can have procmail pipe the message to something like msmtp to deliver it to the SMTP server. There are a couple problem with using the SMTP server. The first is that you can't specify a mailbox. The big problem is that the SMTP server may rewrite headers. For example, if it's gmail's SMTP server, it will always muck up the From: header so the message appars to be from the account that was used to log in to the SMTP server (you loose the original From: header). Using the IMAP server allows you to store a message an any folder you want and the headers are unchanged. > You can have multiple fetchmail daemons running at the same time by > copying/symlinking the fetchmail initscript and creating a > correspondent conf file. I've submitted a patch (that has been > accepted into the tree) that allows multiple fetchmail daemons. I think it would be simpler to write an LDA that delivers a message to an IMAP mailbox and have procmail pipe messages to that for delivery. It should only take a couple dozen lines of Python... (famous last words) -- Grant Edwards grant.b.edwards Yow! But was he mature at enough last night at the gmail.com lesbian masquerade?