How to configure sendmail to send mail using an external gmail SMTP server?

Posted July 11, 2015 83.1k views

My system is debian8.1 ,sendmail has been installed.
I want to use the sendmail as a external gmail SMTP way to send mail .

Some article say “vi /etc/mail.rc” to add the following lines :

set smtp-auth-user=yourname
set smtp-auth-password=yourpasswd
set smtp-auth=login

There is no /etc/mail.rc in my filesystem.

ls  /etc/mail
access       helpfile
access.db    local-host-names  sendmail.conf
address.resolve  m4       tls
aliases      Makefile      service.switch    trusted-users
aliases.db   peers         service.switch-nodns
databases    sasl          smrsh

Which file will be chosen to add the lines?

1 comment

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
2 answers

Hello, could to have you here at DO and that you are asking our community to help you out. But if you google out a bit you can find out alot yourself ;) For example check this tutorial:

If you got any more questions you cant work out, ill be happy to help you then.

done as the material say,think CrypticDesigns .