27.11.2012 Views

IronPort - advanced configuration guide

IronPort - advanced configuration guide

IronPort - advanced configuration guide

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

6-38<br />

Cisco <strong>IronPort</strong> AsyncOS 7.6 for Email Advanced Configuration Guide<br />

Chapter 6 Using Message Filters to Enforce Email Policies<br />

joe+smith+folder@example.com, only the +folder portion is ignored. If the SMTP authenticated user<br />

ID string is a simple username and not a fully-qualified e-mail address, only the username portion of the<br />

target will be examined to determine a match. The domain must be verified in a separate rule.<br />

Also, you can use the $SMTPAuthID variable to insert the STMP authenticated user ID into headers.<br />

The following table shows examples of comparisons between the SMTP authenticated ID and email<br />

addresses and whether they would match using the smtp-auth-id-matches filter rule:<br />

SMTP Auth ID Sieve Char Comparison Address Matches?<br />

someuser otheruser@example.com No<br />

someuser someuser@example.com Yes<br />

someuser someuser@another.com Yes<br />

SomeUser someuser@example.com Yes<br />

someuser someuser+folder@example.com No<br />

someuser + someuser+folder@example.com Yes<br />

someuser@example.com someuser@forged.com No<br />

someuser@example.com someuser@example.com Yes<br />

SomeUser@example.com someuser@example.com Yes<br />

The following filter checks all messages created during an authenticated SMTP session to verify that the<br />

addresses in the From header and the Envelope Sender match the SMTP authenticated user ID. If the<br />

addresses and the ID match, the filter verifies the domain. If they do not match, the appliance quarantines<br />

the message.<br />

Msg_Authentication:<br />

if (smtp-auth-id-matches("*Any"))<br />

{<br />

# Always include the original authentication credentials in a<br />

# special header.<br />

insert-header("X-Auth-ID","$SMTPAuthID");<br />

if (smtp-auth-id-matches("*FromAddress", "+") and<br />

{<br />

smtp-auth-id-matches("*EnvelopeFrom", "+"))<br />

# Username matches. Verify the domain<br />

if header('from') != "(?i)@(?:example\\.com|alternate\\.com)" or<br />

{<br />

mail-from != "(?i)@(?:example\\.com|alternate\\.com)"<br />

OL-25137-01

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!