1 |
On 2012-02-21, Pandu Poluan <pandu@××××××.info> wrote: |
2 |
|
3 |
> Okay, I may have misunderstood your needs the first time around |
4 |
> (blame it to not having my first cuppa tea of the day). |
5 |
> |
6 |
> So, you want to do these steps: |
7 |
> - Pull email from an IMAP account in box A |
8 |
> - Filter it in box B |
9 |
> - Push it to box C |
10 |
|
11 |
Skip the box B part. Pull an e-mail from IMAP mailbox A, filter it, |
12 |
then either discard it or append it to IMAP mailbox C (with A and C |
13 |
possibly on different servers). |
14 |
|
15 |
> So, the third step is not an LDA. |
16 |
|
17 |
Right. Nothing's local except the filtering. |
18 |
|
19 |
> There are some alternatives, none of them are simple, though. The |
20 |
> 'easiest' I think would be: |
21 |
> |
22 |
> - have fetchmail (on box B) pull email from box A, and deliver to local |
23 |
> maildir (on B) via procmail+SA |
24 |
> |
25 |
> - have Dovecot watch the local maildir |
26 |
> |
27 |
> - have *another* fetchmail instance pull email from the local Dovecot and |
28 |
> push it to an SMTP MTA on box C |
29 |
|
30 |
If I'm going to use the SMTP server on box C, then I don't think |
31 |
there's a need for the intermediate maildir stop, since I can have |
32 |
procmail pipe the message to something like msmtp to deliver it to the |
33 |
SMTP server. There are a couple problem with using the SMTP server. |
34 |
The first is that you can't specify a mailbox. The big problem is |
35 |
that the SMTP server may rewrite headers. For example, if it's gmail's |
36 |
SMTP server, it will always muck up the From: header so the message |
37 |
appars to be from the account that was used to log in to the SMTP |
38 |
server (you loose the original From: header). Using the IMAP server |
39 |
allows you to store a message an any folder you want and the headers |
40 |
are unchanged. |
41 |
|
42 |
> You can have multiple fetchmail daemons running at the same time by |
43 |
> copying/symlinking the fetchmail initscript and creating a |
44 |
> correspondent conf file. I've submitted a patch (that has been |
45 |
> accepted into the tree) that allows multiple fetchmail daemons. |
46 |
|
47 |
I think it would be simpler to write an LDA that delivers a message to |
48 |
an IMAP mailbox and have procmail pipe messages to that for delivery. |
49 |
It should only take a couple dozen lines of Python... (famous last words) |
50 |
|
51 |
-- |
52 |
Grant Edwards grant.b.edwards Yow! But was he mature |
53 |
at enough last night at the |
54 |
gmail.com lesbian masquerade? |