Multiple groups in the "to" list
markfoodyburton - March 6, 2008 - 14:22
| Project: | Organic groups list manager |
| Version: | HEAD |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | needs review |
Jump to:
Description
You can solve some of the problem by using flags=DRhu in your postfix setup so that the mail-in gets called for EACH recipient, but there is a bug in main-in which means it only sets things up for one group.
The trick is to use last_indent_id to find out what the laters MID is, and use that, rather than trying to look it up based on the messageid
| Attachment | Size |
|---|---|
| mail-in-patch.txt | 2.29 KB |

#1
I fixed this in the post carbon private version too. I found that as well as flags=DHRu in master.cf, you also need a line in main.cf:
TRANSPORTNAME_destination_recipient_limit = 1for each transport name you define in transports. Otherwise I was getting postfix calling mail-in.pl once per recipient.
So mail-in.pl would work but if you sent to two lists at once you'd get double messages (doh) because it would do it all twice. That line in main.cf will force postfix to only call it once for each $envelope_to. This may not apply in your situation, I was trying at the time to do multiple group recipients in different drupal sites all in one pass, not just using $envelope_to. This didn't work out because of that recipient limit and so I went back to alwyas using $envelope_to only and I did need that setting to not get dupes.
When I look at possibly backporting that fix i'll review this one too and try and incorporate the best of both, I'm definitely not doing it the last_id way you are and that may be better.
Will yours handle Cc: or Bcc:'s to a list? I think that should work since you're inserting $envelope_to and not relying on what's in the message header.
What do you think of the approach of having multiple sites supported in mail.conf? What we do in the PCI version is parse the $envelope_to to find the domain of the site, and look up the config based on that name. That way mail-in can support multiple Drupal Site DB's and it selects the proper database configuration and inserts into that one at a time. Not sure if that is a better approach than using the last_insert_id here or if we should be combining both.
anyway nice work getting it moving along! Please see and help test these other patches that are bugfixes to HEAD You might want (and I need help testing):
http://drupal.org/node/161393
http://drupal.org/node/165299
I set up a public test environment for testing them, and am working on the first one (once someone can test and RTBC it I can move to the 2nd, then the other two that i still have to backport). If you're running HEAD you will also want all these fixes!
I'll have the remaining two (rendering of CCK content and Node revisions sending the original revision not an edited one on publish / if someone edits) backported within the next week and also ready for testing. Once we get those tested, let's test and include this patch you've made too for the 5.x-1.0 release. The multiple site config stuff is a fairly major change / feature enhancement and I think it belongs along with other feature enhancements in a 5.x-2.x branch. But I see this as a very simple bug fix to how it's broken in HEAD right now so let's do it.
Please also join the og2list-developers group if you're hacking away on og2list: http://groups.drupal.org/og2list-developers. There you can find a link to the PCI private version's demo site if you want to see some of the stuff in that (we'll hopefully be releasing more of these features soon!)
thanks,
D.