LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 05-12-2014, 02:12 AM   #1
ps1x0
Member
 
Registered: Jan 2011
Posts: 35

Rep: Reputation: 0
Sendmail on CentOS not working properly


I've been searching for some time how to resolve my issue, but from the threads/tutorials I found, nothing actually described my problem.

So there are some emails, that aren't sent or that are delayed with days and in the end flushed from the queue.

I have 2 domains which I use on the machine, let's say domain1.com and domain2.com.

Code:
I am trying to send an email to void@domain1.com but i get the following reply:
"550 5.1.1 void@domain1.com... User unknown"
The actual hosting on the mailboxes is on another machine (paid hosting) and the mailbox exists.

Second problem is with domain2.com:

Quote:
s4A603Tc015479 4347 Sat May 10 09:00 MAILER-DAEMON
8BITMIME (Deferred: Connection refused by subdomain.domain2.com.)
<noreply@subdomain.domain2.com>
Here is the log from maillog:

Code:
May 12 10:06:53 domain1 sendmail[11658]: dangerous permissions=40777 on queue directory /var/spool/clientmqueue/
May 12 10:06:53 domain1 sendmail[11658]: s4C76rEa011658: from=root, size=224, class=0, nrcpts=1, msgid=<201405120706.s4C76rEa011658@domain1.com>, relay=root@localhost
May 12 10:06:53 domain1 sendmail[11659]: s4C76rFQ011659: <void@domain1.com>... User unknown
May 12 10:06:53 domain1 sendmail[11658]: s4C76rEa011658: to=void@domain1.com, ctladdr=root (0/0), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30224, relay=[127.0.0.1] [127.0.0.1], dsn=5.1.1, stat=User unknown
May 12 10:06:53 domain1 sendmail[11659]: s4C76rFQ011659: from=<root@domain1.com>, size=224, class=0, nrcpts=0, proto=ESMTP, daemon=MTA, relay=localhost [127.0.0.1]
May 12 10:06:53 domain1 sendmail[11658]: s4C76rEa011658: s4C76rEb011658: DSN: User unknown
May 12 10:06:53 domain1 sendmail[11659]: s4C76rFS011659: from=<>, size=2099, class=0, nrcpts=1, msgid=<201405120706.s4C76rEb011658@domain1.com>, proto=ESMTP, daemon=MTA, relay=localhost [127.0.0.1]
May 12 10:06:53 domain1 sendmail[11658]: s4C76rEb011658: to=root, delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=31248, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (s4C76rFS011659 Message accepted for delivery)
Most of the emails to outside providers (like gmail) are sent without an issue, but some are queued and send after some time...
Example:


Code:
450 4.7.1 <....@gmail.com>: Recipient address rejected: Service is temporarily unavailable. Please try again later.
<....9@gmail.com>... Deferred: 450 4.7.1 <....9@gmail.com>: Recipient address rejected: Service is temporarily unavailable. Please try again later.
 
Old 05-12-2014, 08:00 PM   #2
lleb
Senior Member
 
Registered: Dec 2005
Location: Florida
Distribution: CentOS/Fedora/Pop!_OS
Posts: 2,983

Rep: Reputation: 551Reputation: 551Reputation: 551Reputation: 551Reputation: 551Reputation: 551
im no expert, but here are a few things that im seeing:

1. If domain1 is telling you user unknown, then the issue is not on the domain2 system you are sending it from, but the other end.
2. your logs tell you right off the bat you have a major issue, that is not just your issue but the rest of the worlds issue as it will drastically increase the odds of your system spamming the world:

Quote:
dangerous permissions=40777 on queue directory /var/spool/clientmqueue/
bad bad bad bad bad bad bad bad bad, 777 on a public directory... this is bad.

as for the connection refused, what mode is your SELinux configured to run and have you properly set both the IPTables and SELinux to allow for sendmail to function both inbound and out?
 
Old 05-13-2014, 11:28 AM   #3
ps1x0
Member
 
Registered: Jan 2011
Posts: 35

Original Poster
Rep: Reputation: 0
Code:
can not chdir(/var/spool/clientmqueue/): Permission denied
Program mode requires special privileges, e.g., root or TrustedUser.
Probably that's why I've set that permission. I chowned the directory to smmtp user, but without effect.

SELinux is disabled. Firewall has the needed ports open.

Regarding "1" - emails from gmail for example are send without an issue to void@domain1.com
 
Old 05-16-2014, 09:06 PM   #4
dijetlo
Senior Member
 
Registered: Jan 2009
Location: RHELtopia....
Distribution: Solaris 11.2/Slackware/RHEL/
Posts: 1,491
Blog Entries: 2

Rep: Reputation: Disabled
Does void@domain1 have a hosted email account or is he just a user on Domain1?
Can you post the complete header from the rejected email please?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] xdm not working properly (CentOS) resuni Linux - Desktop 10 12-19-2013 03:03 PM
Crontab is not working properly on CentOS 6.3 miguelangeljma Linux - Newbie 12 09-30-2012 10:56 PM
Sendmail not working on Centos 4.5 xoise Linux - Software 5 12-29-2008 02:54 PM
Centos OS not loading properly elkikz Linux - Laptop and Netbook 4 09-19-2006 04:06 PM
sendmail not chaning local address properly kudos Linux - Software 2 12-13-2003 10:33 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 10:00 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration