body_checks参数中有一个拒绝规则,写成这样: /(\d{3,4},\d{2} EUR)/ REJECT Body Spam Rule 934 这个正则expression式参数应该没问题,至less根据一些可以testing正则expression式的testing页面,例如在这个页面上。 所以,我对这句话进行了testing Sie haben eine Zahlung über 156,36 EUR 但是,当我用包含上述句子的真实电子邮件进行testing时,电子邮件不会被拒绝。 Postfix已启用标题和正文检查。 其他非正则expression式规则工作正常。 将filter添加到body_checks后,我也重新加载了postfix服务。 任何想法为什么?
我正在尝试为maillog文件中失败的Dovecot条目创build一个正则expression式filter。 我创造的是: .*dovecot: auth: sql\(.*,<HOST>\): Password mismatch maillog中的目标线是: Dec 9 15:09:51 hawk888 dovecot: auth: sql([email protected],166.175.59.157): Password mismatch 另外,当我把这个variables放在一个failregex中时,是否区分大小写? 谁能帮忙?
我正在得到我的正则expression式的麻烦,不知道它是什么问题。 它是用orls/f而不是orls/f?p=4550来返回一个URi。 当我通过https://secure.toto02.com/orls/myservice/f?p=4550 我的conf文件在下面 location ~ "^/([a-zA-Z]+)/myservice/(.+)$" { error_log /var/log/nginx/error-server.log notice; rewrite_log on; #proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; proxy_pass http://192.168.3.45:8080/orls/$2; proxy_redirect http://192.168.3.45:8080/orls/ https://secure.toto02.com/$1/myservice/ ; } 谁能帮忙?
创build多个位置的正则expression式捕获。 树结构: /home/user/webapps/ ├── index.html <= content: root. ├── osqa │ ├── index.html <= content: osqa test A. │ ├── osqa <= django project │ │ ├── index.html <= content: osqa test B. │ │ └── osqa │ │ ├── settings.py │ │ └── wsgi.py │ ├── run │ └── static └── forum ├── index.html […]
我想为网页上的每个链接注入“项目名称”。 例如:链接和网站http:// localhost / osqa /正在工作,但是当我在osqa页面上时,所有链接都直接指向本地主机http:// localhost / account / signin / – 被破坏… 所以我想重写/redirect所有链接指向项目名称位置,如http:// localhost / osqa / account / signin / 有没有可能,如果是的话怎么做? 现在我正在学习重写和try_files。 这是我的项目树结构,项目名称是(osqa,forum,other_project,another_project): /home/user/webapps/ ├── osqa │ ├── osqa │ ├── media │ └── static ├── forum │ ├── forum │ ├── media │ └── static ├── other_project │ ├── other_project │ […]
我正试图将这两个Nginx位置定义合并为一个 location /v1/login { proxy_pass http://upstream/v1/login; proxy_redirect off; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_pass_header Authorization; } location /v1/logout { proxy_pass http://upstream/v1/logout; proxy_redirect off; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_pass_header Authorization; } 所以我想这样的事情应该做的工作 location ^~ /v1/(login|logout) { rewrite ^/v1/(.*)$ /v1/$1 break; proxy_pass http://upstream; proxy_redirect off; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; } 但是对于我的生活,我无法实现它的工作。 我在这里做错了什么? […]
Ubuntu 14.x. 使用grep来search所有文件linuxtest-client2 。 这包括多个文件扩展名(csr,crt,key)。 当我grep的中间部分的文件名“2”,它也返回包含“2”除了“2”的行。 当使用ls -l。 这会导致返回文件大小,date和时间中具有“2”的结果。 为什么文件大小在这个grep后面没有句点的时候触发? root@ip-10-198-0-205:/etc/easy-rsa# ls -ltr keys/ | grep -E '*2.*' total 228 -rw——- 1 root root 3272 Oct 15 18:28 ca.key -rw-r–r– 1 root root 2451 Oct 15 18:28 ca.crt -rw——- 1 root root 3268 Oct 15 18:31 server.key -rw-r–r– 1 root root 769 Oct 15 18:42 […]
我正在运行命令: ps -ef | grep [p]ts/1 ps -ef | grep [p]ts/1 结果是: root 13820 1733 0 14:19 ? 00:00:00 sshd: root@pts/1 root 13822 13820 0 14:19 pts/1 00:00:00 -bash root 15847 13822 0 15:32 pts/1 00:00:00 ps -ef root 15848 13822 0 15:32 pts/1 00:00:00 grep [p]ts/1 为什么它返回grep和ps ? PS单引号和双引号给了我相同的结果。 我能够使用grep -v grep工作得到没有“grep”的输出,但我想用更优雅的方式。
我发现很多邮件中包含了这样的垃圾邮件: List-Unsubscribe: <http://blablabla.eu/ru/unsubscribe/do?hash=78943759789437589> 到目前为止,我想REJECT包含列表中的所有电子邮件: ru/unsubscribe/do?hash=订阅: ru/unsubscribe/do?hash= 是这样的:/ /^List-Unsubscribe:.*ru/unsubscribe/do?hash=/ REJECT :.* /^List-Unsubscribe:.*ru/unsubscribe/do?hash=/ REJECT
我尝试使用以下命令来抑制包含string“DST = 192.168.1”或“DST = 192.168.2”的某些行输出 tail /var/log/messages | egrep -v -e 'DST=(192\.168\.1\.1)|DST=(192\.168\.2\.1)' 我的正则expression式不起作用,有人可以给我一个工作吗?