Forcing Queue as Apache
Jim Holland
mailscanner at MANGO.ZW
Tue Jun 14 22:11:07 IST 2005
[ The following text is in the "ISO-8859-1" character set. ]
[ Your display is set for the "US-ASCII" character set. ]
[ Some characters may be displayed incorrectly. ]
Hi
On Tue, 14 Jun 2005, Max Kipness wrote:
> I^Òve been unable to figure out the best method to force email through the
> queue as user apache.
>
> I^Òve created a web page that lists emails from the
> /var/spool/Mailscanner/^Å/^Å/spam dir. To release an email, I simply have
> some PHP code that copies the email to the /var/spool/mqueue dir. After
> altering permissions in MailScanner.conf, this is not a problem. If I just
> wait for the next queue interval (default 30 min), everything is fine.
> However, I^Òd like the email to deliver immediately, so I have the PHP
> script executing the following command:
>
> $send = `/usr/sbin/sendmail ^ÖqI$messageid`;
>
> This causes permissions problems.
A possible compromise that avoids giving any additional permissions to
apache would be for the script to dump the quarantined mail into a
temporary holding queue, and then for a root cron job to check the
contents once a minute and if it finds mail in the holding queue it could
move it into the mail queue and process that particular message. You
could even have a script that checks every few seconds if you wanted to
minimise the delay.
Regards
Jim Holland
System Administrator
MANGO - Zimbabwe's non-profit e-mail service
------------------------ MailScanner list ------------------------
To unsubscribe, email jiscmail at jiscmail.ac.uk with the words:
'leave mailscanner' in the body of the email.
Before posting, read the Wiki (http://wiki.mailscanner.info/) and
the archives (http://www.jiscmail.ac.uk/lists/mailscanner.html).
Support MailScanner development - buy the book off the website!
More information about the MailScanner
mailing list