- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - OpenVMS
- >
- Display new Mail message using SSH
Operating System - OpenVMS
1753624
Members
5701
Online
108797
Solutions
Forums
Categories
Company
Local Language
юдл
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
юдл
back
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
Discussion Boards
Discussion Boards
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Topic Options
- 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
тАО04-09-2008 04:11 PM
тАО04-09-2008 04:11 PM
Display new Mail message using SSH
When I login to my username using SSH, the "new Mail" message fails to appear. Using TELNET, the message appears as normal. The CheckMail parameter is set to yes. Any ideas?
Thanks.
Tom
Thanks.
Tom
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-09-2008 04:56 PM
тАО04-09-2008 04:56 PM
Re: Display new Mail message using SSH
SSH also does SY$ANNOUNCEMENT differently.
Too bad.
If you like a workaround, then you could use the following trivial code...
#include
#include
#include
typedef struct { short len, cod; void *address; int *retlen; } item;
main()
{
int status, user_context = 0;
int SYS$GETJPIW(), MAIL$USER_BEGIN(), MAIL$USER_GET_INFO(), MAIL$USER_END();
char username[14];
short mess;
item null[] = {0,0,0,0};
item user[] = {12, JPI$_USERNAME, username, (int *)user, 0,0,0,0};
item news[] = {sizeof(mess), MAIL$_USER_NEW_MESSAGES, &mess, 0, 0,0,0,0};
status = MAIL$USER_BEGIN(&user_context, null, null);
if (status & 1) status = SYS$GETJPIW(0,0,0,user,0,0,0);
user[0].cod = MAIL$_USER_USERNAME; /* watch out! Double usage user itemlist */
if (status & 1) status = MAIL$USER_GET_INFO(&user_context, user, news);
MAIL$USER_END(&user_context, null, null);
username[user[0].len] = '\0';
printf ("%d new message%s for %s\n", mess, (mess==1)? "": "s", username);
return status;
}
hth,
Hein.
Too bad.
If you like a workaround, then you could use the following trivial code...
#include
#include
#include
typedef struct { short len, cod; void *address; int *retlen; } item;
main()
{
int status, user_context = 0;
int SYS$GETJPIW(), MAIL$USER_BEGIN(), MAIL$USER_GET_INFO(), MAIL$USER_END();
char username[14];
short mess;
item null[] = {0,0,0,0};
item user[] = {12, JPI$_USERNAME, username, (int *)user, 0,0,0,0};
item news[] = {sizeof(mess), MAIL$_USER_NEW_MESSAGES, &mess, 0, 0,0,0,0};
status = MAIL$USER_BEGIN(&user_context, null, null);
if (status & 1) status = SYS$GETJPIW(0,0,0,user,0,0,0);
user[0].cod = MAIL$_USER_USERNAME; /* watch out! Double usage user itemlist */
if (status & 1) status = MAIL$USER_GET_INFO(&user_context, user, news);
MAIL$USER_END(&user_context, null, null);
username[user[0].len] = '\0';
printf ("%d new message%s for %s\n", mess, (mess==1)? "": "s", username);
return status;
}
hth,
Hein.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-09-2008 05:51 PM
тАО04-09-2008 05:51 PM
Re: Display new Mail message using SSH
As Hein said, SSH doesn't behave like telnet.
Another thing that does not work with SSH is disconnectable terminals. I.e. process using VTAxx like the following:
$ sho term
Terminal: _VTA888: Device_Type: VT400_Series Owner: JON
Physical terminal: _TNA889:
Jon
Another thing that does not work with SSH is disconnectable terminals. I.e. process using VTAxx like the following:
$ sho term
Terminal: _VTA888: Device_Type: VT400_Series Owner: JON
Physical terminal: _TNA889:
Jon
it depends
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-10-2008 08:13 AM
тАО04-10-2008 08:13 AM
Re: Display new Mail message using SSH
Thanks for the program. Works great.
Tom
Tom
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
News and Events
Support
© Copyright 2024 Hewlett Packard Enterprise Development LP