Gmail Filters – How to Create a Filter for Messages Forwarded from Zimbra

gmail-filterszimbra

EDIT: You cand find additional information in Is it possible to create a Gmail filter that works on headers other than From, To, Subject?

I have two email accounts, one is my main Gmail account which I check regularly (for simplicity I name it mygmail@gmail.com), and the other one is from university mail service where I currently study (and I name it myunimail@mail.uni.com).

As the disk quota of university mail server is too low and there are lots of daily announcements from university staff which contain huge attachments, after about 5-7 days all disk quota is used and afterwards no emails will be delivered to my inbox.

So I created a filter in the university mail service (which uses Zimbra) to forward all received messages to email alias mygmail+UNIFWD@gmail.com and then delete the message.

Now the main problem is: I want to create a filter in Gmail to mark these forwarded messages with a custom label, but the information included in message header, specially FROM and TO fields, is not enough to distinguish these messages from other ones (as shown below)

Mail information

As you can see, there is no sign of alias I used in the Forwarding Address in Zimbra's filter settings.
Even I can't rely on TO field (which contains myunimail@mail.uni.com) because there are messages which are sent to both of my email addresses, so some mistakes will occur if I use this field.

By the way, these forwarded messages are marked by Gmail as being sent via mail.uni.com

Is there any way I can use this to filter messages?

Did I miss something while setting up the filter in Zimbra?

Best Answer

Use the deliveredto: search keyword.

Search for messages within a particular email address in the Delivered-To line of the message header

Example: deliveredto:username@gmail.com Meaning: Any message with username@gmail.com in the Delivered-To: field of the message header (which can help you find messages forwarded from another account or ones sent to an alias).

(Google support)

So, searching for (or using a filter with) deliveredto:mygmail+UNIFWD@gmail.com should give you what you need.