On Thursday 04 March 2010 16:10:21 Charles Marcus wrote: > On 2010-03-04 9:08 AM, J. Roeleveld wrote: > >>> I am not familiar with Dovecot, but the above might be doable with > >>> Dovecot as well. > >> > >> Does that mean I'd need a autosendfolderfill for each user on the > >> system? > > > > No, you'll only need to create one of these users. The username > > doesn't matter, as long as this user can have a filter set up and is > > allowed to post messages into the Sent-folders of all the users. > > > > You will need to create a filter-entry for each of your users, eg. > > duplicate the following inside the filter for every user that is > > allowed to sent emails:> -- > > > >> if header :contains "From" "[email protected]" > >> { > >> fileinto me+Sent; > >> stop; > >> } > > Interesting... yes, this is doable with dovecot if you are using its > LDA, and you can do it via the global sieve script (which can be made > mandatory for all users) - no need to make a script for each user.
My idea (NOTE: untested) would only require one dummy-account where this filtering takes place. The basic idea should be possible to be implemented with any filtering method along with any mail-storage option you want. The above is a bit more specific with Sieve-scripts, but I see no reason why this approach wouldn't work with something like "procmail" > So... two more questions... > > 1. Can '-o sender_bcc_maps=hash:/etc/postfix/sender_bcc' be added to the > submission service in master.cf? If so, I think this could work. I have no clue :) As mentioned before, what I described is just the theory and I have no need to implement this myself. By putting this on the list, I am actually hoping for people who do know to add their comments and perhaps get this written down as a working how-to somewhere. (Add it to the postfix HOWTO-section?) > 2. What happens if the smtp send transaction fails? Would the message > still be bcc'd (hopefully not?)? I think this depends where the failure occurs. If it occurs after the BCC-email is created, then the email still appears in the sent-folder. Btw, another option, which I saw described somewhere (can't remember where) was to have the mail client store the email in a folder like: "outbox" and then have a process on the server poll the outboxes for each user, send the actual email and then move it to the "sent" folder when succesfully sent. I think this method is closer to the way MS Exchange/MS Outlook works, but this would, I think, require more work? -- Joost
