-1

I bought a VPS from OVH.

This Ubuntu VPS hostname is something like vps12345 or vps12345.ovh.net.

If I test sendmail via command line to send an email to my mail test@gmail.com, it works: I receive an email from test@vps12345@ovh.net.

But I'd like to send mail from my installed domain (for instance: test@mytestdomain.com), and if test from my PHP code, mail sent to Gmail arrives but with a lot time late.

So I suppose that Gmail (or anyother email provider) don't accept emails with header from X domain, but from an hostname Y...

So how can I send email from my vps12345 using other domain (which I own and host on that VPS)?

Do I need to rename VPS hostname?

Thanks

KazikM
  • 215
  • 1
  • 3
  • 11
stighy
  • 931
  • 8
  • 21
  • 32
  • "sendmail" can be installed directly or symlinked to a different MTA you have installed (for example postfix or exim). Check which MTA you have installed, find a tutorial for it and configure it. When you run into concrete problems, post them here including your configuration files and actual error messages you receive. – Gerald Schneider Jan 06 '21 at 13:57

1 Answers1

2

Proper way: change host FQDN (fully quallified domain name) as reported by hostname command (typically hostname --fqdn). The exact procedure may by OS/Distribution dependand.

Sendmail only fix: "who am I" in cf/README file in sendmail distribution.
=>define confDOMAIN_NAME in sendmail.mc file and generate new sendmail.cf (submit.cf may also require changes).

Glorfindel
  • 1,213
  • 4
  • 15
  • 22
AnFi
  • 6,103
  • 1
  • 14
  • 27