LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
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 10-11-2008, 09:07 AM   #1
simjith
LQ Newbie
 
Registered: Oct 2008
Posts: 7

Rep: Reputation: 0
Postfix + Altermime on FC6 Not working


Hi All,


I am trying to add Disclaimer to all outgoing mails

My MTA is Postfix 2.4.5
OS Fedora Core 6
I had followed the instructions provided in this URL

http://www.howtoforge.com/add-automa...ostfix-fedora8

Also googled and tried lots of other links too
but what ever URL had i tried
its showing a common error while sending mails
First of all the mail is not at all delivering

And always showing below error message in /etc/log/maillog
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
Oct 11 11:35:19 it001 postfix/qmgr[3767]: 5EA8650056: from=<root@localhost.localdomain>, size=546, nrcpt=1 (queue active)
Oct 11 11:35:19 it001 pipe[3844]: fatal: pipe_command: execvp /etc/postfix/disclaimer: Permission denied
Oct 11 11:35:19 it001 postfix/pipe[3843]: 5EA8650056: to=<test@test.com>, relay=dfilt, delay=1244, delays=1244/0.01/0/0.18, dsn=4.3.0, status=deferred (temporary failure. Command output: pipe: fatal: pipe_command: execvp /etc/postfix/disclaimer: Permission denied )/etc/postfix/disclaimer
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

I had tried chmod 777 /etc/postfix/disclaimer
chown nobody /var/spool/filter
chown nobody:mail /etc/postfix/disclaimer
etc


Does anyone have a clue?

Thanks in advance,

Simjith
 
Old 10-12-2008, 01:51 AM   #2
billymayday
LQ Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
can you please post

ls -lZ /etc/postfix
 
Old 10-12-2008, 02:22 AM   #3
simjith
LQ Newbie
 
Registered: Oct 2008
Posts: 7

Original Poster
Rep: Reputation: 0
Hai Billy,
Thanks for your response and here is the output of
ls -lZ /etc/postfix
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
-rw-r--r-- root root system_u: object_r: postfix_etc_t access
-rw-r--r-- root root system_u: object_r: postfix_etc_t bounce.cf.default
-rw-r--r-- root root system_u: object_r: postfix_etc_t canonical
-rwxr-x--x root filter root: object_r: postfix_etc_t disclaimer
-rw-r--r-- root root root: object_r: postfix_etc_t disclaimer_addresses
-rw-r--r-- root root root: object_r: postfix_etc_t disclaimer.txt
-rw-r--r-- root root system_u: object_r: postfix_etc_t generic
-rw-r--r-- root root system_u: object_r: postfix_etc_t header_checks
-rw-r--r-- root root system_u: object_r: postfix_etc_t LICENSE
-rw-r--r-- root root root: object_r: postfix_etc_t main.cf
-rw-r--r-- root root system_u: object_r: postfix_etc_t main.cf~
-rw-r--r-- root root system_u: object_r: postfix_etc_t main.cf.default
-rw-r--r-- root root system_u: object_r: postfix_etc_t makedefs.out
-rw-r--r-- root root system_u: object_r: postfix_etc_t master.cf
-rw-r--r-- root root system_u: object_r: postfix_etc_t postfix-files
-rwxr-xr-x root root system_u: object_r: postfix_exec_t postfix-script
-rwxr-xr-x root root system_u: object_r: postfix_etc_t post-install
-rw-r--r-- root root system_u: object_r: postfix_etc_t relocated
-rw-r--r-- root root system_u: object_r: postfix_etc_t TLS_LICENSE
-rw-r--r-- root root system_u: object_r: postfix_etc_t transport
-rw-r--r-- root root system_u: object_r: postfix_etc_t virtual

>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
 
Old 10-12-2008, 02:39 AM   #4
billymayday
LQ Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
Let's do a test:

type

setenforce 0 (that's a zero, not capital "o")

to turn SELinux off temporarily, then try sending a mail, and see what the logs say.
 
Old 10-12-2008, 03:01 AM   #5
simjith
LQ Newbie
 
Registered: Oct 2008
Posts: 7

Original Poster
Rep: Reputation: 0
Thanks A lot Billymayday,

Now its working fine

But I think turning SELinux off temporarily, is not a good practice as its related with security

Shall we try any other alternatives ?

Thanks in advance,

Simjith
 
Old 10-12-2008, 03:08 AM   #6
billymayday
LQ Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
Good

Turn it back on (setenforce 1)

Try

restorecon /etc/postfix/*

and see if it works
 
Old 10-12-2008, 03:31 AM   #7
simjith
LQ Newbie
 
Registered: Oct 2008
Posts: 7

Original Poster
Rep: Reputation: 0
Hai Billy,

After Turning it on (setenforce 1)
and running restorecon /etc/postfix/*
its not working, now too its working fine with setenforce 0
Pasting the Log
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
Oct 12 11:25:08 it001 postfix/qmgr[5831]: 09B4750056: removed
Oct 12 11:26:02 it001 sendmail[5863]: m9C8Q2gg005863: from=root, size=57, class=0, nrcpts=1, msgid=<200810120826.m9C8Q2gg005863@localhost.localdomain>, relay=root@localhost
Oct 12 11:26:02 it001 postfix/smtpd[5841]: connect from it001[127.0.0.1]
Oct 12 11:26:02 it001 postfix/smtpd[5841]: B34615005C: client=it001[127.0.0.1]
Oct 12 11:26:02 it001 postfix/cleanup[5844]: B34615005C: message-id=<200810120826.m9C8Q2gg005863@localhost.localdomain>
Oct 12 11:26:02 it001 postfix/qmgr[5831]: B34615005C: from=<root@localhost.localdomain>, size=547, nrcpt=1 (queue active)
Oct 12 11:26:02 it001 pipe[5865]: fatal: pipe_command: execvp /etc/postfix/disclaimer: Permission denied
Oct 12 11:26:02 it001 sendmail[5863]: m9C8Q2gg005863: to=test@test.com, ctladdr=root (0/0), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30057, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (Ok: queued as B34615005C)
Oct 12 11:26:02 it001 postfix/pipe[5833]: B34615005C: to=<test@test.com>, relay=dfilt, delay=0.07, delays=0.06/0/0/0.02, dsn=4.3.0, status=deferred (temporary failure. Command output: pipe: fatal: pipe_command: execvp /etc/postfix/disclaimer: Permission denied )
Oct 12 11:26:02 it001 postfix/smtpd[5841]: disconnect from it001[127.0.0.1]
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

Simjith
 
Old 10-12-2008, 03:43 AM   #8
billymayday
LQ Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
Try

restorecon /var/spool/filter/* (or /var/spool/filter if it's a file)

There should be some selinix messages in the relevant log (not the maillog). For me it's /var/log/audit/audit.log
 
Old 10-12-2008, 03:57 AM   #9
simjith
LQ Newbie
 
Registered: Oct 2008
Posts: 7

Original Poster
Rep: Reputation: 0
Done the same, still the problem persists

pasting the content of

/var/log/messages

>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
Oct 12 11 : 49 : 00 it001 kernel : audit(1223801340.629 : 317) : avc : denied { read } for pid=6155 comm="qmgr" name="[28326]" dev=eventpollfs ino=28326 scontext=root : system_r : postfix_qmgr_t : s0 tcontext=root : system_r : postfix_master_t : s0 tclass=file
Oct 12 11 : 49 : 00 it001 kernel : audit(1223801340.641 : 318) : avc : denied { read } for pid=6156 comm="pickup" name="[28326]" dev=eventpollfs ino=28326 scontext=root : system_r : postfix_pickup_t : s0 tcontext=root : system_r : postfix_master_t : s0 tclass=file
Oct 12 11 : 49 : 33 it001 kernel : audit(1223801373.363 : 319) : avc : denied { read } for pid=6163 comm="smtpd" name="[28326]" dev=eventpollfs ino=28326 scontext=root : system_r : postfix_smtpd_t : s0 tcontext=root : system_r : postfix_master_t : s0 tclass=file
Oct 12 11 : 49 : 33 it001 kernel : audit(1223801373.419 : 320) : avc : denied { read } for pid=6166 comm="cleanup" name="[28326]" dev=eventpollfs ino=28326 scontext=root : system_r : postfix_cleanup_t : s0 tcontext=root : system_r : postfix_master_t : s0 tclass=file
Oct 12 11 : 49 : 33 it001 kernel : audit(1223801373.483 : 321) : avc : denied { read } for pid=6167 comm="pipe" name="[28326]" dev=eventpollfs ino=28326 scontext=root : system_r : postfix_pipe_t : s0 tcontext=root : system_r : postfix_master_t : s0 tclass=file
Oct 12 11 : 49 : 33 it001 kernel : audit(1223801373.495 : 322) : avc : denied { execute } for pid=6168 comm="pipe" name="disclaimer" dev=hdb3 ino=98611 scontext=root : system_r : postfix_pipe_t : s0 tcontext=system_u : object_r : postfix_etc_t : s0 tclass=file
Oct 12 11 : 49 : 33 it001 kernel : audit(1223801373.499 : 323) : avc : denied { read } for pid=6169 comm="bounce" name="[28326]" dev=eventpollfs ino=28326 scontext=root : system_r : postfix_bounce_t : s0 tcontext=root : system_r : postfix_master_t : s0 tclass=file

>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

Simjith
 
Old 10-12-2008, 04:22 AM   #10
billymayday
LQ Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
I'd be thinking about restorecon on the filesystem. The issue probably relates to FC6 being out of date.

If that doesn't work, you may need to make a custom policy.

The other way is to disable selinux for postfix. Check /selinux/booleans, but for me,

setsebool -P postfix_disable_trans 1

would do the trick

Last edited by billymayday; 10-12-2008 at 04:24 AM.
 
Old 10-14-2008, 04:05 AM   #11
simjith
LQ Newbie
 
Registered: Oct 2008
Posts: 7

Original Poster
Rep: Reputation: 0
Hay Billy,

Sorry for late reply.
I had tried to update FC6 twice, but got stuck and shown some errors.

So am choosing the other option

Thanx for your help

Simjith
 
  


Reply



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
postfix + altermime = error with delivery mkiler Linux - Server 2 06-23-2008 12:40 AM
FC6+Postfix+SpamAssassin rdnewman Linux - Software 0 08-19-2007 03:31 PM
Postfix and MySQL in FC6 marcussmit Fedora 3 05-02-2007 05:37 AM
FC6 Postfix can recieve but not send fatum112 Linux - Server 9 04-20-2007 05:52 AM
Postfix and Altermime drumltd Linux - Software 8 08-24-2006 04:13 PM

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

All times are GMT -5. The time now is 08:26 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