[Mimedefang] defang script using chown or chgrp

Jon Rowlan jon.rowlan at sads.com
Mon Apr 28 17:09:56 EDT 2008


Can anyone please tell me is there is any way around the problem of
chown'ing or chgrp'ing a message that is being manipulated by
mimedefang.

I am using a script to copy mail messages into an archive. I would like
to copy selected mails into a Squirrelmail/IMAP Maildir for a range of
users.

When I issue 

system('cp', 'INPUTMSG', "/mailstore/$recipient/$MsgID");

the message gets save correctly but with a user/group of "defang". I
want to chown or chgrp it so that it effectively belongs to or at least
can be read by a user. The Maildir is in the users Home.

I get reported from mimedefang ...

Apr 28 20:28:29 britney mimedefang-multiplexor[28600]: Slave 0 stderr:
chgrp:
Apr 28 20:28:29 britney mimedefang-multiplexor[28600]: Slave 0 stderr:
changing group of `/home/jon/Maildir/new/m3SJSP2k030258'
Apr 28 20:28:29 britney mimedefang-multiplexor[28600]: Slave 0 stderr: :
Operation not permitted

I get a similar error when I chown.

I believe that only root can chown or chgrp for security purposes.

The alternative is to have a cron job as root that performs these tasks.

Many thanks,

jON




More information about the MIMEDefang mailing list