Is there a way to override Sieve's "not sending notification for auto-submitted message" behavior?
Goal:
- Setup a Google Calendar entry for a biweekly task
- Configure the email notification schedule
- When the email notification from Google arrives have Sieve send a notification to an alias I have setup for my cell provider's email to text messaging gateway
- Receive text message
I know there are other products which likely handle this better, but I'm specifically attempting to replicate old behavior by getting text message reminders when a specific Google Calendar event occurs.
The problem I'm having is that Sieve is attempting to help by NOT sending a notification for emails that it finds are automatically generated. I didn't found a lot of information when I searched for additional details, but I didn't find an earlier message thread on this list that led me to believe that the default behavior is likely chosen as some sort of safety net to prevent common issues from occurring.
What I would like to do is override this behavior at some level (per rule, per user, system-wide, whatever) to allow for Sieve notifications when emails matching a specific pattern are detected regardless of whether they are auto-generated or not.
I already found mention in the documentation[1] that the editheader extension refuses to remove the Auto-Submitted header, so setting up a per user or global rule to do just that wouldn't help. I also haven't come upon a way to simply modify the value for the Auto-Submitted header, so that doesn't look to work in this situation either.
Does anyone know of a way to accomplish this? Thanks in advance for your help!
[1] http://wiki2.dovecot.org/Pigeonhole/Sieve/Extensions/Editheader
On 05/05/2016 01:00 AM, deoren wrote:
Goal:
- Setup a Google Calendar entry for a biweekly task
- Configure the email notification schedule
- When the email notification from Google arrives have Sieve send a notification to an alias I have setup for my cell provider's email to text messaging gateway
- Receive text message
I know there are other products which likely handle this better, but I'm specifically attempting to replicate old behavior by getting text message reminders when a specific Google Calendar event occurs.
The problem I'm having is that Sieve is attempting to help by NOT sending a notification for emails that it finds are automatically generated. I didn't found a lot of information when I searched for additional details, but I didn't find an earlier message thread on this list that led me to believe that the default behavior is likely chosen as some sort of safety net to prevent common issues from occurring.
What I would like to do is override this behavior at some level (per rule, per user, system-wide, whatever) to allow for Sieve notifications when emails matching a specific pattern are detected regardless of whether they are auto-generated or not.
I already found mention in the documentation[1] that the editheader extension refuses to remove the Auto-Submitted header, so setting up a per user or global rule to do just that wouldn't help. I also haven't come upon a way to simply modify the value for the Auto-Submitted header, so that doesn't look to work in this situation either.
Does anyone know of a way to accomplish this? Thanks in advance for your help!
[1] http://wiki2.dovecot.org/Pigeonhole/Sieve/Extensions/Editheader
If you can't do it with dovecot / pigeonhole then consider doing something in the MTA like removing the Auto-Submitted header before delivery, or of course you can just send your notification out of there. Which MTA are you using?
On 5/5/2016 10:42 AM, Gedalya wrote:
On 05/05/2016 01:00 AM, deoren wrote:
Goal:
- Setup a Google Calendar entry for a biweekly task
- Configure the email notification schedule
- When the email notification from Google arrives have Sieve send a notification to an alias I have setup for my cell provider's email to text messaging gateway
- Receive text message
...
If you can't do it with dovecot / pigeonhole then consider doing something in the MTA like removing the Auto-Submitted header before delivery
Thank you for taking the time to read my email and offer suggestions!
I was starting to think the same thing. I've been thinking about using a local alias to pipe to a script to handle generating my own notifications for Google Calendar emails. I also thought about creating some sort of filter/milter to just strip out the header for those emails before letting the Sieve filter handle the rest, but I've not yet had a chance to research just how to go about that.
or of course you can just send your notification out of there.
Like I mentioned above or is there a better way to go about it?
Which MTA are you using?
I'm using Postfix 2.11.x + Dovecot 2.2.x to handle our mail.
Thanks again for your help!
On 05/05/2016 01:02 PM, deoren wrote:
On 5/5/2016 10:42 AM, Gedalya wrote:
On 05/05/2016 01:00 AM, deoren wrote:
Goal:
- Setup a Google Calendar entry for a biweekly task
- Configure the email notification schedule
- When the email notification from Google arrives have Sieve send a notification to an alias I have setup for my cell provider's email to text messaging gateway
- Receive text message
...
If you can't do it with dovecot / pigeonhole then consider doing something in the MTA like removing the Auto-Submitted header before delivery
Thank you for taking the time to read my email and offer suggestions!
I was starting to think the same thing. I've been thinking about using a local alias to pipe to a script to handle generating my own notifications for Google Calendar emails. I also thought about creating some sort of filter/milter to just strip out the header for those emails before letting the Sieve filter handle the rest, but I've not yet had a chance to research just how to go about that.
or of course you can just send your notification out of there.
Like I mentioned above or is there a better way to go about it?
Which MTA are you using?
I'm using Postfix 2.11.x + Dovecot 2.2.x to handle our mail.
Thanks again for your help!
So yea if you're on postfix I don't know of better/other terms to think of this in. In exim, you could send out a notification and/or strip/add/modify headers without any external script or writing any "code" per se, just within exim's config file. Although writing a milter for postfix isn't all that complicated either. Postfix has [ http://www.postfix.org/header_checks.5.html ], you can use that to remove a header (IGNORE), you just might be able to set that up to test for the right conditions *when* to do this, and then proceed to remove the header. Gotta run now so I can't put more thought into it at the moment but do post if you figure it out :D
On 05/05/2016 01:33 PM, Gedalya wrote:
you just might be able to set that up to test for the right conditions *when* to do this, and then proceed to remove the header
Maybe using PCRE negative lookaheads
/^Subject: (?!google-calendar-notification)/ DUNNO /^From: (?!google)/ DUNNO /^Auto-Submitted:/ IGNORE
maybe something vaguely like this?? didn't test this anywhere outside of my message compose window
On 5/5/2016 12:40 PM, Gedalya wrote:
On 05/05/2016 01:33 PM, Gedalya wrote:
you just might be able to set that up to test for the right conditions *when* to do this, and then proceed to remove the header
Maybe using PCRE negative lookaheads
/^Subject: (?!google-calendar-notification)/ DUNNO /^From: (?!google)/ DUNNO /^Auto-Submitted:/ IGNORE
maybe something vaguely like this?? didn't test this anywhere outside of my message compose window
Thanks. I tried it, but it appeared to strip the header from emails that the "/From: " line didn't match. I'm going to try going the route of a check_sender_access table entry that uses a 'FILTER transport:' action to send matched mail through a custom transport. That transport/service entry in master.cf will then apply a single header check to strip out the header.
I've been fighting with the appropriate settings for the entry and haven't made much progress, so I will probably drop into the Postfix mailing list soon and ask for some help there pointing out my obvious mistake.
Thanks for your feedback.
participants (2)
-
deoren
-
Gedalya