• Fmail and SMTP

    From Michiel van der Vlist@2:280/5555 to Wilfred van Velzen on Wed Apr 8 12:37:54 2026

    *** Answering a msg posted in area NODELIST-POLICE (NODELIST-POLICE).

    Hello Wilfred,

    On Tuesday April 07 2026 21:36, you wrote to Tommi Koivula:

    You need to send FQDN when talking to my Postfix. Now your
    FMail sends just "Fido" which doesn't resolve. I don't think
    you can change that behaviour in FMail

    Do you think a hardcoded 'fidonet.org' in FMail would work for
    everyone?

    For sure better than "Fido". The real reverse of the sender
    would be better.

    That would require an other setting, and too much work for a
    mostly unused funtion...

    I was looking at the code, and it turns out on both linux and windows
    it uses the gethostname() function (which is posix) to get the string
    to put behind the HELO command.

    On linux this returns the same string as the 'uname -n' command. On windows it's the output of the 'hostname' command. And probably just
    the computer name, something Michiel could set himself if he likes to experiment with this. ;-)

    I did some experiments and found the following:

    In windows there are two "names".

    1) The short one. This is the name entered when setting up the system. The short name may only contain the characters a-z, A-Z, 0-9 and '-'. Dots are not allowed. It is the name returned by gethostname().

    2) The full host name. There is an option in the windows configuration to enter a domain. By default it is blank but one can enter someting like "vlist.eu". This domain is appended to the short name to make the "full computer name".

    I tried changing the short computer name into fido.vlist.eu. Not accepted. Then I left the short computer name as "Fido" and entered "vlist.eu" as the DNS extension. That was accepted and the full computer name is now "Fido.vlist.eu". *1)

    I tied sending the test message again to Tommi's SMTP server but got the same error. So apparently the short name is still used is the HELO.

    Two suggestions:

    1) Find a "full name" equivalent for gethostname(). getfullhost?

    2) Take the part after the '@' from the e-mail adres configured in Fmail and append that to the name recovered by gethostname() for use in the HELO.

    *1) I already found some undesirable side effects of this change, but that's another story.


    Cheers, Michiel

    --- GoldED+/W32-MSVC 1.1.5-b20170303
    * Origin: http://www.vlist.eu (2:280/5555)
  • From Wilfred van Velzen@2:280/464 to Michiel van der Vlist on Wed Apr 8 13:15:37 2026
    Hi Michiel,

    On 2026-04-08 12:37:54, you wrote to me:

    MvdV> I did some experiments and found the following:

    MvdV> In windows there are two "names".

    MvdV> 1) The short one. This is the name entered when setting up the system. The
    MvdV> short name may only contain the characters a-z, A-Z, 0-9 and '-'. Dots are not
    MvdV> allowed. It is the name returned by gethostname().

    MvdV> 2) The full host name. There is an option in the windows configuration to
    MvdV> enter a domain. By default it is blank but one can enter someting like
    MvdV> "vlist.eu". This domain is appended to the short name to make the "full
    MvdV> computer name".

    MvdV> I tried changing the short computer name into fido.vlist.eu. Not accepted.
    MvdV> Then I left the short computer name as "Fido" and entered "vlist.eu" as the
    MvdV> DNS extension. That was accepted and the full computer name is now
    MvdV> "Fido.vlist.eu". *1)

    MvdV> I tied sending the test message again to Tommi's SMTP server but got the same
    MvdV> error. So apparently the short name is still used is the HELO.

    What does the hostname command show in this situation?

    MvdV> Two suggestions:

    MvdV> 1) Find a "full name" equivalent for gethostname(). getfullhost?

    gethostname() is indeed probably not the best way to get a fqdn. But I'll have to investigate if there is a better function to get this from the OS.

    MvdV> 2) Take the part after the '@' from the e-mail adres configured in
    MvdV> Fmail and append that to the name recovered by gethostname() for use
    MvdV> in the HELO.

    Also not perfect, because the sender email address, doesn't necessarily contain the hostname of the sending machine.

    The only propper sollution is to make this a configuration item...

    MvdV> *1) I already found some undesirable side effects of this change,
    MvdV> but that's another story.

    ...

    Bye, Wilfred.

    --- FMail-lnx64 2.3.2.6-B20251227
    * Origin: FMail development HQ (2:280/464)
  • From Michiel van der Vlist@2:280/5555 to Wilfred van Velzen on Wed Apr 8 16:52:26 2026
    Hello Wilfred,

    On Wednesday April 08 2026 13:15, you wrote to me:

    MvdV>> I tried changing the short computer name into fido.vlist.eu.
    MvdV>> Not accepted. Then I left the short computer name as "Fido" and
    MvdV>> entered "vlist.eu" as the DNS extension. That was accepted and
    MvdV>> the full computer name is now "Fido.vlist.eu". *1)

    MvdV>> I tried sending the test message again to Tommi's SMTP server
    MvdV>> but got the same error. So apparently the short name is still
    MvdV>> used is the HELO.

    What does the hostname command show in this situation?

    === quote ===

    D:\fido\FMAIL>hostname
    Fido

    D:\fido\FMAIL>

    === end quote ===


    MvdV>> Two suggestions:

    MvdV>> 1) Find a "full name" equivalent for gethostname().
    MvdV>> getfullhost?

    gethostname() is indeed probably not the best way to get a fqdn. But
    I'll have to investigate if there is a better function to get this
    from the OS.

    In Linux getfullname() seems to do the trick according to AI. Bit it gave no definite solution for Windows,

    MvdV>> 2) Take the part after the '@' from the e-mail adres configured
    MvdV>> in Fmail and append that to the name recovered by gethostname()
    MvdV>> for use in the HELO.

    Also not perfect, because the sender email address, doesn't
    necessarily contain the hostname of the sending machine.

    Indeed. It will work in my case, but for others it may not. If I understand correctly the given FQDN should return an IP address of the sender. I suppose it is still better than than "fidonet.org" which will resolve for no one. So..

    The only propper sollution is to make this a configuration item...

    No argument there...

    MvdV>> *1) I already found some undesirable side effects of this
    MvdV>> change, but that's another story.

    ...

    For one, fido.vlist.eu now returns the the IPv6 link local address instead of the globally routable address. So unless I configure my binkd to also listen on link local addresses, I can not connect 280/5555 from my testnode 280/5556 that runs on the same machine.


    Cheers, Michiel

    --- GoldED+/W32-MSVC 1.1.5-b20170303
    * Origin: http://www.vlist.eu (2:280/5555)