Hello you all,
Well I'm trying to write a small CL to inform me via email of some messages that I received on my AS/400.
I've been browsing IBM site, this site... and other to find how to send email via my AS/400... but it's still not working...
I'm running V5R3... and my SMTP mail server runs on a Linux machine: ip 122.1.3.100.
What I'm trying to do is to send an email via the command:
SNDDST TYPE(*LMSG) TOINTNET(('myemail@mycompany.com')) DSTD('TEST') LONGMSG('TEST EMAIL')
When I run this command, I received nothing on our SMTP mail server or in my mail but on the AS/400, I have this:CPC9033 Send distribution completed successfully.
Well, I'm sure this is a config problem but where ??? Could you help me debug what's wrong? Thanks in advance...
The subsystems are well started:
QSNADS QSYS SBS 0,0 DEQW
ATLSUPL QSNADS BCH 0,0 EVTW
QSYSWRK QSYS SBS 0,0 DEQW
QMSF QMSF BCH 0,0 DEQW
QMSF QMSF BCH 0,0 DEQW
QMSF QMSF BCH 0,0 DEQW
QTSMTPBRCL QTCP BCH 0,0 DEQW
QTSMTPBRSR QTCP BCH 0,0 DEQW
QTSMTPCLTD QTCP BCH 0,0 DEQW
QTSMTPSRVD QTCP BCH 0,0 SELW
Here is how I configure my AS/400:
1 - Specify the SMTP server:
CHGSMTPA AUTOSTART(*YES) MAILROUTER('122.1.3.100') FIREWALL(*YES) ALWRLY(*BOTH)
2 - Accept all ip addresses from my network to use this new SMTP server:
ADDSMTPLE TYPE(*ACCEPT) INTNETADR('122.1.3.0') SUBNETMASK('255.255.255.0')
3 - Add a gateway to SNADS:
ADDDIRE USRID(MAIL GATEWAY) USRD('SMTP Mail Gw') PREFADR(NETUSRID *IBM ATCONTXT)
CHGDSTA SMTPRTE(MAIL GATEWAY)
After doing those config, I stopped and restarted the SMTP server:
ENDTCPSVR *SMTP
STRTCPSVR *SMTP
Last thing, during all my tests, I was logged under QSECOFR and I had an SMTP e-mail address for the user QSECOFR via PF19 of WRKDIRE
Display Name for SMTP
User ID/Address . . . . . : QSECOFR QSECOFR
SMTP user ID . . . . . : AS400
SMTP domain . . . . . . : MYCOMPANY.COM
SMTP route . . . . . . :
But still no email received...
How can I debug what's wrong ? Any ideas of the problem ?
Thanks in advace for your help.
Well I'm trying to write a small CL to inform me via email of some messages that I received on my AS/400.
I've been browsing IBM site, this site... and other to find how to send email via my AS/400... but it's still not working...
I'm running V5R3... and my SMTP mail server runs on a Linux machine: ip 122.1.3.100.
What I'm trying to do is to send an email via the command:
SNDDST TYPE(*LMSG) TOINTNET(('myemail@mycompany.com')) DSTD('TEST') LONGMSG('TEST EMAIL')
When I run this command, I received nothing on our SMTP mail server or in my mail but on the AS/400, I have this:CPC9033 Send distribution completed successfully.
Well, I'm sure this is a config problem but where ??? Could you help me debug what's wrong? Thanks in advance...
The subsystems are well started:
QSNADS QSYS SBS 0,0 DEQW
ATLSUPL QSNADS BCH 0,0 EVTW
QSYSWRK QSYS SBS 0,0 DEQW
QMSF QMSF BCH 0,0 DEQW
QMSF QMSF BCH 0,0 DEQW
QMSF QMSF BCH 0,0 DEQW
QTSMTPBRCL QTCP BCH 0,0 DEQW
QTSMTPBRSR QTCP BCH 0,0 DEQW
QTSMTPCLTD QTCP BCH 0,0 DEQW
QTSMTPSRVD QTCP BCH 0,0 SELW
Here is how I configure my AS/400:
1 - Specify the SMTP server:
CHGSMTPA AUTOSTART(*YES) MAILROUTER('122.1.3.100') FIREWALL(*YES) ALWRLY(*BOTH)
2 - Accept all ip addresses from my network to use this new SMTP server:
ADDSMTPLE TYPE(*ACCEPT) INTNETADR('122.1.3.0') SUBNETMASK('255.255.255.0')
3 - Add a gateway to SNADS:
ADDDIRE USRID(MAIL GATEWAY) USRD('SMTP Mail Gw') PREFADR(NETUSRID *IBM ATCONTXT)
CHGDSTA SMTPRTE(MAIL GATEWAY)
After doing those config, I stopped and restarted the SMTP server:
ENDTCPSVR *SMTP
STRTCPSVR *SMTP
Last thing, during all my tests, I was logged under QSECOFR and I had an SMTP e-mail address for the user QSECOFR via PF19 of WRKDIRE
Display Name for SMTP
User ID/Address . . . . . : QSECOFR QSECOFR
SMTP user ID . . . . . : AS400
SMTP domain . . . . . . : MYCOMPANY.COM
SMTP route . . . . . . :
But still no email received...
How can I debug what's wrong ? Any ideas of the problem ?
Thanks in advace for your help.
Comment