sendmail not working
40,898
Solution 1
Try the following test command/script
#!/bin/sh
/usr/sbin/sendmail -i -v -- [email protected] <<END
subject: test
test
END
Solution 2
You can install the mail package in Ubuntu with below command.
For Ubuntu -:
$ sudo apt-get install -y mailutils
For CentOs-:
$ sudo yum install -y mailx
Test Mail command-:
$ echo "Mail test" | mail -s "Subject" [email protected]
Related videos on Youtube
Author by
doniyor
Updated on September 18, 2022Comments
-
doniyor over 1 year
I have a website where mails are sent. Those mails from website (contact mail, booking mail) are being sent well. But when I go to shell with ssh and give
sendmail [email protected]
it is not sending.the error log in
/var/log/mail
says:did not issue MAIL/EXPN/VRFY/ETRN during connection to MTA
some time ago, i had a problem with permission, i changed without knowing the permission of
/etc/
folder, then later i didchmod 755 /etc/
then everything seemed to work properly. but now, i am getting this error.server os is openSuse.
what can I do?
-
derobert almost 10 yearsWhat if you try
mail [email protected]
instead ofsendmail
? -
doniyor almost 10 years@derobert i am getting this message if i give mail:
If 'mail' is not a typo you can use command-not-found to lookup the package that contains it, like this: cnf mail
-
doniyor almost 10 years@derobert and i gave with
cnf
but nothing happened. neither error message nor email was sent
-