Can we block domains while using JCL to send emails?

Other Mainframe related questions which attracts you and there is no suitable Forum you find for it and related FAQs.
Post Reply
Mr Awasthi
Registered Member
Posts: 26
Joined: Mon Aug 12, 2013 10:42 am

Can we block domains while using JCL to send emails?

Post by Mr Awasthi »

Hi,

I know we can send email using a JCL. I have identified JCLs which should work for me. But I have thinking on how to block a list of domains while sending email from JCL? Is it possible even? And if yes, can anyone refer me to any manual to help me with this.

Thanks for any help on this.
User avatar
Robert Sample
Global Moderator
Global Moderator
Posts: 1900
Joined: Fri Jun 28, 2013 1:22 am
Location: Dubuque Iowa
United States of America

Re: Can we block domains while using JCL to send emails?

Post by Robert Sample »

I know we can send email using a JCL.
Saying you are using JCL to send emails is like saying you went from point A to point B using a steering wheel -- accurate but completely useless information.  An address space in z/OS only has about 4 sources -- started task, TSO user, OMVS process, or batch job (JCL). 
Are you using sendmail or SMTP or the successor to SMTP, CSSMTP, in your JCL?  THAT would be useful information.  However, in general domain blocking would be a function of the message routing, NOT the email client.  I took another look at the SMTP setup parameters in the IP Configuration Reference manual in the Communications Server bookshelf, and I don't see anything there related to blocking domains.  You can block inbound traffic for SMTP but that's about it.
Talk to your site support group about what can be done within your company network.
William Collins
Global Moderator
Global Moderator
Posts: 490
Joined: Sun Aug 25, 2013 7:24 pm

Re: Can we block domains while using JCL to send emails?

Post by William Collins »

If you know you have addresses you don't want to send email to, just don't send it. I've never heard of the blocking of sending email. Just don't do it.
Mr Awasthi
Registered Member
Posts: 26
Joined: Mon Aug 12, 2013 10:42 am

Re: Can we block domains while using JCL to send emails?

Post by Mr Awasthi »

Hi,

I'm using the below JCL to send the email. So it should be SMTP.

Code: Select all

//SENDMAIL JOB (XXX,YYY),                                            
//             'MAIL FILE ',                                            
//             MSGCLASS=M,                                              
//             CLASS=Y                                                                            
//*                                                                      
//STEP100  EXEC PGM=IEBGENER                                            
//SYSIN    DD  DUMMY                                                    
//SYSPRINT DD  SYSOUT=*                                                  
//SYSUT2   DD  SYSOUT=(A,SMTP)                                          
//SYSUT1   DD  *
helo MVS
MAIL FROM:<someid@some.com>
rcpt to:<someid1@ssome.com>
data 
FROM: Abcd 
TO: <someid@some.com> 
SUBJECT: test mail 
Mime-Version: 1.0 
Content-Type: text/plain; name="XYZ.txt" 
Content-Disposition: attachment; filename="XYZ.txt"
//         DD  DISP=SHR,DSN=attachment.file(0) 
//*
Mr Awasthi
Registered Member
Posts: 26
Joined: Mon Aug 12, 2013 10:42 am

Re: Can we block domains while using JCL to send emails?

Post by Mr Awasthi »

William Collins wrote:If you know you have addresses you don't want to send email to, just don't send it. I've never heard of the blocking of sending email. Just don't do it.
There had been some misuse of the SMTP, so we want to see if we can block the email to some general service providers,like yahoo, gmail.
User avatar
Robert Sample
Global Moderator
Global Moderator
Posts: 1900
Joined: Fri Jun 28, 2013 1:22 am
Location: Dubuque Iowa
United States of America

Re: Can we block domains while using JCL to send emails?

Post by Robert Sample »

 Yes, that is SMTP.  And no, there is no way on the mainframe to block domains from being sent mail.  Contact your site support group and work with whoever supports your mail server to see if that can be used for blocking; you may need to work with the network group as well.
William Collins
Global Moderator
Global Moderator
Posts: 490
Joined: Sun Aug 25, 2013 7:24 pm

Re: Can we block domains while using JCL to send emails?

Post by William Collins »

Not my area, so can't be sure, but look at this one: https://www.ibm.com/support/knowledgece ... cility.htm

Before dismissing it (incoming mail) look at the last paragraph. Seems to imply the the route JES-to-SMTP counts as "incoming".

Otherwise take actual SMTP use away from non-Production environments. Presumes you have control over email addresses in Production. You do, don't you?
Mr Awasthi
Registered Member
Posts: 26
Joined: Mon Aug 12, 2013 10:42 am

Re: Can we block domains while using JCL to send emails?

Post by Mr Awasthi »

Robert Sample wrote: Yes, that is SMTP.  And no, there is no way on the mainframe to block domains from being sent mail.  Contact your site support group and work with whoever supports your mail server to see if that can be used for blocking; you may need to work with the network group as well.
We have opened a ticket with the support and working with them. Thanks for your guidance.
Mr Awasthi
Registered Member
Posts: 26
Joined: Mon Aug 12, 2013 10:42 am

Re: Can we block domains while using JCL to send emails?

Post by Mr Awasthi »

William Collins wrote:Not my area, so can't be sure, but look at this one: https://www.ibm.com/support/knowledgece ... cility.htm

Before dismissing it (incoming mail) look at the last paragraph. Seems to imply the the route JES-to-SMTP counts as "incoming".

Otherwise take actual SMTP use away from non-Production environments. Presumes you have control over email addresses in Production. You do, don't you?
In Production we have control but not during the UAT. Though UAT is a separate environment but it's a mirror prod and clients do not behave intelligently.
Thanks for the link, it does help. Still reading it in depth.
Post Reply

Create an account or sign in to join the discussion

You need to be a member in order to post a reply

Create an account

Not a member? register to join our community
Members can start their own topics & subscribe to topics
It’s free and only takes a minute

Register

Sign in

Return to “Other Mainframe Topics, Off-Topics, FAQs.”