- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - OpenVMS
- >
- Re: VMS mail error %MAIL-E-NOSUCHUSR, no such user
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
Forums
Discussions
Discussions
Discussions
Forums
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
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
тАО07-28-2005 07:24 AM
тАО07-28-2005 07:24 AM
VMS mail error %MAIL-E-NOSUCHUSR, no such user
This is done via a batch process and the warning mail messages sometimes fail if one of the users is no longer valid.
I know the obvious way is to execute the mail command for each individual user but thats not very elegant.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-28-2005 07:48 AM
тАО07-28-2005 07:48 AM
Re: VMS mail error %MAIL-E-NOSUCHUSR, no such user
Are you using distribution lists (.DIS) or processing a list of accounts?
Is all this happening on one local node, or are user accounts on multiple nodes involved?
Unfortunately, f$user doesn't allow you to check for the existence (or not) of a valid VMS account.
You've also not taken into account(!) the fact that a perfectly valid account might have the DISMAIL or DISNEWMAIL flags enabled.
WWWebb
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-28-2005 08:01 AM
тАО07-28-2005 08:01 AM
Re: VMS mail error %MAIL-E-NOSUCHUSR, no such user
$ Set NoOn
$ Mail/Subject="Text" Filename.Ext @Dist.Lis
$ If $Status .Eq. %X107E802A
$ Then
$ Mail/Subject="ErrorText" Filename.Ext @Known_Good_Dist.Lis
$ Set On
Keep the Known_Good_Dist.Lis to a minimum of users that are certain to be valid. This will let you know quickly when a distribution list has a problem.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-28-2005 08:02 AM
тАО07-28-2005 08:02 AM
Re: VMS mail error %MAIL-E-NOSUCHUSR, no such user
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-28-2005 08:18 AM
тАО07-28-2005 08:18 AM
Re: VMS mail error %MAIL-E-NOSUCHUSR, no such user
I have been doing something very similiar to what you suggested. I was hoping there was a better way. One alternative that I am leaning towards is just use SMTP mail only.
William,
All of the users are local. I am using a list of names like "USER1,USER2,USER3".
I guess a slick way to do it would be to use f$element in a loop and send the mail once for each user. If it fails for a specific user I could just log it and continue to the next user.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-28-2005 08:35 AM
тАО07-28-2005 08:35 AM
Re: VMS mail error %MAIL-E-NOSUCHUSR, no such user
$ set noverify
$ ws = "WRITE SYS$OUTPUT"
$ status_mail = "USER1,USER2,smtp%""test@test.COM"""
$ x = 0
$ set noon
$ mail_loop:
$ xuser = f$element(x,",",status_mail)
$ if xuser .nes. ","
$ then
$ x = x + 1
$ if xuser .eqs. "" then goto mail_loop !!! Just in case we find a blank element. !!!
$ ws "-I- Sending Mail to "+xuser
$ mail/noself nl: 'xuser'/subject="This is a Test"
$ if .not. $status then ws "-E- Error occured sending mail to ""''xuser'"". (''$status')"
$ goto mail_loop
$ endif
$ set on
$!
$ EXIT
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-28-2005 06:10 PM
тАО07-28-2005 06:10 PM
Re: VMS mail error %MAIL-E-NOSUCHUSR, no such user
Get a copy of NMAIL from the freeware CD. It's a mail transport which doesn't require the usual handshake from the target node. NMAIL will retry up to some threshold (useful if the target node is down) before deciding that a message is undeliverable.
MAIL/SUBJ="subject" file nm%user1,nm%user2
If the target user doesn't exist, the send won't fail, but the NMAIL daemon will mail you back an error report.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-28-2005 06:13 PM
тАО07-28-2005 06:13 PM
Re: VMS mail error %MAIL-E-NOSUCHUSR, no such user
MAIL> SET TRANSPORT NM%
This will set it as the default transport (I don't think that ever got documented...). So, any mail address without an explicit transport will use NMAIL.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-28-2005 08:55 PM
тАО07-28-2005 08:55 PM
Re: VMS mail error %MAIL-E-NOSUCHUSR, no such user
Here is an other thought...
You can always have a mail forward, even if the user is no longer valid.
So you could create a single dummy user name, disabled, to 'collect' stray messages for later analysis and fixes.
$MCR AUTHORIZE ADD JUNKMAIL /DEV...
MAIL> SET FORW JUNKMAIL/USER=SOME_USER
MAIL> SET FORW JUNKMAIL/USER=OTHER_USER
hein.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-29-2005 02:27 AM
тАО07-29-2005 02:27 AM
Re: VMS mail error %MAIL-E-NOSUCHUSR, no such user
Relatively current VMS mail versions don't require a VMS account (I don't recall how far back it goes V7, V6???). You can create mail forwarding entries without a corresponding VMS account.
Bill
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-29-2005 05:16 AM
тАО07-29-2005 05:16 AM
Re: VMS mail error %MAIL-E-NOSUCHUSR, no such user
$ pipe write sys$output "YES" | mail/sub=testing nl: user1,user2,user3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-31-2005 04:39 PM
тАО07-31-2005 04:39 PM
Re: VMS mail error %MAIL-E-NOSUCHUSR, no such user
>$ pipe write sys$output "YES" | mail/sub=testing nl: user1,user2,user3
This is a very long winded way of executing the MAIL command in a subprocess and ignore the return status. You actually create 2 subprocesses to execute the command. A much easier way to do that is:
$ SPAWN/NOWAIT MAIL/SUBJ="test" NL: user1,user2,user3
Even better is to use SET NOON, then you don't need to incur the cost of process creation:
$ SET NOON
$ MAIL/SUBJ="test" NL: user1,user2,user3
$ SET ON
However, with both of these mechanism, if any of those users triggers a MAIL-E-NOSUCHUSER, then NONE of them will receive mail. That's just the way MAIL works with the default transport.
If you want to make sure those users that exist get the mail, and those that don't are ignored, you can either issue one MAIL command per user, or use NMAIL as suggested earlier. NMAIL is a much better solution. It does exactly what you want. Just because it's freeware, doesn't mean it's no good. It was standard on every VMS system in Digital, and should have been incorporated into the product.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-01-2005 03:00 AM
тАО08-01-2005 03:00 AM
Re: VMS mail error %MAIL-E-NOSUCHUSR, no such user
Mail treats target usernames as logical names allowing you to define 'operator_of_the_day' to a real mail name outside the forwarding system. Exploiting that, you can define a (system wide) logical name(s) for invalid usernames translating to " ". This will make vaxmail effectively ignore those usernames and create unpredictable havoc to your system when that name is used in an other context.
Jeff>> $ pipe write sys$output "YES" | mail/sub=testing nl: user1,user2,user3
If you had a file in a known location on your system starting with a "y" or "Y", then it would be much more efficient to use:
$DEFINE/USER SYS$INPUT some_file_with_yes
$MAIL/sub=testing nl: user1,user2,user3
Bill>> Relatively current VMS mail versions don't require a VMS account
Hi Bill, yes that is what I was trying to exploit: create as many mail forwards as you need for usernames that no longer exist but used to be valid. But I would think you would then want a dedicated username to receive those mail, that's why my example included a UAF ADD. Not for the target, but for a helpr account. Of course you could also send them to an existing 'system' or an application manager account.
fwiw,
Hein.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-01-2005 04:19 AM
тАО08-01-2005 04:19 AM
Re: VMS mail error %MAIL-E-NOSUCHUSR, no such user
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-01-2005 05:14 AM
тАО08-01-2005 05:14 AM
Re: VMS mail error %MAIL-E-NOSUCHUSR, no such user
FWIW, I was thinking along the same lines as Hein in creating an account to act as a bit bucket for undelivered mail and forward old users' mail to there.
You could, I suppose, use system services to check whether a user exists before trying to mail them... You could probably even check the account exists using the example I got from somewhere of what the new mail count was for the user - no directory, no username one would hope they wouldn't have a new mail count!