From: Jonathan K. <ji...@ka...> - 2011-11-22 03:42:33
|
Hi Matthias, Thanks for the response. Comments and questions below. On 11/21/2011 08:10 PM, Matthias Andree wrote: >> The mailboxes receiving these messages are often BCC'd, which means that >> the recipient address doesn't appear in To or CC. Furthermore, the mail >> servers we're downloading from unfortunately don't insert >> X-Delivered-To, or Received lines showing the recipient address, or >> anything like that. In short, there's no way to tell from looking at the >> message fed into the MDA what address it was sent to. > And configuring a filter on the upstream server isn't possible either? > Sounds like a rather limited service to me. We cannot ask our users to muck around with the settings on the mail server. They are often technically naive or inexperienced, and we need to be able to make things work within our application without getting anything from them but the mail server's host name, protocol (IMAP or POP3), username, and password. >> We could hard-code a command-line option for the custom MDA command >> identifying the mailbox, but as far as I can tell, that fails if you've >> got more than one account in the .fetchmailrc file, because I don't >> believe it's possible to specify different MDA settings for different >> accounts (am I wrong about that?). > Yes, you're wrong - luckily ;-) The MDA setting is a user-specific > setting, so you can generate a modified rcfile that uses a distinct mda > script (or arguments) for each user. Now, that's for the easy case > where you have one destination address per upstream account. It won't > work with --mda on the command line though. The problem with this approach, if I am understanding what you are saying correctly, is that we have multiple remote mailboxes /being delivered to the same local user account./ If the MDA setting were specific to the remote account being queried that would work fine, but if it's specific to the local account, it's problematic. I suppose we could theoretically create dummy local users for the various remote accounts being polled, and write the RC file to "deliver" each remote account to a separate dummy user, but that seems awfully kludgy. It seems like it would be a lot cleaner to add the identifier + %-escape functionality I proposed. What do you think? Thanks again, Jonathan Kamens P.S. I apologize for the misleading Subject line I used to start this thread. When I started writing my message to the list, I was thinking in terms of modifying fetchmail to allow arbitrary headers to be added to messages before delivery, but my thinking evolved as I wrote the message and I obviously ended up proposing something different, but I forgot to go back and update the Subject. I'm not going to change the Subject line now, though, because that would just confuse everybody's threading. :-) |