Link to home
Start Free TrialLog in
Avatar of timbratton
timbratton

asked on

How to allow smtp relay to one specific external address

Domino 6.5 server.  When internet email comes in for one user I need it to forward to an external email address.  I found some code that will allow me to do this and it works fine when internal Notes users send email to this user.  Howerver, I have SMTP controls turned on to prevent relaying.  External email is not being forwarded to this user.  If I add a specific external domain in the field  - Allow messages only from the following Internet addresses to be sent to the Internet - It works as expected.  

My question is, how can I tell Domino that if an external email comes in for this one user, that it's ok to relay to the users external address.
Avatar of Sjef Bosman
Sjef Bosman
Flag of France image

You don't need "code" to forward mail: just create a Rule from the user's mail database. Relaying through a rule might not trigger the relay trap. But I'm not sure...
Avatar of timbratton
timbratton

ASKER

This doesn't work becuase when the mail is forwarded, it is being sent from the external domain which I am not allowing to relay.
Don't understand... PersonA sends a mail to PersonB(at)yourdomain.com. The mail is correctly received in the mail database of PersonB. Then a rule is executed, forwarding this mail to PersonB(at)mail-isp.com. I assume that forwarded mail isn't considered to be a relayed mail?

What's the code you found, and how did you implement it? Did you try with a rule and without the code?
The forwarding rule doesn't count as relayed mail. However there is an option in the server config document to not allow "Send copy to" rules so you might want to check and make sure that they are not being blocked.
Yes, you understand what I am trying to do. I realize that the issue is not with my code or mail rule but with smtp.

I currently have some entries in the field  "Allow messages only from the following Internet addresses to be sent to the Internet" for a few domains that I allow to relay.  

Let's assume that I have a mail rule in Person B's mailbox that says WHEN to IS personB(at)mydomain.com THEN send full copy to PersonB(at)mail-isp.com.  Internal mail from my domain gets fowarded fine, but any message from an external domain is denied by the SMTP rule.

In my Server Configuration document, under SMTP Outbound Controls, if I leave "Allow messages only from the following Internet addresses to be sent to the Internet" and "Deny messages from the following Internet addresses to be sent to the Internet" fields blank, mail from PersonA comes into PersonB's mailbox, the rule executes and mail is forwarded to PersonB(at)mail-isp.com as expected.  This also turns my server into an open relay.

What I want to tell Domino is:  If an external email comes in for PersonB(at)mydomain.com, send that message to PersonB(at)mail-isp.com and allow the external domain to relay mail only to this email address.
ASKER CERTIFIED SOLUTION
Avatar of brwwiggins
brwwiggins
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
As brwwiggins says, there is an option you can disable/enable in the Configuraion document. See Router/SMTP, Restrictions and Controls, Delivery Controls, and look for the line with User rules mail forwarding. Is that setting Enabled?
Leaving the outbound field blank solved my problem.  Thanks for explaining it in a way I can understand.  The Lotus documentation and all references I have found on the web were very confusing.