Page 1 of 1

Can we block domains while using JCL to send emails?

Posted: Mon May 09, 2016 12:05 pm
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.

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

Posted: Mon May 09, 2016 5:31 pm
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.

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

Posted: Tue May 10, 2016 11:19 am
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.

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

Posted: Thu May 19, 2016 2:08 pm
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) 
//*

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

Posted: Thu May 19, 2016 2:10 pm
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.

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

Posted: Thu May 19, 2016 2:16 pm
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.

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

Posted: Fri May 20, 2016 11:33 am
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?

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

Posted: Mon May 23, 2016 5:31 pm
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.

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

Posted: Mon May 23, 2016 5:33 pm
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.