9front - general discussion about 9front
 help / color / mirror / Atom feed
* upas/smtp -h $fqdn not used for HELO dialogue
@ 2015-11-12  1:17 sl
  2015-11-12  3:47 ` [9front] " arisawa
  0 siblings, 1 reply; 4+ messages in thread
From: sl @ 2015-11-12  1:17 UTC (permalink / raw)
  To: 9front

Is this intentional?

/sys/src/cmd/upas/smtp/smtp.c:180,183

	if(host == 0)
		host = sysname_read();
	strcpy(hostdomain, domainify(host, domain));
	strcpy(hellodomain, domainify(sysname_read(), domain));

If so, why?

I updated my local smtp.c:

	strcpy(hellodomain, domainify(host, domain));

Now, upas/smtp -h $fqdn (called by /mail/lib/remotemail)
uses $fqdn for the HELO dialogue.

sl


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [9front] upas/smtp -h $fqdn not used for HELO dialogue
  2015-11-12  1:17 upas/smtp -h $fqdn not used for HELO dialogue sl
@ 2015-11-12  3:47 ` arisawa
  0 siblings, 0 replies; 4+ messages in thread
From: arisawa @ 2015-11-12  3:47 UTC (permalink / raw)
  To: 9front

hello,

smtp option “-h” is not for HELO host.

hostdomain is used for FROM address, which is used if the recipient is non-existent.
FROM address may be different from HELO host.
while HELO host is the system address of the smtp server.

look rfc2821 in detail



> 2015/11/12 10:17、sl@stanleylieber.com のメール:
> 
> Is this intentional?
> 
> /sys/src/cmd/upas/smtp/smtp.c:180,183
> 
> 	if(host == 0)
> 		host = sysname_read();
> 	strcpy(hostdomain, domainify(host, domain));
> 	strcpy(hellodomain, domainify(sysname_read(), domain));
> 
> If so, why?
> 
> I updated my local smtp.c:
> 
> 	strcpy(hellodomain, domainify(host, domain));
> 
> Now, upas/smtp -h $fqdn (called by /mail/lib/remotemail)
> uses $fqdn for the HELO dialogue.
> 
> sl



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [9front] upas/smtp -h $fqdn not used for HELO dialogue
  2015-11-12  4:12 sl
@ 2015-11-12  4:49 ` arisawa
  0 siblings, 0 replies; 4+ messages in thread
From: arisawa @ 2015-11-12  4:49 UTC (permalink / raw)
  To: 9front

the relevant parts of rfc1034 is

4.1.1.1  Extended HELLO (EHLO) or HELLO (HELO)

   These commands are used to identify the SMTP client to the SMTP
   server.  The argument field contains the fully-qualified domain name
   of the SMTP client if one is available.  In situations in which the
   SMTP client system does not have a meaningful domain name (e.g., when
   its address is dynamically allocated and no reverse mapping record is
   available), the client SHOULD send an address literal (see section
   4.1.3), optionally followed by information that will help to identify
   the client system.  y The SMTP server identifies itself to the SMTP
   client in the connection greeting reply and in the response to this
   command.

4.1.3 Address Literals

   Sometimes a host is not known to the domain name system and
   communication (and, in particular, communication to report and repair
   the error) is blocked.  To bypass this barrier a special literal form
   of the address is allowed as an alternative to a domain name.  For
   IPv4 addresses, this form uses four small decimal integers separated
   by dots and enclosed by brackets such as [123.255.37.2], which
   indicates an (IPv4) Internet Address in sequence-of-octets form.  For
   IPv6 and other forms of addressing that might eventually be
   standardized, the form consists of a standardized "tag" that
   identifies the address syntax, a colon, and the address itself, in a
   format specified as part of the IPv6 standards [17].

I don’t know if Plan9 smtp server supports literal address
if the server does not have a meaningful domain name.

if supported, such mails may be blocked as SPAM.
it is safe you pass your mail to a legitimate smtp server.


> 2015/11/12 13:12、sl@stanleylieber.com のメール:
> 
>> smtp option “-h” is not for HELO host.
>> 
>> hostdomain is used for FROM address, which is used if the recipient is non-existent.
>> FROM address may be different from HELO host.
>> while HELO host is the system address of the smtp server.
>> 
>> look rfc2821 in detail
> 
> Thanks.
> 
> So, does upas have any facility for controlling the HELO
> dialogue? Consider what happens when a terminal, which is
> rarely endowed with a valid Internet DNS name, sends a
> mail with upas/smtp.
> 
> sl



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [9front] upas/smtp -h $fqdn not used for HELO dialogue
@ 2015-11-12  4:12 sl
  2015-11-12  4:49 ` arisawa
  0 siblings, 1 reply; 4+ messages in thread
From: sl @ 2015-11-12  4:12 UTC (permalink / raw)
  To: 9front

> smtp option “-h” is not for HELO host.
> 
> hostdomain is used for FROM address, which is used if the recipient is non-existent.
> FROM address may be different from HELO host.
> while HELO host is the system address of the smtp server.
> 
> look rfc2821 in detail

Thanks.

So, does upas have any facility for controlling the HELO
dialogue? Consider what happens when a terminal, which is
rarely endowed with a valid Internet DNS name, sends a
mail with upas/smtp.

sl


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-11-12  4:49 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-11-12  1:17 upas/smtp -h $fqdn not used for HELO dialogue sl
2015-11-12  3:47 ` [9front] " arisawa
2015-11-12  4:12 sl
2015-11-12  4:49 ` arisawa

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).