SMTP error "bad string length 0 < 1: myhostname ="

Discussion in 'Installation/Configuration' started by eko_taas, Apr 30, 2011.

  1. eko_taas

    eko_taas New Member

    In my server everything seems to work OK, but SMTP-service is claimed to be down (Monitor / Status of Services / "SMTP-Server: Offline") and also /var/log/mail.log shows that something is wrong (after 24.4. 13:00:08 UTC).

    Code:
    ...
    Apr 24 12:58:53 server1 pop3d: Disconnected, ip=[::ffff:xxx.yyy.zzz.xyz]
    Apr 24 13:00:01 server1 pop3d: Connection, ip=[::ffff:127.0.0.1]
    Apr 24 13:00:01 server1 pop3d: Disconnected, ip=[::ffff:127.0.0.1]
    Apr 24 13:00:01 server1 imapd: Connection, ip=[::ffff:127.0.0.1]
    Apr 24 13:00:01 server1 imapd: Disconnected, ip=[::ffff:127.0.0.1], time=0
    Apr 24 13:00:08 server1 postfix/sendmail[25714]: fatal: bad string length 0 < 1: myhostname =
    Apr 24 13:05:01 server1 pop3d: Connection, ip=[::ffff:127.0.0.1]
    Apr 24 13:05:01 server1 pop3d: Disconnected, ip=[::ffff:127.0.0.1]
    Apr 24 13:05:01 server1 imapd: Connection, ip=[::ffff:127.0.0.1]
    Apr 24 13:05:01 server1 imapd: Disconnected, ip=[::ffff:127.0.0.1], time=0
    Apr 24 13:05:01 server1 postfix/sendmail[25818]: fatal: bad string length 0 < 1: myhostname =
    .... 
    Same continues after restart :(

    I did not made any changes (even access to server on that day) so cannot understand this change....

    Which file I should modify?

    System info
    Thanks again for your support, everything else works lovely....
     
  2. falko

    falko Super Moderator Howtoforge Staff

    Is myhostname set in /etc/postfix/main.cf?
     
  3. eko_taas

    eko_taas New Member

    Thanks for hint - above was empty (i.e. myhostname= )

    When adding "myhostname=www.example.com" (or similar ;) ) and restart
    - all monitoring green again
    - alarms not coming any more to Monitor / "Mail-Warn - Log"
    - sending with N900 / TSL-login to SMTP working now like a dream.
    (also normal OK (login only)
    - message even delivered :D

    I just love this, when both IMAP and SMTP with TSL...

    Thanks, sun is shining again to my server
     

Share This Page