Announcements and discussions for Gnus, the GNU Emacs Usenet newsreader
 help / color / mirror / Atom feed
* smtpmail-send-it: Sending failed: 504 5.5.2 <localhost>: Helo command rejected: need fully-qualified hostname
@ 2022-12-08 17:56 jindam, vani
  2022-12-09  5:07 ` jindam, vani
  0 siblings, 1 reply; 5+ messages in thread
From: jindam, vani @ 2022-12-08 17:56 UTC (permalink / raw)
  To: Info-gnus English

* emacs on debian bullseye on userland (1)
* the documentation(2) says about 501 helo command.
* complete error:
Debugger entered--Lisp error: (error "Sending failed: 504 5.5.2 
<localhost>: Helo command rejected: need fully-qualified hostname")
   signal(error ("Sending failed: 504 5.5.2 <localhost>: Helo command 
rejected: need fully-qualified hostname"))
   error("Sending failed: %s" "504 5.5.2 <localhost>: Helo command 
rejected: need fully-qualified hostname")

* my hostname settings:

$ hostname
localhost

$ cat /etc/hosts
127.0.0.1 localhost

$ cat /etc/hostname
localhost

* my configs:
** .gnus
(setq gnus-select-method '(nnnil ""))

(add-to-list 'gnus-secondary-select-methods
              '(nnmaildir ""
               (directory "/home/jin/.Maildir/")
               (get-new-mail t)
               (directory-files nnheader-directory-files-safe)))

(setq mail-user-agent 'gnus-user-agent)
(setq read-mail-command 'gnus)

(setq mail-sources
                   '((pop :server "disroot.org"
                          :user "jindam.vani@disroot.org"
                          :password "password")))

(setq message-send-mail-function 'smtpmail-send-it)
(setq smtpmail-default-smtp-server "disroot.org")
(setq smtpmail-smtp-service 587)

** .msmtprc
(output of $ msmtp --configure jindam.vani@disroot.org
# - copy this to your configuration file /home/jin/.msmtprc
# - add your password to the key ring:
#   secret-tool store --label=msmtp host disroot.org service smtp
  user jindam.vani
account jindam.vani@disroot.org
host disroot.org
port 587
tls on
tls_starttls on
auth on
user jindam.vani
from jindam.vani@disroot.org

** getmailrc
[options]
delete = True
read_all = true

[retriever]
type = SimplePOP3SSLRetriever
server = disroot.org
username = jindam.vani@disroot.org
password = password

[destination]
type = Maildir
path = ~/.Maildir/INBOX/

how do i resolve?

(1) https://github.com/CypherpunkArmory/UserLAnd
(2) 
https://www.gnu.org/software/emacs/manual/html_node/smtpmail/Server-workarounds.html#index-smtpmail_002dlocal_002ddomain

regards,
jindam, vani

-- 
toots: @jindam_vani@c.im
others: en.wikipedia.org/wik//User:Jindam_vani


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

* Re: smtpmail-send-it: Sending failed: 504 5.5.2 <localhost>: Helo command rejected: need fully-qualified hostname
  2022-12-08 17:56 smtpmail-send-it: Sending failed: 504 5.5.2 <localhost>: Helo command rejected: need fully-qualified hostname jindam, vani
@ 2022-12-09  5:07 ` jindam, vani
  2022-12-09 23:14   ` Björn Bidar
  0 siblings, 1 reply; 5+ messages in thread
From: jindam, vani @ 2022-12-09  5:07 UTC (permalink / raw)
  To: Info-gnus English

On 2022-12-08 17:56, jindam, vani wrote:
> * emacs on debian bullseye on userland (1)
> * the documentation(2) says about 501 helo command.
> * complete error:
> Debugger entered--Lisp error: (error "Sending failed: 504 5.5.2 
> <localhost>: Helo command rejected: need fully-qualified hostname")
>   signal(error ("Sending failed: 504 5.5.2 <localhost>: Helo command 
> rejected: need fully-qualified hostname"))
>   error("Sending failed: %s" "504 5.5.2 <localhost>: Helo command 
> rejected: need fully-qualified hostname")
> 
> * my hostname settings:
> 
> $ hostname
> localhost
> 
> $ cat /etc/hosts
> 127.0.0.1 localhost
> 
> $ cat /etc/hostname
> localhost
> 
> * my configs:
> ** .gnus
> (setq gnus-select-method '(nnnil ""))
> 
> (add-to-list 'gnus-secondary-select-methods
>              '(nnmaildir ""
>               (directory "/home/jin/.Maildir/")
>               (get-new-mail t)
>               (directory-files nnheader-directory-files-safe)))
> 
> (setq mail-user-agent 'gnus-user-agent)
> (setq read-mail-command 'gnus)
> 
> (setq mail-sources
>                   '((pop :server "disroot.org"
>                          :user "jindam.vani@disroot.org"
>                          :password "password")))
> 
> (setq message-send-mail-function 'smtpmail-send-it)
> (setq smtpmail-default-smtp-server "disroot.org")
> (setq smtpmail-smtp-service 587)
> 
> ** .msmtprc
> (output of $ msmtp --configure jindam.vani@disroot.org
> # - copy this to your configuration file /home/jin/.msmtprc
> # - add your password to the key ring:
> #   secret-tool store --label=msmtp host disroot.org service smtp
>  user jindam.vani
> account jindam.vani@disroot.org
> host disroot.org
> port 587
> tls on
> tls_starttls on
> auth on
> user jindam.vani
> from jindam.vani@disroot.org
> 
> ** getmailrc
> [options]
> delete = True
> read_all = true
> 
> [retriever]
> type = SimplePOP3SSLRetriever
> server = disroot.org
> username = jindam.vani@disroot.org
> password = password
> 
> [destination]
> type = Maildir
> path = ~/.Maildir/INBOX/
> 
> how do i resolve?
> 
> (1) https://github.com/CypherpunkArmory/UserLAnd
> (2) 
> https://www.gnu.org/software/emacs/manual/html_node/smtpmail/Server-workarounds.html#index-smtpmail_002dlocal_002ddomain
> 
> regards,
> jindam, vani

hello again.....

not an ideal solution. i was resistant to
add smtpmail-local-domain after reading
server workarounds.(1) however, the issue is
resolved by adding code given on our mailing
list archive.(2)

* modified .gnus:

(setq gnus-select-method '(nnnil ""))

(add-to-list 'gnus-secondary-select-methods
              '(nnmaildir ""
               (directory "/home/jin/.Maildir/")
               (get-new-mail t)
               (directory-files nnheader-directory-files-safe)))

(setq mail-user-agent 'gnus-user-agent)
(setq read-mail-command 'gnus)

(setq mail-sources
                   '((pop :server "disroot.org"
                          :user "jindam.vani@disroot.org"
                          :password "password")))

(setq message-send-mail-function 'smtpmail-send-it)
(setq smtpmail-default-smtp-server "disroot.org")
(setq smtpmail-local-domain "domain")
(setq smtpmail-sendto-domain "domain")
(setq smtpmail-smtp-server "disroot.org")
(setq smtpmail-smtp-service 587)
(setq smtpmail-auth-credentials '(("disroot.org" 587 
"jindam.vani@disroot.org"
"password")))
(setq smtpmail-starttls-credentials '(("smtp.server" 587 nil nil)))

tried to change hostname given at
linuxhandbook website.(3)

i have modified both /etc/hosts & /etc/hostname,
it was showing same error:

jin@localhost:~$ cat /etc/hostname
jindam.home

jin@localhost:~$ cat /etc/hosts
127.0.0.1       jindam.home

# The following lines are desirable for IPv6 capable hosts
::1     ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts

(1) https://www.josefsson.org/smtpmail.html#Server-workarounds
(2) 
https://lists.gnu.org/archive/html/info-gnus-english/2006-03/msg00157.html
(3) https://linuxhandbook.com/debian-change-hostname/

regards,
jindam, vani

-- 
toots: @jindam_vani@c.im
others: en.wikipedia.org/wik//User:Jindam_vani


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

* Re: smtpmail-send-it: Sending failed: 504 5.5.2 <localhost>: Helo command rejected: need fully-qualified hostname
  2022-12-09  5:07 ` jindam, vani
@ 2022-12-09 23:14   ` Björn Bidar
  2022-12-10  4:01     ` jindam, vani
  2022-12-10 13:42     ` jindam, vani
  0 siblings, 2 replies; 5+ messages in thread
From: Björn Bidar @ 2022-12-09 23:14 UTC (permalink / raw)
  To: jindam, vani; +Cc: Info-gnus English


Do you really need to add the credentials here? Try without them so
smptmail will try to use auth-source to retrieve the credentials.

These are my smtpmail settings:
      (use-package smtpmail
        :config
        (setq smtpmail-default-smtp-server "smtp.server.de"
              smtpmail-smtp-server "smtp.server.de"
              smtpmail-smtp-service "465"
              smtpmail-stream-type 'ssl
              smtpmail-servers-requiring-authorization ".*"))

For me these work like this, smtpmail will try to retrieve the
localdomain and sendto-domain by itself.

If you add either to the hosts file they should be fine.

Br,

Björn


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

* Re: smtpmail-send-it: Sending failed: 504 5.5.2 <localhost>: Helo command rejected: need fully-qualified hostname
  2022-12-09 23:14   ` Björn Bidar
@ 2022-12-10  4:01     ` jindam, vani
  2022-12-10 13:42     ` jindam, vani
  1 sibling, 0 replies; 5+ messages in thread
From: jindam, vani @ 2022-12-10  4:01 UTC (permalink / raw)
  To: Björn Bidar; +Cc: Info-gnus English

On 2022-12-09 23:14, Björn Bidar wrote:
> Do you really need to add the credentials here?

no,its temporary solution.
i am setting up slowly and incrementally...
right now, connection error is resolved,
able to send emails (did not setup anything
fancy).

> Try without them so
> smptmail will try to use auth-source to retrieve the credentials.
> 
> These are my smtpmail settings:
>       (use-package smtpmail

added (require 'smtpmail) to ~/.emacs.
i receive error:

Debugger entered--Lisp error: (void-function use-package)
   (use-package smtpmail :config (setq smtpmail-default-smtp-server 
"disroot.org" smtpmail-smtp-server "disroot.org" smtpmail-smtp-service 
"465" smtpmail-stream-type 'ssl smtpmail-servers-requiring-authorization 
".*"))
   eval-buffer(#<buffer  *load*> nil "/home/jin/.gnus" nil t)  ; Reading 
at buffer position 795
   load-with-code-conversion("/home/jin/.gnus" "/home/jin/.gnus" nil t)
   load("~/.gnus" nil t)
   gnus-read-init-file()
   gnus-1(nil nil nil)
   gnus(nil)
   funcall-interactively(gnus nil)
   call-interactively(gnus record nil)
   command-execute(gnus record)
   execute-extended-command(nil "gnus" "gnu")
   funcall-interactively(execute-extended-command nil "gnus" "gnu")
   call-interactively(execute-extended-command nil nil)
   command-execute(execute-extended-command)

are you referring to smtpmail-multi on melpa?(1)

>         :config
>         (setq smtpmail-default-smtp-server "smtp.server.de"
>               smtpmail-smtp-server "smtp.server.de"
>               smtpmail-smtp-service "465"
>               smtpmail-stream-type 'ssl
>               smtpmail-servers-requiring-authorization ".*"))
> 
> For me these work like this, smtpmail will try to retrieve the
> localdomain and sendto-domain by itself.
> 
> If you add either to the hosts file they should be fine.

added 178.21.23.139 disroot.org to /etc/hosts

jin@localhost:~$ nslookup disroot.org
Server:         8.8.8.8
Address:        8.8.8.8#53

Non-authoritative answer:
Name:   disroot.org
Address: 178.21.23.139


(1) https://melpa.org/#/smtpmail-multi

regards,
jindam, vani

-- 
toots: @jindam_vani@c.im
others: en.wikipedia.org/wiki/User:Jindam_vani


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

* Re: smtpmail-send-it: Sending failed: 504 5.5.2 <localhost>: Helo command rejected: need fully-qualified hostname
  2022-12-09 23:14   ` Björn Bidar
  2022-12-10  4:01     ` jindam, vani
@ 2022-12-10 13:42     ` jindam, vani
  1 sibling, 0 replies; 5+ messages in thread
From: jindam, vani @ 2022-12-10 13:42 UTC (permalink / raw)
  To: Info-gnus English

On 2022-12-09 23:14, Björn Bidar wrote:
> Do you really need to add the credentials here? Try without them so
> smptmail will try to use auth-source to retrieve the credentials.
> 
> These are my smtpmail settings:
>       (use-package smtpmail
>         :config
>         (setq smtpmail-default-smtp-server "smtp.server.de"
>               smtpmail-smtp-server "smtp.server.de"
>               smtpmail-smtp-service "465"
>               smtpmail-stream-type 'ssl
>               smtpmail-servers-requiring-authorization ".*"))

i did again some more search. found about smtpmail.el
on SendingMail [1]. "This file is part of GNU Emacs."
caught my attention for smtpmail.el [2] search.

i modified smtp section on .gnus:
(setq message-send-mail-function 'smtpmail-send-it)
(setq smtpmail-default-smtp-server "disroot.org")
(setq smtpmail-local-domain "domain")
(setq smtpmail-sendto-domain "domain")
(setq smtpmail-smtp-service "465")
(setq smtpmail-stream-type 'ssl)
(setq smtpmail-servers-requiring-authorization ".*")

> For me these work like this, smtpmail will try to retrieve the
> localdomain and sendto-domain by itself.
> 
> If you add either to the hosts file they should be fine.
> 
> Br,
> 
> Björn

[1] https://www.emacswiki.org/emacs/SendingMail#SmtpMail
[2] 
https://opensource.apple.com/source/emacs/emacs-50/emacs/lisp/mail/smtpmail.el.auto.html

regards,
jindam, vani

-- 
toots: @jindam_vani@c.im
others: en.wikipedia.org/wiki/User:Jindam_vani


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

end of thread, other threads:[~2022-12-10 13:42 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-12-08 17:56 smtpmail-send-it: Sending failed: 504 5.5.2 <localhost>: Helo command rejected: need fully-qualified hostname jindam, vani
2022-12-09  5:07 ` jindam, vani
2022-12-09 23:14   ` Björn Bidar
2022-12-10  4:01     ` jindam, vani
2022-12-10 13:42     ` jindam, vani

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).