Reading spam dir with PHP?

Randy Herban rherban at HYPERVINE.NET
Thu Oct 2 21:47:05 IST 2003


You can change the permissions on the queue directory to 755 or some
other variant.  Sendmail might complain some about it but oh well.
I would recommend against using 777 on mqueue just for sanity's sake.
You might also need to change an option in the sendmail config to have
temp files saved with a different mod, i'm not sure offhand though.
I've always been able to chmod 755 /var/spool/mqueue and it works fine.

Do all the reading as normal user and when you need to move the queue
files, use sudo as you suggested.

sudoers:
apache  ALL=NOPASSWD:/bin/mv

Randy

On Thu, 2003-10-02 at 15:37, Max Kipness wrote:
> Hello,
>
> Sorry if I'm off topic. This may be more of a PHP or general linux question.
>
> I'm trying to write a php page that reads the ../spam dir. I'm planning on having the page read each q* file and parse the From:, To: and Subject: lines and then have a button for each message that basically copies the q* and d* files to the sendmail queue.
>
> At this point I'm trying to figure out the best way to get access to that directory structure as user Apache. All of the dir/files under ./var/spool/MailScanner have rw for root only. Is the answer sudo?
>
> Thanks,
> Max



More information about the MailScanner mailing list