Email Sources

Top  Previous  Next

You can configure 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, email source addresses must contain either "print" or "cirrus", such as printers@example.com or hp4000.cirrus@example.com.

 

emailprint

 

When email arrives, the following rules are processed:

 

If there is a subject authorization tag defined, the subject of the email must contain the tag.  This tag can be any text at all, and it may occur anywhere in the email's subject.  If the subject does not contain the tag, 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.  If devices require different formats, a conversion must be available.  For example, to send the attachment to a PCL6 printer, GhostScript will be used to convert a PDF attachment to that format.  In this case, note that the only security rules are the subject authorization tag and 'allow from'.
 
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 require you to define +suffix values, so if the account is acme999.printers@gmail.com, you could receive email to an address like "acme999.printers+labranch.hp4000@gmail.com" to target the labrach 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
Other formats, if targeting a printer, must be convertible to a print format supported by the printer

 

Print devices typically are configured to accept known formats, so not all file types are acceptable.  If an email attachment file can't be converted to an acceptable format, the job won't be delivered to the device in order to prevent garbled printing.

 

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