Author | Topic: SMTP Client and SMTP server parameter | |
---|---|---|
Jose Adriano Baltieri | SMTP Client and SMTP server parameter on Fri, 11 Aug 2006 09:08:06 -0300 I have a doubt aoubt STMP Client first parameter : cSmtpServer. I think it is intended to use your local installation STMP Server as a constant (DEFINE). So, in my case, I would use something like smtp.unimep.br. So, when I want to deliver a message to someone@unimep.br, it's simple cause it is on the same domain. Now, my doubts : When I want to deliver a message to someone@mars.com, how do I do ? Should I use that same cSmtpServer parameter ? Or do I have to provide another one ? If so, how can I get it ? Will the deliver be done directly to "mars.com" or will it pass through my local SMTP server ? If it's delivered via my local SMTP server, the result of the send process will be always OK, no matter how the final deliver will be ? Thanks in advance ! | |
Frans Vermeulen | Re: SMTP Client and SMTP server parameter on Fri, 11 Aug 2006 15:13:05 +0200 Jose, > I have a doubt aoubt STMP Client first parameter : cSmtpServer. > > I think it is intended to use your local installation STMP Server as a > constant (DEFINE). > > So, in my case, I would use something like smtp.unimep.br. > > So, when I want to deliver a message to someone@unimep.br, it's simple cause > it is on the same domain. > > Now, my doubts : > > When I want to deliver a message to someone@mars.com, how do I do ? > > Should I use that same cSmtpServer parameter ? Or do I have to provide another > one ? You can use any smtp-server, which accepts you as a sender, ie.: When the system administrator sets a policy where every machine from the local network can send, any machine on the local network can use that smtp-server. Every system administrator imposes such restrictions, to avoid, his smtp-server being abused by spammers, and the above mentioned restriction (only local users are allowed to send mail) is widely used. Theoretically there should be no problem when using smtp.mars.com as the smtp-server, because it has to accept mail addressed to <alias>@mars.com, but when smtp.mars.com uses fi. bSMTP or mail redirectors, it will fail, because you (unimep.br) are not a trusted source, nor the redirector. smtp.unimep.br should work always, if you comply with the smtp-servers policies. (you do, otherwise you could not send any email). It will automatically pass the mail on to the redirector, or the location where mars.com is registered/located (MX). > Will the deliver be done directly to "mars.com" or will it pass through my > local SMTP server ? If it's delivered via my local SMTP server, the result of > the send process will be always OK, no matter how the final deliver will be ? If you send via smtp.unimep.br it will go through the local SMTP-server. Dependent on the receiving mail configuration, it will be posted directly, (probably not) or it will pass one or more mailservers before getting at smtp.mars.com. You can only check delivery at the smtp-server you define with cSmtpServer. Regards, Frans Vermeulen | |
Jose Adriano Baltieri | Re: SMTP Client and SMTP server parameter on Fri, 11 Aug 2006 10:17:28 -0300 Frans Vermeulen wrote: > Jose, > >> I have a doubt aoubt STMP Client first parameter : cSmtpServer. >> >> I think it is intended to use your local installation STMP Server as a >> constant (DEFINE). >> >> So, in my case, I would use something like smtp.unimep.br. >> >> So, when I want to deliver a message to someone@unimep.br, it's simple > cause >> it is on the same domain. >> >> Now, my doubts : >> >> When I want to deliver a message to someone@mars.com, how do I do ? >> >> Should I use that same cSmtpServer parameter ? Or do I have to provide > another >> one ? > > You can use any smtp-server, which accepts you as a sender, ie.: > When the system administrator sets a policy where every machine from the > local network can send, any machine on the local network can use > that smtp-server. > > Every system administrator imposes such restrictions, to avoid, his > smtp-server being abused by spammers, and the above mentioned > restriction (only local users are allowed to send mail) is widely used. > > Theoretically there should be no problem when using smtp.mars.com > as the smtp-server, because it has to accept mail addressed to > <alias>@mars.com, but when smtp.mars.com uses fi. bSMTP or > mail redirectors, it will fail, because you (unimep.br) are not a trusted > source, nor the redirector. > > smtp.unimep.br should work always, if you comply with the smtp-servers > policies. (you do, otherwise you could not send any email). It will > automatically pass the mail on to the redirector, or the location where > mars.com is registered/located (MX). > >> Will the deliver be done directly to "mars.com" or will it pass through my >> local SMTP server ? If it's delivered via my local SMTP server, the result > of >> the send process will be always OK, no matter how the final deliver will > be ? > > If you send via smtp.unimep.br it will go through the local SMTP-server. > Dependent on the receiving mail configuration, it will be posted directly, > (probably not) or it will pass one or more mailservers before getting at > smtp.mars.com. > > You can only check delivery at the smtp-server you define with cSmtpServer. > > Regards, > Frans Vermeulen > > Mr Vermeulen: Thank you so much for you answer ! The thing is : I need to recognize successfull email delivery , here or to Mars.com. Cause I have a field on my database that I want to REPLACE with OK or Not OK. So, my guess is that if I have a local delivery, which is simpler of course, I wont have a reliable result code to set up my database. Isnt it ? | |
Frans Vermeulen | Re: SMTP Client and SMTP server parameter on Fri, 11 Aug 2006 17:23:17 +0200 Jose, > So, my guess is that if I have a local delivery, which is simpler of course, I > wont have a reliable result code to set up my database. Correct, and if you don't have a local delivery, you will probably have no delivery at all. Regards, Frans Vermeulen | |
Phil Ide | Re: SMTP Client and SMTP server parameter on Fri, 11 Aug 2006 17:17:59 +0100 Adriano, > The thing is : I need to recognize successfull email delivery , here or to > Mars.com. > > Cause I have a field on my database that I want to REPLACE with OK or Not OK. > > So, my guess is that if I have a local delivery, which is simpler of course, I > wont have a reliable result code to set up my database. It is possible you can successfully deliver to your local SMTP server, but that it in turn fails to deliver to mars.com. A typical reason for this is that the domain MX record for mars.com cannot be found, or the mailbox (someone@) does not exist and the email is therefore rejected by mail.mars.com. When the error occurs after you have delivered to your local SMTP server, the only ay to determine an error has occurred is the receipt of a mail-delivery message, which is sent by email to the local account you used to send the email in the first place. Regards, Phil Ide ----------------------------------------------------------------- xbHCL (http://www.xbHCL.com) Xbase++ HTML command layer PBIH (http://www.pbih.eu) Polar Bear International Hosting ----------------------------------------------------------------- Xbase++ FAQ, Libraries and Sources: http://www.idep.org.uk/xbase My system goes down more often than a $10 whore. | |
Jose Adriano Baltieri | Re: SMTP Client and SMTP server parameter on Fri, 11 Aug 2006 14:08:38 -0300 Thanks Frans and thanks Phil ! As a matter of fact, nowadays I use Mercury server (www.pmail.com) to send my emails. How it works ? I simply write plain ASCII files (pretty much like an email message being dumped from a email client to a plain text file) onto a INPUT folder. This software, Mercury, continously scans for this folder and grabs these files. It will do the deliver for me. So, it is very practical cause even from old Clipper I can send emails. I only have to MEMOWRIT that input file. And I have done this for years, way before we even had XPP. Back in 1996 we used to send emails from Clipper itself using it. My guess is that Mercury delivers emails directly to mars.com cause it doesnt have on it's configuration MY own SMTP server. Also, it shows on its display that it is doing it (delivering to mars). The problem is that now I need to know about the successfull delivery of the email to be able to update my database. And I cant customize Mercury to do that. So, I thought about writing my own "Mercury" (to interconect to Mars!) but, it seems that SMTP client class wont be of much help for me. I guess the trick is to be able to set up correctly that first parameter. Maybe I could get that from DNS itself ? What do U think ? BTW, even my mainframe send email this way. I have a little tcp/ip server of my own that accepts connections from the mainframe. The mainframe delivers through this connection an email message and I simply post it to the input folder. It is a kind of a SOAP server , except that of my own. It doesnt use XML. But mainframe can invoke XPP functions and one of them is just that SENDEMAIL. Anyway, thanks again 4 your help ! | |
Frans Vermeulen | Re: SMTP Client and SMTP server parameter on Sat, 12 Aug 2006 10:18:05 +0200 > My guess is that Mercury delivers emails directly to mars.com cause it > doesnt have on it's configuration MY own SMTP server. Also, it shows on > its display that it is doing it (delivering to mars). Or to the location where mars.com is registered. > So, I thought about writing my own "Mercury" (to interconect to Mars!) > but, it seems that SMTP client class wont be of much help for me. On the contrary, it is, it's doing what it should do, you need however a "whois",. Maybe my ping/traceroute-functions might be a little of help: they are in the attachment. Regards, Frans Vermeulen PS. I recall a problem with a buffersize being too small with the attached version. icmp.zip | |
Frans Vermeulen | Re: SMTP Client and SMTP server parameter on Sat, 12 Aug 2006 10:40:02 +0200 I forgot: - Before I wrote these ICmp functions, I tried to write my own "whois"-client but I was not successful, so if anyone has succeeded, I'd be interested. - You could also try to do something using the gethostby... functions from asinet for your DNS lookup. You will see that: www.mars.com is 164.109.86.65, and smtp.mars.com too. This is in general not the case. smtp.venus.com might have a different IP than www.venus.com, and it is allowed not to answer however present. Regards, Frans Vermeulen | |
Phil Ide | Re: SMTP Client and SMTP server parameter on Sat, 12 Aug 2006 11:26:23 +0100 Frans, Adriano, > - Before I wrote these ICmp functions, I tried to write my own > "whois"-client > but I was not successful, so if anyone has succeeded, I'd be interested. > - You could also try to do something using the gethostby... functions from > asinet for your DNS lookup. You will see that: www.mars.com is > 164.109.86.65, and smtp.mars.com too. This is in general not the case. > smtp.venus.com might have a different IP than www.venus.com, and it > is allowed not to answer however present. Once you have the server address, the telnet session into the smtp server is trivial and well documented in RFC-2821. The problem is locating the server address, and as you say, requires a "whois" function. Last year, I came across an article about how to retrieve MX records (which is the DNS record identifying the mail server). This article described a complete whois search up the DNS tree to locate an entry, and then how extract and read the MX record. I don't recall the URL of this article, but I found it after searching google for "MX record read". Regards, Phil Ide ----------------------------------------------------------------- xbHCL (http://www.xbHCL.com) Xbase++ HTML command layer PBIH (http://www.pbih.eu) Polar Bear International Hosting ----------------------------------------------------------------- Xbase++ FAQ, Libraries and Sources: http://www.idep.org.uk/xbase This tagline can't be stolen. Call 555-1234. Tagbusters! | |
Frans Vermeulen | Re: SMTP Client and SMTP server parameter on Sat, 12 Aug 2006 14:50:58 +0200 Phil, > Once you have the server address, the telnet session into the smtp server > is > trivial and well documented in RFC-2821. The problem is locating the > server > address, and as you say, requires a "whois" function. > > Last year, I came across an article about how to retrieve MX records > (which > is the DNS record identifying the mail server). This article described a > complete whois search up the DNS tree to locate an entry, and then how > extract and read the MX record. Theoretically this should work, however fi. exchange servers are generally configured only to accept email coming from the registrar. fi. I have an exchange server running an email domain. This server is at a sublocation. When I send an email to this domain, it will be routed to the registrar. The registrar does a DNS lookup on the server at GHQ, get's the email-servers IP-adress, and sends the email to that server. There is no way, obtaining the IP-adress of that emailserver by anyone, but the registrar. There is no way, an email will be accepted for that domain, unless it comes from the registrar. The emailserver will respond to SMTP commands, but it will just reject any email coming from anywhere but the registrar. I'm immense grateful to the viagra-enlargement guys, who made something as simple as email, so complex. Regards, Frans Vermeulen | |
Phil Ide | Re: SMTP Client and SMTP server parameter on Sat, 12 Aug 2006 20:31:25 +0100 Frans, > I'm immense grateful to the viagra-enlargement guys, who made something > as simple as email, so complex. ROFL! It's a protocol and it's simple. It was bound to be abused and taken advantage of. HTTP is also very simple, and Ajax uses it fairly blindly. I've started using X- headers in http responses which can make Ajax much more powerful and infinitely more flexible. I've heard of web sites that require bespoke (or bespoke modified) browsers, and without these special browsers, surfing the site will only ever return the home page. The special browsers use the X- headers returned with each request to modify new requests. Apparently the idea is to bar robots, spiders and crawlers. Imagine needing a special web-browser for each site you visit... Regards, Phil Ide ----------------------------------------------------------------- xbHCL (http://www.xbHCL.com) Xbase++ HTML command layer PBIH (http://www.pbih.eu) Polar Bear International Hosting ----------------------------------------------------------------- Xbase++ FAQ, Libraries and Sources: http://www.idep.org.uk/xbase Insert Witty Tagline Here ... | |
Jose Adriano Baltieri | Re: SMTP Client and SMTP server parameter on Mon, 14 Aug 2006 09:18:18 -0300 Frans Vermeulen wrote: >> My guess is that Mercury delivers emails directly to mars.com cause it >> doesnt have on it's configuration MY own SMTP server. Also, it shows >> on its display that it is doing it (delivering to mars). > > Or to the location where mars.com is registered. > >> So, I thought about writing my own "Mercury" (to interconect to Mars!) >> but, it seems that SMTP client class wont be of much help for me. > > On the contrary, it is, it's doing what it should do, you need however a > "whois",. > Maybe my ping/traceroute-functions might be a little of help: they are > in the attachment. OK. Thank you ! > Regards, > Frans Vermeulen > > PS. I recall a problem with a buffersize being too small with the > attached version. |