Where to configure the smtp server in Mutt utility

muttsmtp

I have my smtp server — smtp.drdb.com which is registered in DNS. I need to setup Mutt utility in my RHEL 6 server. Where should I input my smtp server details in mutt.rc file so that I can send mail. When I try to send mail from mutt, it goves me error Invalid URL – smtp.drdb.com

Best Answer

If you use a version of mutt that is compiled with SMTP support then mutt can send mail to another server via SMTP. Otherwise it will always use the local mail server.

To use it, you have to set the smtp_urlvariable.

  smtp_url
          Type: string
          Default: “”

          Defines the SMTP smarthost where sent messages should relayed
          for delivery. This should take the form of an SMTP URL, e.g.:


          smtp[s]://[user[:pass]@]host[:port]


          where “[...]” denotes an optional part.  Setting this variable
          overrides the value of the $sendmail variable.
Related Question