Patrick Lahni wrote:
[snip]
Here is user2's mailfilter:
if ( /^To: [0-9]+@test\.com:h )
{
exception {
log "email accepted!!!"
to "|/path/to/script"
}
}
else
{
exception {
log "email rejected!!!"
EXITCODE=0
exit
}
}
I never see either of these 2 log lines in /var/log/maildroprc.log.
Mail sent to
use...@domain.tld is delivered to its inbox like every other normal
virtual user on the
machine.
Apart from the typo mentioned by Devin, "use...@domain.tld" does not match
^To: [0-9]+@test\.com
[0-9]+ is all digits. it does not contain letters. This however does not
explain why the second log does not appear.
try running maildrop manually with some debug level. for example
maildrop -V 6 -d blahblah < message.eml
run this as the user vmail.
I suggest replacing
if ( `test -r $DEFAULT/mailfilter` == 0 )
{
exception {
log "Including $DEFAULT/mailfilter..."
include "$DEFAULT/mailfilter"
}
...
with
exception {
include "$DEFAULT/mailfilter"
log "Including $DEFAULT/mailfilter..."
}
Any help or insight as to how to try and track down why I cannot
include per-user
mailfilters would be greatly appreciated!