Alaska Software Inc. - MX-Record for SendMail
Username: Password:
AuthorTopic: MX-Record for SendMail
news.t-online.deMX-Record for SendMail
on Tue, 29 Jul 2003 22:15:14 +0200
Hallo!

How can did we get the MX-Record for SendMail(...)  ??

Are there any additional functions (or parameters for
SocketGetHostByName() ) to get the IP-Address for the Mail-Hosts (MX) ?

Regards,
Roland

rg@gentner.net
Thomas Braun
Re: MX-Record for SendMail
on Wed, 30 Jul 2003 09:22:30 +0200
news.t-online.de wrote:
^^^^^^^^^^^^^^^^
You should adjust your news client 

> How can did we get the MX-Record for SendMail(...)  ??

Can't you simply use the mail servers URL and let the DNS do its job? 

To lokkup the MX records, you can use nslookup, just start it in a command
shell, then type the following to list the MX entries for microsoft.com:

SET querytype=MX
microsoft.com

regards
Thomas Braun

web: www.software-braun.de / email: nospam@wegasoft.de
If you need to send email, substitute "nospam" with my initials
since the spam account is not checked on a regular basis.
Xbase++ FAQ : faq.xbasecentral.net
Roland GentnerRe: MX-Record for SendMail
on Wed, 30 Jul 2003 10:06:54 +0200
Hi
thanks for your statements, but something going wrong:

when i enter "mail" to cHost (or NIL), i get an error from mail sending
tests.
If i enter the right mail-host ip-address, the sending is o.k.
If i enter the dns name of the mail-host, it will only work, when there is
an a-record.
So i think the mx-record wasnt resolved.

> Can't you simply use the mail servers URL and let the DNS do its job? 
How should i know mail servers URL? Thats the problem!

Regards,
Roland Gentner

rg@gentner.net

"Thomas Braun" <nospam@wegasoft.de> schrieb im Newsbeitrag
news:3f277236$1@asgcom.alaska-software.com...
> news.t-online.de wrote:
> ^^^^^^^^^^^^^^^^
> You should adjust your news client 
>
> > How can did we get the MX-Record for SendMail(...)  ??
>
> Can't you simply use the mail servers URL and let the DNS do its job? 
>
> To lokkup the MX records, you can use nslookup, just start it in a command
> shell, then type the following to list the MX entries for microsoft.com:
>
> SET querytype=MX
> microsoft.com
>
> regards
> Thomas Braun
> -- 
> web: www.software-braun.de / email: nospam@wegasoft.de
> If you need to send email, substitute "nospam" with my initials
> since the spam account is not checked on a regular basis.
> Xbase++ FAQ : faq.xbasecentral.net
Thomas Braun
Re: MX-Record for SendMail
on Wed, 30 Jul 2003 13:53:06 +0200
Roland Gentner wrote:

> when i enter "mail" to cHost (or NIL), i get an error from mail
> sending tests.

What error? How about some ready-to-compile sample?
This would help people here to help you.

> How should i know mail servers URL? Thats the problem!

Ask your ISP?

Our (SMTP) mail server for example is auth.mail.onlinehome.de, which works
without a problem... AFAIK, MX records are used by MTAs (not MUAs like in
your case) to exchange emails.

But maybe I don't understand what your problem exactly is?

You write:

> How can did we get the MX-Record for SendMail(...)  ??

...but there is no SendMail() function in ASINET

Do you mean <cSMTPServer> in the call to SMTPClient():New(<cSMPTServer>)?

regards
Thomas Braun

web: www.software-braun.de / email: nospam@wegasoft.de
If you need to send email, substitute "nospam" with my initials
since the spam account is not checked on a regular basis.
Xbase++ FAQ : faq.xbasecentral.net
Roland GentnerRe: MX-Record for SendMail
on Wed, 30 Jul 2003 17:38:45 +0200
SendMail() is a function from asinet mail samples.

But i have som new infos about the problem (Alaska hotline):
SendMail() sample and asinet functions are not jet created for connections
to any smtp mail host. Application (mail-) user must use a mail server witch
allows mail relaying.
BUT:
if we retieveing mx-records from dns servers, there is no need for mail
relaying.

With "dnsquery()" from microsofts dnsapi.dll it may be possible to get the
mx-record, but i allways get some errors.

uRet:=DllCall("DNSAPI.DLL",DLL_STDCALL,"DnsQuery_A",cServer, nT , nQ , aPid
, @cRecords , uReserve )

/*
DnsQuery(
         PCSTR        lpstrName         [in]     Name of the owner of the
record set being queried
         WORD         wType             [in]     Numeric represent of the
type of Rec 1=0x0001=A)
         DWORD        fOptions          [in]     Query options, combined,
override DNS_QUERY_STANDARD
         PID4_ARRAY   aipServers        [in]     Specifier if DNS servers,
NULL=default (optional)
         PDNS_RECORD* ppQueryResultsSet [in,out] Pointer to the pointer that
points to the list of RRs (optional)
         PVOIS*       pReserved         [in,out] Returned response in
original wire format (optional)
        )
*/

Any help?

Regards,
Roland Gentner

"Thomas Braun" <nospam@wegasoft.de> schrieb im Newsbeitrag
news:3f27b1a2$1@asgcom.alaska-software.com...
> Roland Gentner wrote:
>
> > when i enter "mail" to cHost (or NIL), i get an error from mail
> > sending tests.
>
> What error? How about some ready-to-compile sample?
> This would help people here to help you.
>
> > How should i know mail servers URL? Thats the problem!
>
> Ask your ISP?
>
> Our (SMTP) mail server for example is auth.mail.onlinehome.de, which works
> without a problem... AFAIK, MX records are used by MTAs (not MUAs like in
> your case) to exchange emails.
>
> But maybe I don't understand what your problem exactly is?
>
> You write:
>
> > How can did we get the MX-Record for SendMail(...)  ??
>
> ...but there is no SendMail() function in ASINET
>
> Do you mean <cSMTPServer> in the call to SMTPClient():New(<cSMPTServer>)?
>
> regards
> Thomas Braun
> -- 
> web: www.software-braun.de / email: nospam@wegasoft.de
> If you need to send email, substitute "nospam" with my initials
> since the spam account is not checked on a regular basis.
> Xbase++ FAQ : faq.xbasecentral.net
Thomas Braun
Re: MX-Record for SendMail
on Wed, 30 Jul 2003 18:24:07 +0200
Roland Gentner wrote:

> SendMail() is a function from asinet mail samples.

Aha!

So it is SMTPClient():New() and SMTPClient:Connect().

> But i have som new infos about the problem (Alaska hotline):
> SendMail() sample and asinet functions are not jet created for
> connections to any smtp mail host. Application (mail-) user must use a
> mail server witch allows mail relaying.

Ehrm... mail servers without the need for SMTP authentication are not a
good idea anyway. A lot of ISPs use filter lists like MAPS DUL to get rid
of SPAM email from known open relays.

(see http://mail-abuse.org/dul/enduser.htm for more info).

So sending email over an open relay can lead to email not being delivered
to the recipient, even without notifying the sender.

> BUT:
> if we retieveing mx-records from dns servers, there is no need for
> mail relaying.

From what I know about SMTP, I can't see how that would help. If the server
requires the client to authenticate itself, of what use would it be to have
the actual IP address instead of the DNS name?

One possible way I can see would be to use a local email proxy that accepts
connections without authentication and is able to deliver the email via
SMTP-AUTH to the real mailserver (like the Hamster mailserver).

regards
Thomas Braun

web: www.software-braun.de / email: nospam@wegasoft.de
If you need to send email, substitute "nospam" with my initials
since the spam account is not checked on a regular basis.
Xbase++ FAQ : faq.xbasecentral.net
Roland GentnerRe: MX-Record for SendMail
on Wed, 30 Jul 2003 19:10:16 +0200
Hi

very easy: "do it than you see it...!"

when i connect direct to a smtp mail server ip (contained in mx-record) and
i have a right destination mail adress, most (all?) mail server accept the
smtp mail.
Why shouldnt they do that? Why should i be on the spam lists? Why should i
authenticate myself on the destination mail server (my exchange didnt it
too)?

Again: there is no way out, i will use it with the mx-record - and it will
work.
Do you know any way to get the mx-record from dns?

With dnsquery_a (see two mails bevore) i get always errors (dllcall-problem)

"Thomas Braun" <nospam@wegasoft.de> schrieb im Newsbeitrag
news:3f27f127@asgcom.alaska-software.com...
> Roland Gentner wrote:
>
> > SendMail() is a function from asinet mail samples.
>
> Aha!
>
> So it is SMTPClient():New() and SMTPClient:Connect().
>
> > But i have som new infos about the problem (Alaska hotline):
> > SendMail() sample and asinet functions are not jet created for
> > connections to any smtp mail host. Application (mail-) user must use a
> > mail server witch allows mail relaying.
>
> Ehrm... mail servers without the need for SMTP authentication are not a
> good idea anyway. A lot of ISPs use filter lists like MAPS DUL to get rid
> of SPAM email from known open relays.
>
> (see http://mail-abuse.org/dul/enduser.htm for more info).
>
> So sending email over an open relay can lead to email not being delivered
> to the recipient, even without notifying the sender.
>
> > BUT:
> > if we retieveing mx-records from dns servers, there is no need for
> > mail relaying.
>
> From what I know about SMTP, I can't see how that would help. If the
server
> requires the client to authenticate itself, of what use would it be to
have
> the actual IP address instead of the DNS name?
>
> One possible way I can see would be to use a local email proxy that
accepts
> connections without authentication and is able to deliver the email via
> SMTP-AUTH to the real mailserver (like the Hamster mailserver).
>
> regards
> Thomas Braun
> -- 
> web: www.software-braun.de / email: nospam@wegasoft.de
> If you need to send email, substitute "nospam" with my initials
> since the spam account is not checked on a regular basis.
> Xbase++ FAQ : faq.xbasecentral.net
Thomas Braun
Re: MX-Record for SendMail
on Thu, 31 Jul 2003 07:52:10 +0200
Roland Gentner wrote:

> very easy: "do it than you see it...!"

Without the exact details, nobody here can even try to do it.

> when i connect direct to a smtp mail server ip (contained in
> mx-record) and i have a right destination mail adress, most (all?)
> mail server accept the smtp mail.

Weird. I can see no difference. The mail client does not communicate with
the mail server via DNS names but via the IP address. So if DNS returns the
same IP address that you are using "manually", it should work the same
way... IMO

Could it be that your problem is sending email with a sender address that
does not belong to the mail senders domain.

It is not easy to help you if you do not give more details what you are
exactly trying to do.

> Why should i be on the spam lists?

Not you are on these lists, but the open relay servers. I have been
trough this with 1&1 here in germany. Some of their servers did not need
authentication and I was not able to send email to one of our customers
until I changed to the other server which required authentication.

> Why should i authenticate myself on the destination mail server

Because it makes sense and helps avoiding service abuse.

> Again: there is no way out, i will use it with the mx-record - and it
> will work.
> Do you know any way to get the mx-record from dns?

No, not via Xbase++.

> With dnsquery_a (see two mails bevore) i get always errors
> (dllcall-problem)

Show us the actual code (and error messages) and I'm sure somebody here
will try and take the time to help you out.

regards
Thomas Braun

web: www.software-braun.de / email: nospam@wegasoft.de
If you need to send email, substitute "nospam" with my initials
since the spam account is not checked on a regular basis.
Xbase++ FAQ : faq.xbasecentral.net
Roland GentnerRe: MX-Record for SendMail
on Thu, 31 Jul 2003 15:28:01 +0200
Hi!

It seems to go with dnsquery().
I have litle interpret the return of dnsquery() but this problem i will post
in general newsgroup.
Later - if it works completely - i post it in this group.

Roland Gentner

---

"Thomas Braun" <nospam@wegasoft.de> schrieb im Newsbeitrag
news:3f28ae8a@asgcom.alaska-software.com...
> Roland Gentner wrote:
>
> > very easy: "do it than you see it...!"
>
> Without the exact details, nobody here can even try to do it.
>
> > when i connect direct to a smtp mail server ip (contained in
> > mx-record) and i have a right destination mail adress, most (all?)
> > mail server accept the smtp mail.
>
> Weird. I can see no difference. The mail client does not communicate with
> the mail server via DNS names but via the IP address. So if DNS returns
the
> same IP address that you are using "manually", it should work the same
> way... IMO
>
> Could it be that your problem is sending email with a sender address that
> does not belong to the mail senders domain.
>
> It is not easy to help you if you do not give more details what you are
> exactly trying to do.
>
> > Why should i be on the spam lists?
>
> Not you are on these lists, but the open relay servers. I have been
> trough this with 1&1 here in germany. Some of their servers did not need
> authentication and I was not able to send email to one of our customers
> until I changed to the other server which required authentication.
>
> > Why should i authenticate myself on the destination mail server
>
> Because it makes sense and helps avoiding service abuse.
>
> > Again: there is no way out, i will use it with the mx-record - and it
> > will work.
> > Do you know any way to get the mx-record from dns?
>
> No, not via Xbase++.
>
> > With dnsquery_a (see two mails bevore) i get always errors
> > (dllcall-problem)
>
> Show us the actual code (and error messages) and I'm sure somebody here
> will try and take the time to help you out.
>
> regards
> Thomas Braun
> -- 
> web: www.software-braun.de / email: nospam@wegasoft.de
> If you need to send email, substitute "nospam" with my initials
> since the spam account is not checked on a regular basis.
> Xbase++ FAQ : faq.xbasecentral.net
Thomas Braun
Re: MX-Record for SendMail
on Thu, 31 Jul 2003 18:23:57 +0200
Roland Gentner wrote:

> It seems to go with dnsquery().

Good.

> I have litle interpret the return of dnsquery() but this problem i
> will post in general newsgroup.
> Later - if it works completely - i post it in this group.

Thank you. It is always interesting for others to see how specific problems
can be solved. It is a diffent thing that I do not fully understand the
real cause of this specific problem 

regards
Thomas Braun

web: www.software-braun.de / email: nospam@wegasoft.de
If you need to send email, substitute "nospam" with my initials
since the spam account is not checked on a regular basis.
Xbase++ FAQ : faq.xbasecentral.net