Search code examples
linuxemailsendmailattachmentmutt

Send email using Mutt without authentication


I have an intranet SMTP server without authentication.

I'm trying to send an email using Mutt; I've configured it as below:

set from = ""
#set use_from = yes
#SMTP user auth
set smtp_url = "smtp://user@<ip-address-of-my-server>:25"
#set smtp_pass = "$imap_pass"

But when I try to send an email using this command:

mutt -s "Test message" [email protected] < /root/testMsg.txt

I get this message:

SMTP server does not support authentication
Could not send the message.

I've tried different configuration, with and without user, ecc, but I only get errors.

My question: Is it possible to send an email using Mutt without authentication?

Thanks a lot.


Solution

  • IMHO you should omit the user@ from your smtp_url setting.

    I.e.:

    set smtp_url = "smtp://<ip-address-of-my-server>:25"
    

    Mutt's documentation on smtp_url says everything but the host name (or address) is optional on the right hand side of the URL.