mail()이 안됩니다... 좀 도와주세요...

ensel의 이미지

APM과 SendMail을 업그레이드를 한후로 PHP에서 mail()이 발송이 안됩니다.
아니 PHP 뿐아니라 쉘상에서도 일반 계정으로 mail 을 이용하면 퍼미션 디나이
와 함께 메일이 발송이 되질 않습니다...
참고로 아웃룩에 SMTP AUTH 로 보내는 메일은 잘 날아갑니다.

drwxrwx--- 2 smmsp smmsp 4.0k 4월 14 09:41 clientmqueue
drwxrwxr-x 2 root mail 4.0k 4월 14 10:47 mail
drwx------ 8 root root 56k 4월 14 10:47 mqueue

위는 /var/spool의 퍼미션들입니다...

clientmqeue를 777로 변경을 하면 쉘상이든 웹상이든 잘 날아가는데요..
좀 무서워서여..

다른 방법을 알고 싶습니다..

조금 급하기두 하거든요...
고수님들의 조언을 듣고 싶습니다.

PHP버전 4.3.6 SendMail 버전 8.12.5-7 입니다...

그래서 sendmail을 삭제하고 다시설치를 했습니다..
RPM 버전으로 그런데...

경고: smmsp 그룹이 존재하지 않습니다 - root를 이용합니다
경고: smmsp 사용자가 존재하지 않습니다 - root를 이용합니다
경고: smmsp 그룹이 존재하지 않습니다 - root를 이용합니다
경고: mail 그룹이 존재하지 않습니다 - root를 이용합니다

이렇게 smmsp 가 없다고 나옵니다...

passwd 파일에도 group 파일에도 smmsp와 mail 은 존재를 합니다..
혹시나 싶어.. 삭제하고도 제설치해보고 미리 만들어놓고 제설치를 해봐도
위와같이 똑같이 뜹니다...

이렇게 설치를 하고 나면 sm-client가 퍼미션 오류가 발생을 해서 실행이 안
됩니다.
그래서 clientmqeue를 smmsp:smmsp 이렇게 변경을 해주면 sm-client가 실행이
됩니다.

그러면 SMTP ,POP3(imap이용) 는 잘 운영이 됩니다... 아웃룩을 이용하는

그런데.. 웹이나 일반유저의 쉘상에서는 메일이 발송되지 않습니다...
미치겠습니다... 모가 잘못된걸까요...
도와주세요......

ㅠ.ㅠ

고수님들의 조언을 부탁드립니다.

ssik425의 이미지

mail함수로 메일 발송시 /var/log/maillog 에 적재되는 로그를 올려 주면 좀더 정확한 답변이 나올것 같네요..

개발자들의 궁극적 비전은 ?

ensel의 이미지

로그

Apr 17 09:02:12 www sendmail[6604]: NOQUEUE: SYSERR(nobody): can not chdir(/var/spool/clientmqueue/): Permission denied
Apr 17 09:04:38 www sendmail[6607]: j3H04aCh006607: from=<ofwj@hotmail.com>, size=67512, class=0, nrcpts=1, msgid=<200504170004.j3H04aCh006607@www.mesian.co.kr>, proto=ESMTP, daemon=MTA, relay=[211.215.78.89]
Apr 17 09:04:38 www sendmail[6608]: j3H04aCh006607: to=<event@mesian.co.kr>, delay=00:00:02, xdelay=00:00:00, mailer=local, pri=97749, dsn=2.0.0, stat=Sent
Apr 17 09:04:40 www sendmail[6610]: j3H04cCh006610: from=<ofwj@hotmail.com>, size=85494, class=0, nrcpts=1, msgid=<200504170004.j3H04cCh006610@www.mesian.co.kr>, proto=ESMTP, daemon=MTA, relay=[211.215.78.89]
Apr 17 09:04:40 www sendmail[6611]: j3H04cCh006610: to=<event@mesian.co.kr>, delay=00:00:02, xdelay=00:00:00, mailer=local, pri=115731, dsn=2.0.0, stat=Sent

쉘상에서 보낼때
$ WARNING: RunAsGid for MSP ignored, check group ids (egid=0,want=51)
can not chdir(/var/spool/clientmqueue/): Permission denied
Program mode requires special privileges, e.g., root or TrustedUser.

로그는 이렇습니다.

ssik425의 이미지

구글 검색 ^^*

Quote:

"RunAsGid for MSP ignored" error

When sending mail through Sendmail's mail user agent or another mail user agent (ex. mutt), I received the following error:

WARNING: RunAsGid for MSP ignored, check group ids (egid=8809, want=1)
can not write to queue directory /var/spool/clientmqueue/ (RunAsGid=0, required=8809): Permission denied

If you are running Sendmail 8.12.x, make sure you are using the following permissions as defined in sendmail/SECURITY:

-r-xr-sr-x root smmsp ... /PATH/TO/sendmail
drwxrwx--- smmsp smmsp ... /var/spool/clientmqueue
drwx------ root wheel ... /var/spool/mqueue
-r--r--r-- root wheel ... /etc/mail/sendmail.cf
-r--r--r-- root wheel ... /etc/mail/submit.cf

In my case, I had the Sendmail file and directory permissions configured correctly, but did not have the smmsp user's group ID configured correctly:

$ grep smmsp /etc/passwd /etc/group
/etc/passwd:smmsp:x:15716:1::/home/smmsp:/bin/sh
/etc/group:smmsp::8809:

Changing the smmsp user's group ID to 8809 solved the problem:

# usermod -g 8809 smmsp

개발자들의 궁극적 비전은 ?

댓글 달기

Filtered HTML

  • 텍스트에 BBCode 태그를 사용할 수 있습니다. URL은 자동으로 링크 됩니다.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>
  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.

BBCode

  • 텍스트에 BBCode 태그를 사용할 수 있습니다. URL은 자동으로 링크 됩니다.
  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param>
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.

Textile

  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • You can use Textile markup to format text.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>

Markdown

  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • Quick Tips:
    • Two or more spaces at a line's end = Line break
    • Double returns = Paragraph
    • *Single asterisks* or _single underscores_ = Emphasis
    • **Double** or __double__ = Strong
    • This is [a link](http://the.link.example.com "The optional title text")
    For complete details on the Markdown syntax, see the Markdown documentation and Markdown Extra documentation for tables, footnotes, and more.
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>

Plain text

  • HTML 태그를 사용할 수 없습니다.
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.
  • 줄과 단락은 자동으로 분리됩니다.
댓글 첨부 파일
이 댓글에 이미지나 파일을 업로드 합니다.
파일 크기는 8 MB보다 작아야 합니다.
허용할 파일 형식: txt pdf doc xls gif jpg jpeg mp3 png rar zip.
CAPTCHA
이것은 자동으로 스팸을 올리는 것을 막기 위해서 제공됩니다.