Hi, Can you open a ticket for a feature request on our bug tracker ?
This is certainly a feature that can be merged, however it won't be part of the upcoming major release ;-) On Thu, Nov 21, 2013 at 12:37:22PM -0500, Michael Mitton wrote: > I am in charge of the relay for email between our staff email and our > student (K-12) email systems. Students are very limited in who they can > and cannot send/receive email from. One of the allowed receive from is the > bounce emails from Google Apps. Google sends these emails as > > @doclist.bounces.google.com > @calendar-server.bounces.google.com > @docos.bounces.google.com > etc > > Basically, I need to let anything from @*.bounces.google.com pass to the > students. My rule is > > accept from any sender <students_allowfrom> for any recipient <students> > relay via $google > > where the students table contains all of the student email addresses, and > students_allowfrom contains a list of @domains they can receive email from. > > > On Thu, Nov 21, 2013 at 12:23 PM, Jason Barbier <[email protected]>wrote: > > > It would be nice to know the sample case for this since its not something > > I think even commercial MTAs have the ability to do. (I could confirm a bit > > later when I get a chance at least for exchange.) > > > > > > Michael Mitton <[email protected]> wrote: > >> > >> I have need to match based on any subdomain (without knowing what that > >> subdomain may be). Changing table_mailaddr_match to the following would > >> allow @*.example.com to match @sub.example.com and @sub2.example.com. > >> > >> Note, in this example @example.com would not match since the period is > >> included in the check. While @*example.com would catch that as well, it > >> would also catch @forexample.com. > >> > >> Thoughts? > >> > >> int > >> table_mailaddr_match(const char *s1, const char *s2) > >> { > >> struct mailaddr m1; > >> struct mailaddr m2; > >> > >> if (! text_to_mailaddr(&m1, s1)) > >> return 0; > >> if (! text_to_mailaddr(&m2, s2)) > >> return 0; > >> > >> if (m2.domain[0] && m2.domain[0] == '*') { > >> size_t m1_len = strlen(m1.domain); > >> size_t m2_len = strlen(m2.domain); > >> > >> if (m1_len < m2_len - 1) > >> return 0; > >> if (strcasecmp(&m1.domain[m1_len - m2_len + 1], &m2.domain[1])) > >> return 0; > >> } else if (strcasecmp(m1.domain, m2.domain)) > >> return 0; > >> > >> if (m2.user[0]) > >> if (strcasecmp(m1.user, m2.user)) > >> return 0; > >> return 1; > >> } > >> > >> > > -- > > Sent from my Android device with K-9 Mail. Please excuse my brevity. > > -- Gilles Chehade https://www.poolp.org @poolpOrg -- You received this mail because you are subscribed to [email protected] To unsubscribe, send a mail to: [email protected]
