Email Sources

Top  Previous  Next

You can configure IMAP email sources via the Inputs page.  An email source is monitored for emails that pass certain security rules and contain usable attachments.  All other emails are removed, which makes it very important that the address is not shared with users or even other CirrusPrint sources.  For this reason, it is recommended that email source addresses contain either "print" or "cirrus", such as printers@example.com or hp4000.cirrus@example.com.

 

 

When email arrives, the following rules are processed:

 

If there are any subject authorization tags defined, the subject of the email must contain at least one of the tags.  A tag can be any text at all, and it may occur anywhere in the email's subject.  Tags are not case-sensitive, and can be regular expressions if prefixed with a tilde (~).  If the subject does not contain any of the tags, the email is discarded.
 

If there are "Allow From" entries configured for the email source, the From address is compared with the list.  Each item in the list can be a full email address, such as john.smith@example.com, or domain name, such as example.com.  If the From address does not match any of the entries, the email is discarded.
 

If there are target devices configured for the email source, and there any usable attachments, the attachments are processed and forwarded to the specified devices. Note that attachment formats must be compatible for printing at the remote printer.  Common formats include PDF, image files, and text.
 

If there are no target devices configured, the system examines the email to look for target specifications:
 

1.The To and CC addresses are examined to see if they contain one of two formats: locationID.deviceID@ or deviceID.locationID@.  This allows for specific aliases to be defined for the email account, such as labranch.hp4000@example.com to target location "labranch", device "hp4000".  If so, usable attachments are delivered to that target device.  As long as the mail server does not rewrite alias addresses, this simplifies the creation of one email account to target any device by defining aliases for each target device.
 
Mail servers have different techniques for defining aliases.  Some are very straight forward, allowing you to define explicit alias addresses as described in the previous paragraph.  Some allow you to define +suffix values, so if the account is printers@example.com, you could receive email to an address like "printers+labranch.hp4000@example.com" to target the labranch location, hp4000 device.  Others provide aliases but unfortunately modify the To address to match the account address, so instead you can define distribution lists, one per printer, that distribute mail to the account address.  In this case, the To address is maintained as the distribution list value, which can be locationID.deviceID@domain.
 

2.The name portion of the To and CC address headers (names are typically enclosed in quotes, separate from the address itself) are examined to see if they match the format locationID:deviceID, or "locationID, deviceID", or "deviceID, locationID".  If so, usable attachments are delivered to that target device.  The format can be enclosed in single quotes or square braces if that makes it easier on the sender.  Examples of names entered this way: "John Smith:browser" or "[LABranch, HP4000]".
 

3.The subject is examined for tags in the format [locationID:deviceID].  Any such tag structures will trigger delivery of the mail attachments to that device.  Using subject tags like this enables programmatic or template-based email delivery to be configured for CirrusPrint document handling.

 

 

Usable mail attachments are:

 

PDF files

Image files that are at least 1000x1000 pixels and are not indicated as HTML content images (with a Content-ID)

Print data, such as PCL or Postscript, if compatible with a target printer

Text files

 

After any email has been processed or discarded, it is deleted from the mail server.