0

Unfortunately, my server is unable to send email. I found the following tutorial by searching the web:

https://pepipost.com/tutorials/install-sendmail-server-centos-7/

But when I enter the sudo yum install sendmail sendmail-cf m4 command, I get the following output

[root@server ~]# sudo yum install sendmail sendmail-cf m4
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: mirror.checkdomain.de
 * epel: mirrors.n-ix.net
 * extras: mirror.alpix.eu
 * updates: linux.darkpenguin.net
No package sendmail available.
No package sendmail-cf available.
Package m4-1.4.16-10.el7.x86_64 already installed and latest version
Nothing to do

How ca I do add sendmail & sendmail-cf packages?

sorry i'm new in Linux

Thanks

EDIT Step 1 in tutorial (sudo yum install epel-release) has this result:

Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile epel/x86_64/metalink | 31 kB 00:00 * base: mirror.checkdomain.de * epel: mirrors.n-ix.net * extras: mirror.alpix.eu * updates: linux.darkpenguin.net base | 3.6 kB 00:00 extras | 2.9 kB 00:00 updates | 2.9 kB 00:00 Package epel-release-7-12.noarch already installed and latest version Nothing to do

3 Answers3

0

You probably need to add the epel-release repository run the command below

sudo yum install epel-release

Then try your yum install again and it should see the packages this time. If you aren't sure exactly what a package is called, you can also try

sudo yum search (packageName) where the package name in this case would be sendmail

Gordster
  • 174
  • 8
  • Thanks, but this is first step in tutorial, and result comes in my next comment – Hamid Reza Yazdani Mar 27 '20 at 06:00
  • `Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile epel/x86_64/metalink | 31 kB 00:00 * base: mirror.checkdomain.de * epel: mirrors.n-ix.net * extras: mirror.alpix.eu * updates: linux.darkpenguin.net base | 3.6 kB 00:00 extras | 2.9 kB 00:00 updates | 2.9 kB 00:00 Package epel-release-7-12.noarch already installed and latest version Nothing to do` – Hamid Reza Yazdani Mar 27 '20 at 06:01
  • If you run the yum search, do you see any packages listed that resemble Sendmail? – Gordster Mar 27 '20 at 17:04
0

Can you try below commands:

#yum repolist

O/P

Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
 * base: mirrors.piconets.webwerks.in
 * epel: mirrors.aliyun.com
 * extras: mirrors.piconets.webwerks.in
 * updates: mirrors.piconets.webwerks.in
repo id                                  repo name                                                              status
base/7/x86_64                            CentOS-7 - Base                                                        10,097
epel/x86_64                              Extra Packages for Enterprise Linux 7 - x86_64                         13,217
extras/7/x86_64                          CentOS-7 - Extras                                                         338
updates/7/x86_64                         CentOS-7 - Updates                                                      1,787
repolist: 25,439

If you do not have epel enabled please try enabling it. By the way sendmail is coming from Centos-Base repository.

If you have epel enabled then you should be able to download the packages with below commands:

#yum install sendmail sendmail-cf m4

O/P

======================================================================================================================
 Package                      Arch                    Version                             Repository             Size
======================================================================================================================
Installing:
 m4                           x86_64                  1.4.16-10.el7                       base                  256 k
 sendmail                     x86_64                  8.14.7-5.el7                        base                  736 k
 sendmail-cf                  noarch                  8.14.7-5.el7                        base                  186 k
Installing for dependencies:
 cyrus-sasl                   x86_64                  2.1.26-23.el7                       base                   88 k
 procmail                     x86_64                  3.22-36.el7_4.1                     base                  171 k

Transaction Summary
======================================================================================================================
Install  3 Packages (+2 Dependent packages)

Total download size: 1.4 M
Installed size: 3.5 M
Is this ok [y/d/N]:
Santosh Garole
  • 453
  • 1
  • 4
  • 11
  • Thanks santosh, my eple is enabled but I want to install the sendmail receive the same error `No package sendmail available. No package sendmail-cf available.` – Hamid Reza Yazdani Mar 27 '20 at 08:02
  • Can you paste `yum repolist` o/p. – Santosh Garole Mar 27 '20 at 08:14
  • Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile * base: mirror.checkdomain.de * epel: mirrors.n-ix.net * extras: mirror.alpix.eu * updates: linux.darkpenguin.net repo id repo name status base/7/x86_64 CentOS-7 - Base 9,958+139 epel/x86_64 Extra Packages for Enterprise Linux 7 - x86_64 12,329+888 extras/7/x86_64 CentOS-7 - Extras 338 updates/7/x86_64 CentOS-7 - Updates 1,757+30 repolist: 24,382 – Hamid Reza Yazdani Mar 27 '20 at 09:21
0

Not sure why you are adding new repo it's already available with your centos itself not all packages installed by default. Since your epel repo is 7-12 i guess you are using centos7.12. Here is all list of available packages what you have to do mount the cd and make local repo and use yum to install.

http://mirror.centos.org/centos/7/os/x86_64/Packages/

Steps to create DVD/CD repo

  1. create dir

    mkdir /cdrom '''make mount point for dvd/cd

    mount /dev/cdrom /cdrom '''mount it on /cdrom dir

  2. create new repo file

    vi /etc/yum.repos.d/local.repo

  3. Add the following details

    [mediarepo]

    name=mediarepo

    baseurl=file:///cdrom

    enabled=1

    gpgcheck=1

    gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7

We are ready now. Do cleanup.

yum clean all

And now you can use it.

yum search sendmail

Hope this will help.

asktyagi
  • 2,860
  • 2
  • 8
  • 25