I installed sendmail on my server (ubuntu 16). I set up the configuration file on smtp.google.com and googl`a box. Mail is sent. All is well. But I want to send mail from my server. That is, I want to deploy smtp on my server and configure an agent for it. How to do it?

And the second question. How to send messages from different mailboxes through smtp, that is, to replace Mail-From in headers. (send from site). And if it is impossible through smtp, how is it possible?

  • one
    How to do it? - remove this: “Configured the configuration file on smtp.google.com and googl`a box” // unrelated questions should be asked separately. - aleksandr barakin
  • Well, in general, the use of the sendmail program as mta in our times is something akin to using (for example) ford model t : it will probably be going, but if it suddenly happens “what’s wrong”, then you can simply ask questions and ask for help not to whom. it would be much more practical to install something more common: exim , there, or postfix - aleksandr barakin
  • @alexanderbarakin agree with you, put the postfix - Dmitriy
  • "mail from the site with the mail-from substitution" - for this I use PHPMailer. - Nikolay Gabaraev

0