Hey all,
we host email on SurgeMail for a client who uses Microsoft 365 for certain users, including Exchange calendaring. They don’t want to switch to Exchange email.
We need to support meeting requests and updates from external users. These normally arrive as iMIP emails, so we’ve set up mfilter rules that forward iMIP messages out to Microsoft 365, where they get processed by Exchange, updating the calendar.
In general, this works well. But now we’ve discovered that certain Exchange users are sending their calendar updates as TNEF attachments. Apparently, this involves “Schedule” messages as described here.
This is a bit above my pay grade.
Would it be possible for SurgeMail to evaluate this, and add a header to all messages containing scheduling information, such as iMIP or calendaring-related TNEF attachments? Maybe
X-Calendar-Message-Detected
or something like that. Then we could use that in our mfilter.rul. As it stands, we might have to just forward all messages with TNEF attachments, which will cause a lot of clutter.
Or is there another simple way to do this? See below for the mfilter.rul we’re currently using.
Best,
Chris Ferebee
# mfilter.rul: forward iMIP to Exchange Online for certain @excellent.com users
if (isin("To", "@excellent.com")) setflag("excellent_recip")
if (isin("Cc", "@excellent.com")) setflag("excellent_recip")
# Top level
if (isflag("excellent_recip")) then
if (isin("Content-Type", "text/calendar")) setflag("imip")
if (rexp("body", "Content-Type:\s*text/calendar")) setflag("imip")
if (rexp("body", "BEGIN:VCALENDAR")) setflag("imip")
if (isflag("imip")) print "excellent.com iMIP: calendar message detected"
end if
recipients
if (isflag("imip")) then
if (isin("recipient", "user.a@excellent.com")) then
print "iMIP: forwarding to user.a Exchange Online"
call forward_cc("user.a@excellent.onmicrosoft.com")
end if
# ...
end if
end recipients