typo3 - 在根模板中启用 Powermail Spamshield
问题描述
我是在 TYPO3 中使用后端的新手,我想知道是否有人可以帮助我弄清楚如何从根模板启用 spamshield 功能。因此,当在站点的任何位置创建新的 powermail 表单时,它会受到垃圾邮件保护。
当我查看 Typoscript 对象浏览器时,它显示它的 enable = 1。
我正在使用 TYPO 9.5.22 和 Powermail 7.4.3 我在常量根模板中添加了这个:
plugin.tx_powermail.settings {
#spamshield activated and controlling a factor percentage of 75
spamshield.enable = 1
spamshield.factor = 70
spamshield.email = mail@mail.com
spamshield.emailTemplate = EXT:powermail/Resources/Private/Templates/Mail/SpamNotification.html
spamshield.logfileLocation = typo3temp/logs/powermail_spam.log
spamshield.logTemplate = EXT:powermail/Resources/Private/Templates/Log/SpamNotification.html
#spamshield methods
misc.debugSpamshield = 1
spamshield.methods {
# Honeypot check
1 {
_enable = 1
# Spamcheck name
name = Honey Pot
# Class
class = In2code\Powermail\Domain\Validator\SpamShield\HoneyPodMethod
# if this check failes - add this indication value to indicator (0 disables this check completely)
indication = 5
}
# Link check
2 {
_enable = 1
# Spamcheck name
name = Link check
# Class
class = In2code\Powermail\Domain\Validator\SpamShield\LinkMethod
# if this check failes - add this indication value to indicator (0 disables this check completely)
indication = 3
# method configuration
configuration {
# number of allowed links
linkLimit = 2
}
}
# Name check if name and surname are the same
3 {
_enable = 1
# Spamcheck name
name = Name check
# Class
class = In2code\Powermail\Domain\Validator\SpamShield\NameMethod
# if this check failes - add this indication value to indicator (0 disables this check completely)
indication = 3
}
# Session check: Enabling session check means to store a cookie on form load. If forms are submitted powermail checks for that cookie again. If this check is disabled, powermail will not set a cookie by default.
4 {
_enable = 1
# Spamcheck name
name = Session check
# Class
class = In2code\Powermail\Domain\Validator\SpamShield\SessionMethod
# if this check failes - add this indication value to indicator (0 disables this check completely)
indication = 5
}
# Unique check
5 {
_enable = 1
# Spamcheck name
name = Unique check
# Class
class = In2code\Powermail\Domain\Validator\SpamShield\UniqueMethod
# if this check failes - add this indication value to indicator (0 disables this check completely)
indication = 2
}
# Value blacklist check
6 {
_enable = 1
# Spamcheck name
name = Value blacklist check
# Class
class = In2code\Powermail\Domain\Validator\SpamShield\ValueBlacklistMethod
# if this check failes - add this indication value to indicator (0 disables this check completely)
indication = 7
# method configuration
configuration {
# Blacklisted values (could also get read from a file - simply with FLUIDTEMPLATE)
values = TEXT
values.value = viagra,sex,porn,p0rn,tst,fghwgbys,emailtst
}
}
# IP blacklist check
7 {
_enable = 1
# Spamcheck name
name = IP blacklist check
# Class
class = In2code\Powermail\Domain\Validator\SpamShield\IpBlacklistMethod
# if this check failes - add this indication value to indicator (0 disables this check completely)
indication = 7
# method configuration
configuration {
# Blacklisted values (could also get read from a file - simply with FLUIDTEMPLATE)
values = TEXT
values.value = 123.132.125.123,123.132.125.124
}
}
}
}
我也在表格所附的powermail模板上对此进行了测试,并且它有效。但是当我将此代码放入根模板时,它没有。即使包含列入黑名单的单词或重复项,它也只会发送邮件。是否有我可能需要在设置中添加的设置才能正常工作?先感谢您。
解决方案
推荐阅读
- html - 如何在悬停时更改跨度 ID 文本?(CSS)
- javascript - 表单无效时停止向表单动态添加字段
- python - Python AttributeError:“序列”对象没有属性“序列”
- html - 使用容器流体在引导程序中填充
- sql - Oracle 返回 ORA-00904: 添加外键时出现无效标识符错误
- r - tidyverse:替换字符串中的特殊字符
- amazon-web-services - android中的aws-sdk反应本机设置
- swift - 为什么它在 SwiftUI 中总是说“无法将类型''的值转换为预期的参数类型''”
- fortran - 有没有办法显示我的代码的最后一部分?最后代码行的输出没有出现
- mysql - 在具有不同端口的不同容器上运行 mysql,“建立数据库连接时出错”