From: "J. Roeleveld" on
On Thursday 04 March 2010 08:57:30 Jonathan Tripathy wrote:
> Hi Everyone,
>
> Thanks for all the tips.
>
> Postfix and Dovecot are indeed on the same box and I do agree with you that
> it would require one heck of a hack to get this to work.

See below, it might be a "simple" configuration still?

> Since this is software, it is possible, just maybe not with the current
> implementation of the 2 bits of software. It would be nice if postfix had
> some sort of setting to allow an external program to take a copy of the
> email being sent. Then, dovecot (again probably a hacked version) could
> store the email in the sent items folder.
>
> As for the BCC idea, this could work, but only if postfix was able to
> prefix the subject with something like "[sent]", or even better add a
> header, then dovecot can filter to the correct folder. Is this possible?

Can't you filter this on the "from" field?
Eg:
If <from> = <my email> then
{
store in sent items
} else {
store in inbox / parse other rules...
}

With that, I thought there is an option in postfix to bcc a single address on
all emails?
You could then put a filter like the following on all emails coming into that
address:

if <from> in <list of local emails> then
{
store in correct Sent Items
} else {
discard email as we don't want to duplicate incoming email
}

--
Joost

From: Stan Hoeppner on
J. Roeleveld put forth on 3/4/2010 2:12 AM:
> On Thursday 04 March 2010 08:57:30 Jonathan Tripathy wrote:
>> Hi Everyone,
>>
>> Thanks for all the tips.
>>
>> Postfix and Dovecot are indeed on the same box and I do agree with you that
>> it would require one heck of a hack to get this to work.
>
> See below, it might be a "simple" configuration still?
>
>> Since this is software, it is possible, just maybe not with the current
>> implementation of the 2 bits of software. It would be nice if postfix had
>> some sort of setting to allow an external program to take a copy of the
>> email being sent. Then, dovecot (again probably a hacked version) could
>> store the email in the sent items folder.
>>
>> As for the BCC idea, this could work, but only if postfix was able to
>> prefix the subject with something like "[sent]", or even better add a
>> header, then dovecot can filter to the correct folder. Is this possible?
>
> Can't you filter this on the "from" field?
> Eg:
> If <from> = <my email> then
> {
> store in sent items
> } else {
> store in inbox / parse other rules...
> }
>
> With that, I thought there is an option in postfix to bcc a single address on
> all emails?
> You could then put a filter like the following on all emails coming into that
> address:
>
> if <from> in <list of local emails> then
> {
> store in correct Sent Items
> } else {
> discard email as we don't want to duplicate incoming email
> }

Would sender_bcc_maps work if he uses Dovecot LDA/sieve? He could create a
sieve filter based on MAIL FROM: being his own address, and have sieve move
all such mails into his Sent Items folder. Might be worth a shot?

--
Stan

From: Ansgar Wiechers on
On 2010-03-03 Stan Hoeppner wrote:
> Ansgar Wiechers put forth on 3/3/2010 9:01 AM:
>> I was under the impression that his Postfix and Dovecot are running
>> on the same (remote) host, and he's using Postfix as a smarthost for
>> his outbound mail. If that's the case, then there certainly is an
>> advantage, as his client won't have to transfer the message twice.
>> Otherwise you're correct, of course.
>
> The point I was making is that the BCC'd copy is dropped in his inbox.
> Thus, when he opens his MUA, he still has to download the BCC'd sent
> items and move them to his IMAP sent items folder. So there's no net
> gain in IMAP traffic reduction.

You're kidding, right? You certainly can't mean to imply that *not*
having to transfer a large mail over the network via IMAP would be
anything else than a significant reduction in IMAP traffic.

> I suppose it might be possible to hack together a solution in the MTA
> or IMAP server, manually dropping copies of sent messages in the
> user's IMAP Sent Items folder. That would be one heck of a kludge
> though.

Not really. Use submission with a recipient_bcc_maps option and a
sender_access map (or something) to add a custom header. Have the MDA
store mails with that custom header in the "sent items" folder. Still a
bit of a hack, but not as ugly as you make it sound.

[...]
>>> My Dovecot server is local, 100BaseT, and it's still noticeably
>>> faster to store Sent Items locally on the workstation.
>>
>> Well, duh. Even old PATA/33 drives have almost three times the
>> transfer rate of 100BaseT.
>
> Transfer rate isn't the issue, but latency. Local disk writes are
> buffered, whereas network writes via IMAP are not.

You're talking nonsense. Of course transfer rate is exactly the issue at
hand when we're talking about initially storing a large e-mail in a
folder a) on a local disk or b) on a remote IMAP server.

Regards
Ansgar Wiechers
--
"Abstractions save us time working, but they don't save us time learning."
--Joel Spolsky

From: Ansgar Wiechers on
On 2010-03-04 Ansgar Wiechers wrote:
> On 2010-03-03 Stan Hoeppner wrote:
>> I suppose it might be possible to hack together a solution in the MTA
>> or IMAP server, manually dropping copies of sent messages in the
>> user's IMAP Sent Items folder. That would be one heck of a kludge
>> though.
>
> Not really. Use submission with a recipient_bcc_maps option

That would have to be "sender_bcc_maps", of course. My mistake.

Regards
Ansgar Wiechers
--
"Abstractions save us time working, but they don't save us time learning."
--Joel Spolsky

From: "J. Roeleveld" on
On Thursday 04 March 2010 12:24:20 Stan Hoeppner wrote:
> J. Roeleveld put forth on 3/4/2010 2:12 AM:
> > On Thursday 04 March 2010 08:57:30 Jonathan Tripathy wrote:

<snipped non-relevant part>

> >
> > With that, I thought there is an option in postfix to bcc a single
> > address on all emails?
> > You could then put a filter like the following on all emails coming into
> > that address:
> >
> > if <from> in <list of local emails> then
> > {
> > store in correct Sent Items
> > } else {
> > discard email as we don't want to duplicate incoming email
> > }
>
> Would sender_bcc_maps work if he uses Dovecot LDA/sieve? He could create a
> sieve filter based on MAIL FROM: being his own address, and have sieve move
> all such mails into his Sent Items folder. Might be worth a shot?
>

This is how I would do it on my server, if I'd be so inclined :)
eg:
sender_bcc_maps = autosendfolderfill(a)mydomain.com

Then for the "autosendfolderfill" user set the following for the sieve-script:

if header :contains "From" "me(a)mydomain.com"
{
fileinto me+Sent;
stop;
}

You then need to make sure the "autosendfolderfill" user has permissions to
drop messages in the respective "Sent" folders.

I have not tested the above, but I think I'd be able to get this to work with
Postfix and Cyrus.
I am not familiar with Dovecot, but the above might be doable with Dovecot as
well.

--
Joost

First  |  Prev  |  Next  |  Last
Pages: 1 2 3 4 5
Prev: quota with mysql
Next: postfix as "dispatcher"