Operating System - OpenVMS
1822145 Members
3835 Online
109640 Solutions
New Discussion юеВ

send all mails to a remote smtp server instead of local smtp server

 
albibo27
New Member

send all mails to a remote smtp server instead of local smtp server

HI,
I have a server running openvms 7.3.
I want to send mails to an external qmail server. The problem is that openvms domain is the same as remote qmail domain. When I send an mail from openvms server ( example destination@mydomain.com) the server does not send the message to the remote server. It sends to the local machine openvms. The user account ( destination ) exists at remote node but not in local server.
Can anyone help me?
Thanks a lot.
7 REPLIES 7
Robert Gezelter
Honored Contributor

Re: send all mails to a remote smtp server instead of local smtp server

Albibo27,

Welcome to the OpenVMS ITRC Forum.

The first question is: Which TCP/IP package are you using?

I am writing this in a hurry, my apologies for the brevity. Each machine should have a local machine name in addition to the name of the overall domain (e.g. ALPHA.MYDOMAIN.COM). For the purpose of my answer, assume that your internal machine is actually named ALPHA.MYDOMAIN.COM and your external machine has a name of BETA.MYDOMAIN.COM. You have a rule defined that says "all mail to MYDOMAIN.COM is locally deliverable mail".

The problem is that you have an inconsistency. Your machine is configured to deliver all mail addressed to MYDOMAIN.COM to the local machine, but some users only have accounts on BETA.MYDOMAIN.COM.

Ddepending on the package, there are at least two ways to do this:
- (On all packages) Do a SET FORWARD/USER= "xx%""""" on ALPHA for each of the users on BETA
- (Package specific) some of the SMTP implementations have a facility to rewrite destination addresses while processing the message. The precise syntax depends on the package.

I hope that the above is helpful.

- Bob Gezelter, http://www.rlgsc.com
Joseph Huber_1
Honored Contributor

Re: send all mails to a remote smtp server instead of local smtp server


For TCPIP Services for VMS and it's SMTP:

I think if You put all VMS cluster-nodes into
TCPIP$SMTP_LOCAL_ALIASES.TXT
and DEFINE/SYSTEM TCPIP$SMTP_LOCAL_ALIAS_ONLY 1,
then mail to smtp%"user@mydomain.com" will go through the defined mail-gateway for zone mydomain.com,
while smtp%"user@clusternode" will go directly to clusternode.

Eventually DEFINE/SYSTEM tcpip$smtp_altgate_always 1

Changes the way for all outgoing mail through the gateway.

You may or may not have the mail From: changed to user@mydomain.com with
SET CONFIGURATION SMTP /SUBSTITUTE_DOMAIN=(HIDDEN,NAME=mydomain.com)

if all users want and can be reached from outside through the gateway.


http://www.mpp.mpg.de/~huber
Wim Van den Wyngaert
Honored Contributor

Re: send all mails to a remote smtp server instead of local smtp server

albibo27
New Member

Re: send all mails to a remote smtp server instead of local smtp server

My openvms machine uses only one user account. And I use it to send messages to several mail accounts in remote mailserver. When I send a mail to remoteuser@mydomain.com, I get the mail in local machine and the message "You have an email from SMTP%"TCPIP$SMTP@MYDOMAIN.COM"

Thanks for your replies.


Joseph Huber_1
Honored Contributor

Re: send all mails to a remote smtp server instead of local smtp server

I have exactly the same situation here, and with local alias and the logical as above it is working as expected.

Would You mind to show us Your
TCPIP SHOW CONFIG SMTP
and SHOW LOGICAL TCPIP$SMTP*
?
http://www.mpp.mpg.de/~huber
albibo27
New Member

Re: send all mails to a remote smtp server instead of local smtp server

TCPIP SHOW CONFIG SMTP
Initial interval: 0 00:30:00.00 Address_max: 16 NOEIGHT_BIT
Retry interval: 0 01:00:00.00 Hop_count_max: 16 RELAY
Maximum interval: 3 00:00:00.00 TOP_HEADERS

Timeout Initial Mail Receipt Data Terminate
Send: 5 5 5 3 10
Receive: 5

Alternate gateway: 80.33.196.34
General gateway: not defined

Substitute domain: CENTROFARMACEUTICO.ES
Zone: HAL.CENTROFARMACEUTICO.ES

Postmaster: TCPIP$SMTP
Log file: SYS$SPECIFIC:[POSTMASTER]TCP$SMTP_LOG.TXT

Generic queue Queues Participating nodes

TCPIP$SMTP_HAL_00 1 HAL

-------------------------------------------
SHOW LOGICAL TCPIP$SMTP*


(LNM$PROCESS_TABLE)

(LNM$JOB_812CFFC0)

(LNM$GROUP_000001)

(LNM$SYSTEM_TABLE)

"TCPIP$SMTP_COMMON" = "sys$specific:[tcpip$smtp]"
"TCPIP$SMTP_ENABLE" = ".1.."

(LNM$SYSCLUSTER_TABLE)

(DECW$LOGICAL_NAMES)
Joseph Huber_1
Honored Contributor

Re: send all mails to a remote smtp server instead of local smtp server

You have no general gateway defined, only alternate gateway (but no tcpip$smtp_altgate_always logical).
Define the general gateway or the logical.

Did You even try to define
TCPIP$SMTP_LOCAL_ALIAS_ONLY 1 ?

I'm skeptical about the definition of ZONE as HAL.CENTRO...
Since Your mail domain is CENTRO..., I would change ZONE to be the same CENTROFARMACEUTICA.ES (or is the substitute domain wrong ?).

And by the way, having a main mail gateway, the VMS system probably should NOT be a relay :
SET CONFIG SMTP /OPTION=NORELAY
(but has nothing to do with the gateway question).

And after config/logical changes, don't forget to tcpip$smtp_shutdown/tcpip$smtp_startup to see the effects.
http://www.mpp.mpg.de/~huber