Link to home
Start Free TrialLog in
Avatar of Rick Becker
Rick BeckerFlag for United States of America

asked on

Need Help getting Sendmail to ACCEPT mail on CentOS 6

Greetings All,

it has been awhile since I have been on EE but I now find that I need help.

First let me give a brief history of what I am wanting to do and them I'll get into the Sendmail Issue.

History: I am currently in the mode of moving a bunch of Domains, Emails and MySQL data from an existing FreeBSD machine to a Virtual CentOS machine. The FreeBSD box is hosted by 1800Hosting and the Virtual CentOS "box" is hosted by Wild West Domains (now owned by GoDaddy).

I have CPanel installed on the CentOS machine but quite frankly I am more of a Command Line interface person and I have not been successful in getting mail to work through CPanel.

So .. I installed Sendmail via the CLI and set up the Virtual machine as a DNS Server. I have the DNS server portion working but so far I have not been able to get Sendmail to start Accepting email.

On my FreeBSD box I get the following process information back when I check to see if sendmail is running:
-------------------------------------------------------------------------------------
$ ps -auwx | grep sendmail
root    888  0.0  0.0  3776  1508  ??  Ss   20Mar13  16:08.10 sendmail: accepting connections (sendmail)
smmsp   894  0.0  0.0  3384   772  ??  Is   20Mar13   0:06.34 sendmail: Queue runner@00:30:00 for /var/spool/clientmqueue (sendmail
root  16335  0.0  0.1  3776  2112  ??  S    12:32PM   0:00.00 sendmail: startup with h72-2-20-183.bigpipeinc.com (sendmail)
rrb   16337  0.0  0.0  1592   904  p1  S+   12:32PM   0:00.00 grep sendmail

-------------------------------------------------------------------------------------

However on the CentOS machine the following is the only thing I get back:
----------------------------------------------------------------------------------------------
root@ip-50-62-8-115 [/etc]# ps -ef | grep sendmail
mailnull  7741     1  0 09:55 ?        00:00:00 /usr/sbin/sendmail -L sm-msp-queue -Ac -q1h
root     10172  5551  0 11:29 pts/0    00:00:00 grep sendmail
----------------------------------------------------------------------------------------------

So.. I have tried the You-Tube and Google route to find a solution but so far I have not been successful. I am sure that there is something that I am overlooking and I may just need an extra pair of eyes to help me through this...

Any help you can offer will be greatly appreciated.

rrbecker
Rick
Avatar of arnold
arnold
Flag of United States of America image

I realize your question, any way to persuade you to switch to postfix instead?
There are different configuration files.


Are you using system users as the mailboxes,or are you planing on virtual users/mailboxes.

Within master.conf there are references to a virtual domain table as well as virtual user tables that need to be setup.
http://sendmail-sql.sourceforge.net

If you have cpanel, you should use it because in the event you or someone else makes a change init, it could adversely affect all your prior setups.

Cpanel,  guide to Add a virtual domain http://docs.cpanel.net/twiki/bin/view/AllDocumentation/CpanelDocs/AddonDomains
Avatar of Rick Becker

ASKER

Hi Arnold...

Thanks for the reply...

Well I am a FreeBSD person from WAY back and I have always used Sendmail. However, since my goal is to provide email to all my previous FreeBSD users via POP3, I guess if PostFix is easier to get going then I am not opposed to switching.. This is a new server and it is not 100% necessary that I maintain Sendmail.

I assume that you would help walk me through the removal of Sendmail and the Installation of Postfix.. Right??

Rick
The steps are straight forward
yum erase sendmail
yum install postfix

Before that, if you cpanel, it maintains and updates.

Question whether you are intent on managing any email functionality through editing individual configuration files versus using a database such mysql as the backend for your mail handling.

For postfix, you would need additional packages to allow for pop3, imap access to the data.

If your cpanel+sendmail setup is driven by mysql! then instead of command line editing of configuration files! you would need to access mysql, and update tables by adding a domain to one table! while then adding users to another table! and then creating the respective folder ......

Presumably because you have cpanel, its purpose is to allow your subscribers to manage their domains, users.
There are perils in trying to manage/configure a system when there are two separate methods in use.  One could overwrite implementations made by another.
You've likely looked at it: http://docs.cpanel.net/twiki/bin/view/AllDocumentation/CpanelDocs/WebHome

IMHO, some of your users/clue that one point or another will reach out with a difficulty dealing with them having an issue that they need help with using cpanel.

Also using the cpanel, it might make it clear where the configuration files or how the data is managed if it is entirely/mixture flat files and database.
Hi Arnold....

Cpanel was installed as part of the initial offering when I purchased the Virtual Server. CPanel is not actually required because this server will not have any Actual Users on it.. ie No Web accounts.

The only users will be in the form of email users and these users will access their email via POP3..

Actually I would prefer that CPanel was not even there. I Prefer to handle the configuration myself via the command line interface...


Can you still help me even if I do not use Cpanel??

Rick
Sure, if you are the one managing and cpanel is not involved.

https://www.sendmail.com/sm/open_source/tips/virtual_hosting/


Are you going to be using useradd to create local users?
Here is a link to a setup that may over all your needs with your preferred mail server, sendmail.

Http://www.linuxscrew.com/2011/02/07/sendmail-for-virtual-users-with-procmail-spamassassin-and-dovecot/
Hi Arnold,

Well I may be getting close... I believe that Sendmail is 'Listening' but whenever I try to send email to a User on system I receive the following error message:

----------------------------------------------------------------------------------------------------
Delivery to the following recipient failed permanently:

     vasylum@verilynx.com

Technical details of permanent failure:
Google tried to deliver your message, but it was rejected by the server for the recipient domain verilynx.com by vinylasylum.verilynx.com. [50.62.8.115].

The error that the other server returned was:
550 No Such User Here

-------------------------------------------------------------------------------------------

NOTE: Currently my SMTP from my personal machine is gmail...

Thanks for any insite that you may have

Rick
Centos 6 has postfix in default installation.
I'd say it will be much easier to clean misguided sendmail stains and go on with much more robust and performant postfix
(it still has /usr/lib/sendmail and smtp on localhost, so it does not break anything)
You have to look at your /etc/alias and depends on how your virtusertable is setup.

One deals with local users that are seen in /etc/passwd and have a home dir /home/$user/mail or /var/spool/mail/

without knowing how your setup is defines the user and their home directory, it is impossible to say where the issue might be.

The last link I posted deals with have /etc/alias lists with usernames mapped to
/var/spool/domainname/user


etc.
Ok... I am getting frustrated with Sendmail... I'll try to use Postfix...

Any help you can give me to get Postfix running would be appreciated.

One of the issues I see already with Postfix is that I can not install Mysql with 'Yum install mysql'

I'll do some reading and try to figure this out
  As always any help is appreciated

Rick
yum install mysql-server
The above installs the server components
While mysql by itself installs the client side

Yum search mysql

Would list all available packages with mysql in the name.l

What if any error do you get?
Centos has group installs. Where you can use yum groupinstall "group name" that will install the multiple items making up the group.
yum groupinstall "mysql database"

Yum list groups
There are examples similar to the one I posted for mysql+sendmail+spamassasin+dovecote etc.

There are postfix, mysql, an anti-virus, amavis, spamassasin, etc install guide for centos, etc.

Since you switched, the log file is a way to trouble shoot issues as well /var/log/maillog.

The issue you likely were seems dealt with a user table such that you had an email defined and pointed it to a "user account" but that account did not exist as a local user, nor was defined in /etc/alias through which sendmail could
The other option if you've included an local delivery agent (LDA) such as procmail or any other filtering tool that ran into trouble when trying to save the message into a user's mailbox, the error code on exit could also trigger this error from sendmail.
On postfix it accepts mail from localhost and listens on localhost...
Short stroll arount /etc/postfim/main.cf should reveal hos wo
1) make it listen on any IP on system
2) accept mail from other IPs in your network
3) direct mail to smarthost...
ASKER CERTIFIED SOLUTION
Avatar of arnold
arnold
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Hi Arnold...

It looks like I actually have a Corrupted or Bad install of CentOS and or CPanel.  I am getting a very large number attacks to my machine. I am going to award you the points for helping me but I am going to close this question for now.

I am going to get a New install of the OS and then if I still can't get things running, I'll again 'ASK'  for help...

Thanks for your time, and I am sorry to have wasted your time with a Corruption issue.

Rick
Problem has not actually been resolved due to a corrupted OS. However, Arnold has been most helpful and Patient...