- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - OpenVMS
- >
- DCL code for setting mail forwarding
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-27-2006 01:18 AM
01-27-2006 01:18 AM
I want to modify my DCL procedure for creating user accounts, and add code to forward the user’s mail to his/her internet mail account.
The OpenVMS account Owner is in the format
The user’s internet address is in the format
I want the code to execute the following command:
MAIL> SET FORWARD/USER=
OpenVMS Username: JXB12345
Owner: Joe X Bloggs
Forward Mail to SMTP%”joe.x.bloggs@xxx.com”
Thank You,
Niall.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-27-2006 01:23 AM
01-27-2006 01:23 AM
Re: DCL code for setting mail forwarding
I want to modify my DCL procedure for creating user accounts, and add code to forward the user's mail to his/her internet mail account.
The OpenVMS account Owner is in the format
The user's internet address is in the format
I want the code to execute the following command:
MAIL> SET FORWARD/USER=
OpenVMS Username: JXB12345
Owner: Joe X Bloggs
Forward Mail to SMTP%"joe.x.bloggs@xxx.com"
Thank You,
Niall.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-27-2006 01:31 AM
01-27-2006 01:31 AM
Solution$ VMSuser = "JXB12345"
$ user = "JOE X BLOKE"
$ user1= F$element(0," ",User)+"."+ -
F$element(1," ",User) + "." + F$Element(2," ",User)
$ open/write lun tmp.com
$ write lun "$ MAIL"
$ write lun "set forward/user=""''VMSUser'"" -"
$ write lun "SMTP%""''UserX'@xxx.com"""
$ close/nolog lun
$ @tmp
$ delete tmp.com.
This is untested, typos may occur, pls. check before making productive...
regards Kalle
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-27-2006 02:06 AM
01-27-2006 02:06 AM
Re: DCL code for setting mail forwarding
Kalle's procedure should work, but,
building USER1 & using USERX
those should of course be the same.
It probably is better to NOT complicate things by splitting up your MAIL input line.
Better to make one long line.
(but if you do the line breaks exactly right for the generated lines it will work identical).
Proost.
Have one on me.
jpe
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-27-2006 02:53 AM
01-27-2006 02:53 AM
Re: DCL code for setting mail forwarding
I made the line split to have it at a specific column and not to depend on the html input form. Bit I agre, normally I also prefer long lines instead of many continuation lines.
regards Kalle
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-27-2006 03:07 AM
01-27-2006 03:07 AM
Re: DCL code for setting mail forwarding
I like a temp file for bulk updates.
For single updates, consider using a pipe:
$ pipe write sys$output "set forw smtp%""a@b.c""" | mail
$ pipe write sys$output "show forw" | mail
Y
This will allow for easy symbol substitution.
Hein.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-27-2006 04:41 AM
01-27-2006 04:41 AM
Re: DCL code for setting mail forwarding
The following code works:
(username and full_name are defined previously in the procedure.)
$ internet_name= F$element(0," ",full_name)+"."+ -
F$element(1," ",full_name) + "." + F$Element(2," ",full_name)
$ open/write setmailfwd sys$scratch:setmailfwd.com
$ write setmailfwd "$ MAIL"
$ write setmailfwd "set forward/user=''username' SMTP%""''internet_name'@xxx.com"""
$ write setmailfwd "EXIT"
$ close/nolog setmailfwd
$ @sys$scratch:setmailfwd
$ delete sys$scratch:setmailfwd.com;*
I've added the following to confirm:
$ open/write showmailfwd sys$scratch:showmailfwd.com
$ write showmailfwd "$ MAIL"
$ write showmailfwd "show forward/user=''username'"
$ write showmailfwd "EXIT"
$ close/nolog showmailfwd
$ @sys$scratch:showmailfwd
$ delete sys$scratch:showmailfwd.com;*
Niall
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-27-2006 04:45 AM
01-27-2006 04:45 AM
Re: DCL code for setting mail forwarding
Thanks to all, especially Kalle, for your help.
Niall