The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Sendmail

Discussion in 'E-mail Discussions' started by deeh514, Aug 26, 2011.

  1. deeh514

    deeh514 Member

    Joined:
    Aug 26, 2011
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    Hi,

    Is Sendmail available on a CPanel server? I dont seem to be able to find it :cool:

    thanks
     
  2. alphawolf50

    alphawolf50 Well-Known Member

    Joined:
    Apr 28, 2011
    Messages:
    186
    Likes Received:
    2
    Trophy Points:
    18
    cPanel Access Level:
    Root Administrator
    If you're root, connect with ssh and type:

    yum install sendmail​

    It will either install sendmail or tell you it's already installed.
     
  3. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    Sendmail should already be installed and checking it via yum isn't the way to go on a cPanel machine. This is the way to check it:

    Code:
    whereis sendmail
    or
    Code:
    which sendmail
    You should see something like the following:

    Code:
    /usr/sbin/sendmail
    cPanel machines do not use yum rpms for sendmail. Here's the output on an example cPanel machine:

    Code:
    root@pride [~]# whereis sendmail
    sendmail: /usr/sbin/sendmail /usr/lib/sendmail
    Code:
    root@pride [~]# rpm -qa | grep -i sendmail
    root@pride [~]#
     
  4. alphawolf50

    alphawolf50 Well-Known Member

    Joined:
    Apr 28, 2011
    Messages:
    186
    Likes Received:
    2
    Trophy Points:
    18
    cPanel Access Level:
    Root Administrator
    Then these instructions need fixed: Advanced Options: Pre-Installation
    This line is added to /etc/yum.conf:

    Code:
    Exclude= apache* bind-chroot courier* dovecot* exim* httpd* mod_ssl* mysql* nsd* perl* php* proftpd* pure-ftpd* spamassassin* squirrelmail*
    There is no mention of sendmail in that list. Looking at the output of yum:
    Code:
    # yum list sendmail
    Loaded plugins: fastestmirror
    Loading mirror speeds from cached hostfile
     * base: centos.mirror.facebook.net
     * extras: mirrors.usc.edu
     * updates: centos-distro.cavecreek.net
    Excluding Packages in global exclude list
    Finished
    Available Packages
    sendmail.x86_64                                                                8.13.8-8.el5                                                                 base
    Yum found sendmail in the CentOS repos, unlike all the other packages which were excluded. I remember removing sendmail via yum before installing cPanel (and several other unnecessary services), and since it was not excluded in the instructions it was logical to assume the package was handled via yum. Someone needs to fix those instructions to include sendmail in the excludes.

    For what it's worth, sendmail still isn't actually installed on my machine -- Exim just pretends to be sendmail at /usr/sbin/sendmail.
     
  5. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    The proper way to check if a service exists already on a machine is whereis service or which service for the service name or location. Not all services are installed using yum, so checking using yum by simply installing that service (whether the service is excluded or not) is not the way to do it.

    Now, once you determine if a service does exist, you can certainly use yum to check if it was installed via rpms by running rpm -qa | grep -i service at that point.

    For exim using /usr/sbin/sendmail in place of the typical sendmail, yes it is used that way on cPanel machines, but it works for PHP mail() and other functions as sendmail regardless.
     
  6. alphawolf50

    alphawolf50 Well-Known Member

    Joined:
    Apr 28, 2011
    Messages:
    186
    Likes Received:
    2
    Trophy Points:
    18
    cPanel Access Level:
    Root Administrator
    I'm not disputing what you're saying -- I'm saying those instructions (Advanced Options: Pre-Installation) should be fixed. If yum should not tamper with something that cPanel has done, then the corresponding package should be excluded in yum.conf, just like mysql, exim, httpd, etc.
     
  7. cPanelKenneth

    cPanelKenneth cPanel Development
    Staff Member

    Joined:
    Apr 7, 2006
    Messages:
    4,458
    Likes Received:
    22
    Trophy Points:
    38
    cPanel Access Level:
    Root Administrator
    Sendmail is not used, nor likely compatible, with a cPanel server. We provide the Exim MTA, which provides a command line interface that is compatible with the sendmail interface. Because many things assume a binary named sendmail exists, the Exim MTA also provides /usr/sbin/sendmail.

    Since Exim is what is used by cPanel, we exclude exim in /etc/yum.conf. Since we don't provide a Sendmail package we don't exclude it in yum.conf.
     
Loading...

Share This Page