Move DMARC files into matching domain subdirectory/folder

Get help. Get answers. Let others lend you a hand.

Moderator: Mr_Noodle

I have several domains which I receive report emails with attachments where those attachments are auto removed and saved into a folder/directory on google drive.

The attachment name format is:
<reporting domain>!<domain being reported>!<some number 1>!<some number 2>.xml.gz
<reporting domain>!<domain being reported>!<some number 1>!<some number 2>.zip
<reporting domain>!<domain being reported>!<some number 1>!<some number 2>!<some number3>.json.gz
example:
google.com!ullec.xyz!1675641600!1675727999.xml.gz

I manually move these files every couple of days from the top-level directory into their respective domain-name directory. So, in the above example, I'd move that file into the ullec.xyz sub-directory.

How can I get Hazel to do this for me?
ewagar
 
Posts: 2
Joined: Tue Feb 07, 2023 9:44 pm

Look up match patterns in the manual. You can set up a pattern with a custom attribute to grab the second part. You can then use that custom attribute in a Rename or Sort into subfolder pattern.
Mr_Noodle
Site Admin
 
Posts: 11195
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

I create a rule with 2 conditions:
(1) Kind is not folder
(2) Name matches <anything><A Custom List of Domains><anything>
with an action of:
Sort into subfolder with pattern <A Custom List of Domains>

I also ran into a bug while editing the domains list. I'll submit via the contact.
ewagar
 
Posts: 2
Joined: Tue Feb 07, 2023 9:44 pm


Return to Support