Re: [foxboro] e-mail from AP51D to PC windows .

Another trick is to use
/usr/lib/sendmail -v some@xxxxxxxxxxxxx </dev/null

This prints the protocol as the email is transfered. Gives good debugging to 
allow fixing of faults

Regards
Darryl Bond


Hirche, Joachim wrote:
> Easy test if you got a working SMTP mail server on the other side:
> 
>       telnet mailhost 25              # port 25 = SMTP
> 
> and type in commands 
> 
>       HELO
>       QUIT
> 
> Sample session against an MS Exchange server with an Internet Mail Service 
> (SMTP mail provider):
> 
>       cci07-/home/cci/cimserv # telnet mailhost 25
>       Trying 10.66.250.5...
>       Connected to cci05.cimconcepts.com.
>       Escape character is '^]'.
>       220 cci05.cimconcepts.com ESMTP Server (Microsoft Exchange Internet 
> Mail Service 5.5.2653.13)   ready                                   # first 
> test passed - got a session on port 25
>       HELO                                    # to see if it answers to 
> commands
>       250 OK
>       QUIT                                    # to exit
>       221 closing connection
>       Connection closed by foreign host.
> 
> This test should work against ANY WORKING SMTP server (MS Exchange, Lotus 
> Notes, UNIXes etc.), it uses common, basic SMTP commands.
> 
> We've set up a bunch of these connections over the years from 51-series boxes 
> and other UNIXes in LAN/WAN environments - works like a charm.  
> Can even be used to send mail to outside recipients, as long as relaying of 
> SMTP mail through the corporate mail server has not been disabled by the IS 
> folks managing the mail server infrastructure.
> 
> BTW, another handy trick for sending mail from scripts under Solaris is to 
> use mailx with -~ (-tilde) option.  You can construct a message in a script 
> as a file and specify to: cc: bcc: subject: etc. inside the message file 
> itself (for automatic notification etc.)
> 
>       mailx -~ somebody@xxxxxxxxxxxxx < mymailfile
> 
> with mymailfile content like
> 
>       ~t somebody.else@xxxxxxxxxxxxxxxxxxxx metoo@xxxxxxxxxxxxxx
>       ~c metoo.athome@xxxxxxxxxxxxxxxxxxxx
>       ~s some subject line
> 
> We typically keep a (cc) copy of the mail file on the local system for 
> troubleshooting, call-outs etc and just call 
> 
>       mailx -~ root < mymailfile
> 
> and specify the 'real' mail recipients and subjects inside the mail address 
> files using ~t and ~c etc.   You can also use have predefined address lists / 
> subjects in files and use cat to pipe the address list and the message body 
> in like:
> 
>       cat myaddresslist mymailfile | mailx -~ root 
> 
> Gory details on the tilde commands can be found in the mailx man page.
> 
> Joachim Hirche
> CIM Concepts Inc.
> 200 Continental Drive Ste 112  Newark  DE  19713  USA
> 302 368 8982 x111
> mailto:Joachim.Hirche@xxxxxxxxxxxxxxx
> 
> 
> -----Original Message-----
> From: Schouten, Frits JF [mailto:Frits.Schouten@xxxxxxxxxxxx]
> Sent: Sunday, June 23, 2002 17:39
> To: 'foxboro@xxxxxxxxxxxxx'
> Subject: Re: [foxboro] e-mail from AP51D to PC windows .
> 
> 
> Adding to this:
> You don't have to change /etc/mail/sendmail.cf if the entry in /etc/host
> looks like this:
> 
> 123.456.789.123  mailhost
> 
> Make sure that you use the correct IP address for mailhost and not the above
> example.
> 
> Cheers,
> Frits Schouten
> NZSteel.
> 
> 
> -----Original Message-----
> From: Lowell, Tim: [mailto:tlowell@xxxxxxxx]
> Sent: Friday, 21 June 2002 01:06
> To: 'foxboro@xxxxxxxxxxxxx'
> Subject: Re: [foxboro] e-mail from AP51D to PC windows .
> 
> 
> 
> Thierry,
> 
> Setting up e-mail:
> 
> 1.    Figure out the IP address of your SMTP mail server (Outlook, Lotus
> Notes, etc.).  You may need the IT group to help you out.  If they have
> better things to do, which they often do, you can usually find the name of
> the SMTP server from the header of an e-mail.  Once you get the name, you
> can ping that name in Command Prompt to find the IP address.
> 2.    Add the name and IP address of the SMTP server to your /etc/hosts
> file on the AW51D.  Follow the format that's there, i.e. IP address, tab,
> server name.
> 3.    Edit the file /etc/mail/sendmail.cf on the AW51D.  Find the line
> that says:
> 
>       # major relay host
>       DR<something>
>       CR<something>
> 
>       Where I have <something>, enter in the name of the mail server
> exactly as you entered it in /etc/hosts.  No spaces after DR and CR!
> 
> 4.    To actually send mail, use either the command "mail" or "mailx" in a
> script.  For example, the script could have a line:
>       mailx -s "subject" me@xxxxxxxxxxxx < /opt/scripts/yourfile.txt
> 
>       Which would mail the file /opt/scripts/yourfile.txt to the address
> me@xxxxxxxxxxxx <mailto:me@xxxxxxxxxxxx> .  I like mailx because you can add
> the -s switch and include a subject.
> 
> This should set you up.  If it doesn't work, you're IT group may not have
> SMTP set up on the mail server (unlikely), or you have a firewall that
> blocks SMTP traffic between the AW and the mail server (more likely).  Good
> luck!
> 
> Tim Lowell
> Control Systems Engineer
> Phillips Petroleum Company, Trainer Refinery
> Phone:        610-364-8362
> Fax:  610-364-8211
> tlowell@xxxxxxxx
> 
> 
>       -----Original Message-----
>       From:   Mougeot, Thierry T SPM-SMUC
> [SMTP:Thierry.T.Mougeot@xxxxxxxxxxxxx]
>       Sent:   Thursday, June 20, 2002 8:43 AM
>       To:     list users IAS Foxboro (E-mail)
>       Subject:        [foxboro] e-mail  from AP51D to PC windows .
> 
> 
>       Hi list ,
> 
>       I'm looking for a script to send automatically by e-mail a ascii
> file (
>       result of isql request on historian , system monitor messages  ) to
> a
>       computer with operating system windows 2000 connects to the second
> port
>       ethernet of AP51D .=20
>       I would be grateful if you could send me a script or instructions .
> 
>       Best Regards .
> 
>       MOUGEOT Thierry
>       Secteur SMUC Utilites Chimie=20
>       Shell P=E9trochimie M=E9diterran=E9e
>       BP 14, 13131  Berre l'=E9tang, Cedex, France
> 
>       Tel: +33 4 42 74  57 03 Fax: 54 20
>       Email: Thierry.Mougeot@xxxxxxxxx
>       Internet: http://www.shell.com/chemicals
> 
>        
>        
>       
> _______________________________________________________________________
>       This mailing list is neither sponsored nor endorsed by Invensys
> Process
>       Systems (formerly The Foxboro Company). Use the info you obtain here
> at
>       your own risks. Read
> http://www.thecassandraproject.org/disclaimer.html
>        
>       foxboro mailing list:
> http://www.freelists.org/list/foxboro
>       to subscribe:
> mailto:foxboro-request@xxxxxxxxxxxxx?subject=join
>       to unsubscribe:
> mailto:foxboro-request@xxxxxxxxxxxxx?subject=leave
>        
>  
>  
> _______________________________________________________________________
> This mailing list is neither sponsored nor endorsed by Invensys Process
> Systems (formerly The Foxboro Company). Use the info you obtain here at
> your own risks. Read http://www.thecassandraproject.org/disclaimer.html
>  
> foxboro mailing list:             http://www.freelists.org/list/foxboro
> to subscribe:         mailto:foxboro-request@xxxxxxxxxxxxx?subject=join
> to unsubscribe:      mailto:foxboro-request@xxxxxxxxxxxxx?subject=leave
>  
> 
> EOM 
> 
> NOTICE - This message and any attached files may contain information that is
> confidential and/or subject of legal privilege intended only for use by the
> intended recipient. If you are not the intended recipient or the person
> responsible for delivering the message to the intended recipient, be advised
> that you have received this message in error and that any dissemination,
> copying or use of this message or attachment is strictly forbidden, as is
> the disclosure of the information therein.  If you have received this
> message in error please notify the sender immediately and delete the
> message.
> 
> EOM 
> 
> NOTICE - This message and any attached files may contain information that is
> confidential and/or subject of legal privilege intended only for use by the
> intended recipient. If you are not the intended recipient or the person
> responsible for delivering the message to the intended recipient, be advised
> that you have received this message in error and that any dissemination,
> copying or use of this message or attachment is strictly forbidden, as is
> the disclosure of the information therein.  If you have received this
> message in error please notify the sender immediately and delete the
> message.
> 
> 
>  
>  
> _______________________________________________________________________
> This mailing list is neither sponsored nor endorsed by Invensys Process
> Systems (formerly The Foxboro Company). Use the info you obtain here at
> your own risks. Read http://www.thecassandraproject.org/disclaimer.html
>  
> foxboro mailing list:             http://www.freelists.org/list/foxboro
> to subscribe:         mailto:foxboro-request@xxxxxxxxxxxxx?subject=join
> to unsubscribe:      mailto:foxboro-request@xxxxxxxxxxxxx?subject=leave
>  
>  
>  
> _______________________________________________________________________
> This mailing list is neither sponsored nor endorsed by Invensys Process
> Systems (formerly The Foxboro Company). Use the info you obtain here at
> your own risks. Read http://www.thecassandraproject.org/disclaimer.html
>  
> foxboro mailing list:             http://www.freelists.org/list/foxboro
> to subscribe:         mailto:foxboro-request@xxxxxxxxxxxxx?subject=join
> to unsubscribe:      mailto:foxboro-request@xxxxxxxxxxxxx?subject=leave
>  



 
 
_______________________________________________________________________
This mailing list is neither sponsored nor endorsed by Invensys Process
Systems (formerly The Foxboro Company). Use the info you obtain here at
your own risks. Read http://www.thecassandraproject.org/disclaimer.html
 
foxboro mailing list:             http://www.freelists.org/list/foxboro
to subscribe:         mailto:foxboro-request@xxxxxxxxxxxxx?subject=join
to unsubscribe:      mailto:foxboro-request@xxxxxxxxxxxxx?subject=leave
 

Other related posts: