sendmail issues

Discussion in 'Tomato Firmware' started by Blade3609, Mar 16, 2014.

  1. Blade3609

    Blade3609 Reformed Router Member

    Sendmail stopped working on my tomato router.
    I get the following error:
    sendmail: HELO failed
    Any advise?
  2. koitsu

    koitsu Network Guru Member

    Not enough details to troubleshoot. I know what the error itself could mean, but that's speculative. Please provide more information, including exact commands used, etc.. I would also suggest trying sendmail -v to see what exactly is going on.
  3. Blade3609

    Blade3609 Reformed Router Member

    It used to work fine, but now it doesn't work anymore, this is the command i use
    echo -e "To: "THEEMAIL"\nFrom: "MYEMAIL"\nSubject: down n\n" |
    sendmail -f"MYEMAIL" -S -au"USERNAME" -ap"PASSWORD"
  4. koitsu

    koitsu Network Guru Member

    Is there some reason you didn't do sendmail -v like I recommended? This would have shown you the exact situation. There's nothing more insulting than asking for help, someone giving it, then you not following the advice. :)

    My guess is that has changed their SMTP setup to start verifying that the FQDN passed in the HELO SMTP phase actually resolves publicly on the Internet. There is nothing you can do about them doing this, and it's good change on their part. You need to understand how SMTP works to understand what is going on here. You also need to follow the source code to Busybox sendmail to understand what it's doing:

    The variable called host is what's sent during the HELO/EHLO stage, in function sendmail_main(). Effectively this hostname comes from the uname(2) syscall (specifically it gets obtained via the Busybox function called safe_gethostname() which calls uname()). It keys off of the nodename field.

    Busybox sendmail does not let you define or set your own value for this. If you have problems with this, then you need to send your complaints to the Busybox folks, not the Tomato folks. This would be a feature request change in Busybox.

    From what I can tell the system hostname (uname -n) on Tomato correlates with the nodename field. All of this is defined in the Tomato GUI under Basic / Identification, specifically field Hostname. The Domain Name field does not appear to get used/honoured by uname(). In other words: Basic / Identification / Hostname needs to be set to a FQDN that resolves publicly on the Internet.

    And as I said before, use sendmail -v to verify what's going on at the SMTP level and see where the failure happens.
  5. Blade3609

    Blade3609 Reformed Router Member

    Thanks alot for the info, i really appreciate it. I got a router RT-n16 with tomato and BusyBox v1.18.5 which does no have the -v feature so i couldnt do that.
    I got another E4200 router with Busybox 1.21
    I cleared the Hostname field in the identification and placed my domain in the Domain field. and got it to work on the busybox 1.18.5
    However it still doesn't work on the newer busybox.

    I get this error:
    sendmail: recv:'235 Authentication succeeded'
    sendmail: send:'MAIL FROM:<MYEMAIL>'
    sendmail: recv:'250 Requested mail action okay, completed'
    sendmail: send:'DATA'
    sendmail: recv:'503 Bad sequence of commands'
    sendmail: send:'QUIT'
    sendmail: recv:'221 Service closing transmission channel'
  6. Blade3609

    Blade3609 Reformed Router Member

    I got everything to work. Thanks again mate. Just looked up what was wrong from the source code of busybox
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice