• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2407
  • Last Modified:

Forwarding email using exchange transport rule to external email address

Need:
We have a support email account that receives emails from customers during the day.
at night we need those emails forwarded to an answering service.

Solution used:
We set up a transport rule that is enabled and disabled by widows task manager at appropriate times.
this transport rule watches for emails to support@company.com then "copies" that email to the external email for the answering service.  Then at the appropriate time the windows task manager disables the transport rule in the morning.

Problem:
When Exchange "copies" the email it actually sends it as the original sender, this causes any mail server set up with proper SPF record to refuse it because it looks like we are sending an email for their domain from an unauthorized mail server.

Anyone have any idea how to get around this to achive the same results for having a rule work for specific time frame and forwarding the email to outside email with out it sending the email as the original email sender.

Example:

Client user@abc.com sends us an email to support@company.com after 5pm (transport rule is active at this time)
transport rule copies and sends email to answering service at support@answeringservice.com the "from address" of this email is maintained as user@abc.com so the receiving email servers checks spf and finds that it does not match since its comming from company.com server not abc.com.

Configuration Summary:
Afterhours to Answer1
Identity: 'Afterhours to Answer1'
Name: 'Afterhours to Answer1'
Comments: 'Copy Answer1 during off business hours'

any help would be appreciated.
0
Nick Krapf
Asked:
Nick Krapf
  • 7
  • 5
1 Solution
 
Joshua GrantomSenior Systems AdministratorCommented:
Create 2 different scheduled tasks on your Exchange server with these 2 exchange shell scripts

First One starts at 5:00 pm

Set-Mailbox support@company.com -ForwardingSMTPAddress answeringservice@company.com -DeliverToMailboxAndForward $true

Open in new window


Second One at 8:00 am

Set-Mailbox support@company.com -ForwardingSMTPAddress $null -DeliverToMailboxAndForward $false

Open in new window

0
 
Nick KrapfAuthor Commented:
Thank you for your reply.
So will that then truly forward the message as support@company.com?
because right now using the copy transport rule it sends it as user@abc.com
0
 
Joshua GrantomSenior Systems AdministratorCommented:
yes it should send as support@company,com because it is actually forwarding the message similar to a client. It should show the message subject as FW: as well.
0
Has Powershell sent you back into the Stone Age?

If managing Active Directory using Windows Powershell® is making you feel like you stepped back in time, you are not alone.  For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why.

 
Nick KrapfAuthor Commented:
ok thanks we will test this method out.
0
 
Nick KrapfAuthor Commented:
when running the first command we get
WARNING: The command completed successfully but no settings of 'DOMAINNAME.local/Users/USERNAME' have been modified.
0
 
Nick KrapfAuthor Commented:
testing seems to be working though
0
 
Joshua GrantomSenior Systems AdministratorCommented:
you are running this in exchange management shell?
0
 
Joshua GrantomSenior Systems AdministratorCommented:
That error usually shows if you try to update a field to the exact same thing and powershell detects that there are no changes. Did you run it manually or by scheduled task?
0
 
Nick KrapfAuthor Commented:
running commands from management shell

since we want to test initially.
0
 
Joshua GrantomSenior Systems AdministratorCommented:
okay, Ive never had a warning show up like that but you can add -verbose to get advanced logging. The warning should be disregarded I believe.
0
 
Nick KrapfAuthor Commented:
seems to be working .. will disregard the warnings
will proceed to set up tasks.
0
 
Nick KrapfAuthor Commented:
just make sure you set up your task with elevated permissions.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: Ruby Fundamentals

This course will introduce you to Ruby, as well as teach you about classes, methods, variables, data structures, loops, enumerable methods, and finishing touches.

  • 7
  • 5
Tackle projects and never again get stuck behind a technical roadblock.
Join Now