Re: [exim] can send mails with swaks, not with mailx

Top Page
Delete this message
Reply to this message
Author: Cyborg
Date:  
To: exim-users
Subject: Re: [exim] can send mails with swaks, not with mailx
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@???
> LOG: MAIN
>    <=nasone@???  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@???>  SIZE=1515
>    SMTP>> RCPT TO:<troianicarlo@???>
>    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@??? --server
> mail.federcasapescara.it
> Username:nasone@???
> 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@???>
> <~ 250 OK
> ~> RCPT TO:<segreteria@???>
> <~ 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