Mailing List Archive

can send mails with swaks, not with mailx
hi
i'm playing with a nas i've installed debian stable on, and i used to
have some scripts with mailx work to send me messages through external
providers/servers/etc till i upgraded debian: now i can't send mails
through mailx but i can through telnet and swaks: here are mailx and
swaks logs, please treat me as a true noob

echo “Subject: sendmail test” | mail -v troianicarlo@gmail.com
LOG: MAIN
<= nasone@federcasapescara.it U=root P=local S=479
? ~ delivering 1mk3js-0006Jf-IB
R: smarthost for troianicarlo@gmail.com
T: remote_smtp_smarthost for troianicarlo@gmail.com
Connecting to mail.federcasapescara.it [185.4.142.93]:25 ... TFO mode
sendto, no data: EINPROGRESS
connected
SMTP<< 220 directadmin30.fastnom.com ESMTP Exim 4.94.2 Mon, 08 Nov
2021 13:27:05 +0100
SMTP>> EHLO ilmionasone.fritz.box
SMTP<< 250-directadmin30.fastnom.com Hello
host-95-247-26-164.retail.telecomitalia.it [95.247.26.164]
250-SIZE 52428800
250-8BITMIME
250-PIPELINING
250-PIPE_CONNECT
250-AUTH PLAIN LOGIN
250-STARTTLS
250 HELP
SMTP>> STARTTLS
SMTP<< 220 TLS go ahead
SMTP(close)>>
LOG: MAIN
TLS session: (certificate verification failed): delivering
unencrypted to H=mail.federcasapescara.it [185.4.142.93] (not in
hosts_require_tls)
Connecting to mail.federcasapescara.it [185.4.142.93]:25 ... TFO mode
sendto, no data: EINPROGRESS
connected
SMTP<< 220 directadmin30.fastnom.com ESMTP Exim 4.94.2 Mon, 08 Nov
2021 13:27:05 +0100
SMTP>> EHLO ilmionasone.fritz.box
SMTP<< 250-directadmin30.fastnom.com Hello
host-95-247-26-164.retail.telecomitalia.it [95.247.26.164]
250-SIZE 52428800
250-8BITMIME
250-PIPELINING
250-PIPE_CONNECT
250-AUTH PLAIN LOGIN
250-STARTTLS
250 HELP
SMTP>> MAIL FROM:<nasone@federcasapescara.it> SIZE=1515
SMTP>> RCPT TO:<troianicarlo@gmail.com>
SMTP>> DATA
SMTP<< 250 OK
SMTP<< 550 authentication required
SMTP<< 503-All RCPT commands were rejected with this error:
503-authentication required
503 Valid RCPT command must precede DATA
SMTP>> QUIT
SMTP(close)>>
LOG: MAIN
** troianicarlo@gmail.com R=smarthost T=remote_smtp_smarthost
H=mail.federcasapescara.it [185.4.142.93]: SMTP error from remote mail
server after RCPT TO:<troianicarlo@gmail.com>: 550 authentication
required
LOG: MAIN
<= <> R=1mk3js-0006Jf-IB U=Debian-exim P=local S=2021
delivering 1mk3jv-0006Jl-Th
R: system_aliases for nasone@federcasapescara.it
LOG: MAIN
** nasone@federcasapescara.it: Unrouteable address
LOG: MAIN
Frozen (delivery error message)
LOG: MAIN
Completed



swaks --tls --auth --to segreteria@federcasapescara.it --server
mail.federcasapescara.it
Username: nasone@federcasapescara.it
Password: xxx
=== Trying mail.federcasapescara.it:25...
=== Connected to mail.federcasapescara.it.
<- 220 directadmin30.fastnom.com ESMTP Exim 4.94.2 Mon, 08 Nov 2021
22:22:41 +0100
-> EHLO ilmionasone.fritz.box
<- 250-directadmin30.fastnom.com Hello
host-95-247-26-164.retail.telecomitalia.it [95.247.26.164]
<- 250-SIZE 52428800
<- 250-8BITMIME
<- 250-PIPELINING
<- 250-PIPE_CONNECT
<- 250-AUTH PLAIN LOGIN
<- 250-STARTTLS
<- 250 HELP
-> STARTTLS
<- 220 TLS go ahead
=== TLS started with cipher TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128
=== TLS no local certificate set
=== TLS peer DN="/CN=directadmin30.fastnom.com"
~> EHLO ilmionasone.fritz.box
<~ 250-directadmin30.fastnom.com Hello
host-95-247-26-164.retail.telecomitalia.it [95.247.26.164]
<~ 250-SIZE 52428800
<~ 250-8BITMIME
<~ 250-PIPELINING
<~ 250-PIPE_CONNECT
<~ 250-AUTH PLAIN LOGIN
<~ 250 HELP
~> AUTH LOGIN
<~ 334 VXNlcm5hbWU6
~> bmFzb25lQGZlZGVyY2FzYXBlc2NhcmEuaXQ=
<~ 334 UGFzc3dvcmQ6
~> Tmd1bGFtbWFtbXQxIQ==
<~ 235 Authentication succeeded
~> MAIL FROM:<root@ilmionasone.fritz.box>
<~ 250 OK
~> RCPT TO:<segreteria@federcasapescara.it>
<~ 250 Accepted
~> DATA
<~ 354 Enter message, ending with "." on a line by itself
~> Date: Mon, 08 Nov 2021 22:21:39 +0100
~> To: segreteria@federcasapescara.it
~> From: root@ilmionasone.fritz.box
~> Subject: test Mon, 08 Nov 2021 22:21:39 +0100
~> Message-Id: <20211108222139.028193@ilmionasone.fritz.box>
~> X-Mailer: swaks v20201014.0 jetmore.org/john/code/swaks/
~>
~> This is a test mailing
~>
~>
~> .
<~ 250 OK id=1mkC6D-000Vj8-Sr
~> QUIT
<~ 221 directadmin30.fastnom.com closing connection
=== Connection closed with remote host.

--
## List details at https://lists.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/
Re: can send mails with swaks, not with mailx [ In reply to ]
Am 08.11.21 um 22:25 schrieb Carlo via Exim-users:
> hi
> i'm playing with a nas i've installed debian stable on, and i used to
> have some scripts with mailx work to send me messages through external
> providers/servers/etc till i upgraded debian: now i can't send mails
> through mailx but i can through telnet and swaks: here are mailx and
> swaks logs, please treat me as a true noob
ok.

this contains the message, that one ...

> echo “Subject: sendmail test” | mail -vtroianicarlo@gmail.com
> LOG: MAIN
> <=nasone@federcasapescara.it U=root P=local S=479
> ? ~ delivering 1mk3js-0006Jf-IB
...  contains this error: You did not use SMTP-AUTH to authenticate
yourself as a valid user:

> HELP
> SMTP>> MAIL FROM:<nasone@federcasapescara.it> SIZE=1515
> SMTP>> RCPT TO:<troianicarlo@gmail.com>
> SMTP>> DATA
> SMTP<< 250 OK
> SMTP<< 550 authentication required
> SMTP<< 503-All RCPT commands were rejected with this error:
> 503-*authentication required*
> 503 Valid RCPT command must precede DATA
> SMTP>> QUIT
> SMTP(close)>>
> LOG: MAIN

where this:
> swaks --tls --auth --tosegreteria@federcasapescara.it --server
> mail.federcasapescara.it
> Username:nasone@federcasapescara.it
> Password: xxx
> === Trying mail.federcasapescara.it:25...
did do SMTP-AUTH and succeeded:

> ~> AUTH LOGIN
> <~ 334 VXNlcm5hbWU6
> ~> bmFzb25lQGZlZGVyY2FzYXBlc2NhcmEuaXQ=
> <~ 334 UGFzc3dvcmQ6
> ~> Tmd1bGFtbWFtbXQxIQ==
> <~ 235 Authentication succeeded
> ~> MAIL FROM:<root@ilmionasone.fritz.box>
> <~ 250 OK
> ~> RCPT TO:<segreteria@federcasapescara.it>
> <~ 250 Accepted
>

As simple as it can be, your "mailx" approach needs SMTP-AUTH support or
your mailserver needs to allow your actual ip as a relayhost without
smtp-auth. If you have trouble adding smtp-auth to mailx, you could
revert to an old form of authentication: pop-before-smtp, but honestly,
use a better mailclient if mailx can't support smtp-auth.

best regards,
Marius
--
## List details at https://lists.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/
Re: can send mails with swaks, not with mailx [ In reply to ]
Your logs contain valid login and password. Also, note, that AUTH LOGIN (as well as AUTH PLAIN) is just base64, so password may be recovered in plain text.

# telnet mail.federcasapescara.it  25
Trying 185.4.142.93...
Connected to mail.federcasapescara.it.
Escape character is '^]'.
220 directadmin30.fastnom.com ESMTP Exim 4.94.2 Wed, 10 Nov 2021 12:17:45
+0100
EHLO test
250-directadmin30.fastnom.com Hello test [213.108.248.159]
250-SIZE 52428800
250-8BITMIME
250-PIPELINING
250-PIPE_CONNECT
250-AUTH PLAIN LOGIN
250-STARTTLS
250 HELP
AUTH LOGIN
334 VXNlcm5hbWU6
bmFzb25lQGZlZGVyY2FzYXBlc2NhcmEuaXQ=
334 UGFzc3dvcmQ6
Tmd1bGFtbWFtbXQxIQ==
235 Authentication succeeded

2021/11/10 11:20:15 Carlo via Exim-users <exim-users@exim.org>:

> hi
> i'm playing with a nas i've installed debian stable on, and i used to
> have some scripts with mailx work to send me messages through external
> providers/servers/etc till i upgraded debian: now i can't send mails
> through mailx but i can through telnet and swaks: here are mailx and
> swaks logs, please treat me as a true noob
>
> echo “Subject: sendmail test” | mail -v troianicarlo@gmail.com
> LOG: MAIN
>   <= nasone@federcasapescara.it U=root P=local S=479
> ?  ~ delivering 1mk3js-0006Jf-IB
> R: smarthost for troianicarlo@gmail.com
> T: remote_smtp_smarthost for troianicarlo@gmail.com
> Connecting to mail.federcasapescara.it [185.4.142.93]:25 ...  TFO mode
> sendto, no data: EINPROGRESS
> connected
>   SMTP<< 220 directadmin30.fastnom.com ESMTP Exim 4.94.2 Mon, 08 Nov
> 2021 13:27:05 +0100
>   SMTP>> EHLO ilmionasone.fritz.box
>   SMTP<< 250-directadmin30.fastnom.com Hello
> host-95-247-26-164.retail.telecomitalia.it [95.247.26.164]
>          250-SIZE 52428800
>          250-8BITMIME
>          250-PIPELINING
>          250-PIPE_CONNECT
>          250-AUTH PLAIN LOGIN
>          250-STARTTLS
>          250 HELP
>   SMTP>> STARTTLS
>   SMTP<< 220 TLS go ahead
>   SMTP(close)>>
> LOG: MAIN
>   TLS session: (certificate verification failed): delivering
> unencrypted to H=mail.federcasapescara.it [185.4.142.93] (not in
> hosts_require_tls)
> Connecting to mail.federcasapescara.it [185.4.142.93]:25 ...  TFO mode
> sendto, no data: EINPROGRESS
> connected
>   SMTP<< 220 directadmin30.fastnom.com ESMTP Exim 4.94.2 Mon, 08 Nov
> 2021 13:27:05 +0100
>   SMTP>> EHLO ilmionasone.fritz.box
>   SMTP<< 250-directadmin30.fastnom.com Hello
> host-95-247-26-164.retail.telecomitalia.it [95.247.26.164]
>          250-SIZE 52428800
>          250-8BITMIME
>          250-PIPELINING
>          250-PIPE_CONNECT
>          250-AUTH PLAIN LOGIN
>          250-STARTTLS
>          250 HELP
>   SMTP>> MAIL FROM:<nasone@federcasapescara.it> SIZE=1515
>   SMTP>> RCPT TO:<troianicarlo@gmail.com>
>   SMTP>> DATA
>   SMTP<< 250 OK
>   SMTP<< 550 authentication required
>   SMTP<< 503-All RCPT commands were rejected with this error:
>          503-authentication required
>          503 Valid RCPT command must precede DATA
>   SMTP>> QUIT
>   SMTP(close)>>
> LOG: MAIN
>   ** troianicarlo@gmail.com R=smarthost T=remote_smtp_smarthost
> H=mail.federcasapescara.it [185.4.142.93]: SMTP error from remote mail
> server after RCPT TO:<troianicarlo@gmail.com>: 550 authentication
> required
> LOG: MAIN
>   <= <> R=1mk3js-0006Jf-IB U=Debian-exim P=local S=2021
> delivering 1mk3jv-0006Jl-Th
> R: system_aliases for nasone@federcasapescara.it
> LOG: MAIN
>   ** nasone@federcasapescara.it: Unrouteable address
> LOG: MAIN
>   Frozen (delivery error message)
> LOG: MAIN
>   Completed
>
>
>
> swaks --tls --auth --to segreteria@federcasapescara.it --server
> mail.federcasapescara.it
> Username: nasone@federcasapescara.it
> Password: xxx
> === Trying mail.federcasapescara.it:25...
> === Connected to mail.federcasapescara.it.
> <-  220 directadmin30.fastnom.com ESMTP Exim 4.94.2 Mon, 08 Nov 2021
> 22:22:41 +0100
> -> EHLO ilmionasone.fritz.box
> <-  250-directadmin30.fastnom.com Hello
> host-95-247-26-164.retail.telecomitalia.it [95.247.26.164]
> <-  250-SIZE 52428800
> <-  250-8BITMIME
> <-  250-PIPELINING
> <-  250-PIPE_CONNECT
> <-  250-AUTH PLAIN LOGIN
> <-  250-STARTTLS
> <-  250 HELP
> -> STARTTLS
> <-  220 TLS go ahead
> === TLS started with cipher TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128
> === TLS no local certificate set
> === TLS peer DN="/CN=directadmin30.fastnom.com"
> ~> EHLO ilmionasone.fritz.box
> <~  250-directadmin30.fastnom.com Hello
> host-95-247-26-164.retail.telecomitalia.it [95.247.26.164]
> <~  250-SIZE 52428800
> <~  250-8BITMIME
> <~  250-PIPELINING
> <~  250-PIPE_CONNECT
> <~  250-AUTH PLAIN LOGIN
> <~  250 HELP
> ~> AUTH LOGIN
> <~  334 VXNlcm5hbWU6
> ~> bmFzb25lQGZlZGVyY2FzYXBlc2NhcmEuaXQ=
> <~  334 UGFzc3dvcmQ6
> ~> Tmd1bGFtbWFtbXQxIQ==
> <~  235 Authentication succeeded
> ~> MAIL FROM:<root@ilmionasone.fritz.box>
> <~  250 OK
> ~> RCPT TO:<segreteria@federcasapescara.it>
> <~  250 Accepted
> ~> DATA
> <~  354 Enter message, ending with "." on a line by itself
> ~> Date: Mon, 08 Nov 2021 22:21:39 +0100
> ~> To: segreteria@federcasapescara.it
> ~> From: root@ilmionasone.fritz.box
> ~> Subject: test Mon, 08 Nov 2021 22:21:39 +0100
> ~> Message-Id: <20211108222139.028193@ilmionasone.fritz.box>
> ~> X-Mailer: swaks v20201014.0 jetmore.org/john/code/swaks/
> ~>
> ~> This is a test mailing
> ~>
> ~>
> ~> .
> <~  250 OK id=1mkC6D-000Vj8-Sr
> ~> QUIT
> <~  221 directadmin30.fastnom.com closing connection
> === Connection closed with remote host.
>
> --
> ## List details at https://lists.exim.org/mailman/listinfo/exim-users
> ## Exim details at http://www.exim.org/
> ## Please use the Wiki with this list - http://wiki.exim.org/

--
## List details at https://lists.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/