Virtualmin and Procmail - send incoming emails to PHP script -
i'm running centos 7 server virtualmin/webmin , virtual hosts configured. want send emails addressed 1 specific email address hosted on system (belonging 1 virtual host) php script processing. research, assume procmail simplest way this. assume need create .procmailrc file in user's home directory.
however, .procmailrc file not executed. found instructions enabling local .procmailrc files:
go virutalmin -> email messages -> spam , virus scanning , turn on "allow mailbox users create mail filters"
however, can't work. every time try save change, error:
libclamav warning: ************************************************** libclamav warning: *** virus database older 7 days! *** libclamav warning: *** please update possible. *** libclamav warning: ************************************************** error: can't write temporary directory
i don't know directory it's trying write, , second, if try update clamav ("yum update clamav") message: "no packages marked update".
update: after rebooting server, able save setting. however, still doesn't appear local .procmailrc file being executed.
here's .procmailrc file:
default=$home/maildir/ maildir=$home/maildir pmdir=$home/.procmail logfile=$pmdir/log.`date +%y-%m-%d` shell=/bin/sh :0 | /usr/bin/php /home/user/homes/support/mailhandler.php
the mailhandler.php file owned 'user' , has 744 permissions. dumps stdin data log file in same directory, 666 permissions.
first question: using procmail simplest way achieve this? if not, is?
second question: how can local .procmailrc scripts work?
thanks!
Comments
Post a Comment