服务器问题集锦,包括 Linux(Ubuntu, Centos,Debian等)和Windows Server服务器
我有两个应用程序在同一台服务器上,并使用Apache重写规则redirect: www请求非www http请求https 除了一种情况外,一切正常, 请求www.test2.test.euredirect到https://www.test1.com内容 我怎样才能正确识别它? 在域test1.comconfiguration文件中重写 : ServerName test1.com RewriteCond%{HTTP_HOST} ^ www.test1.com $ [NC] RewriteRule ^(。*)$ https://www.test1.com/ $ 1 [R = 301] RewriteCond%{SERVER_PORT}!^ 443 $ RewriteRule ^。* $ https://%{SERVER_NAME}%{REQUEST_URI} 在域test2.test.euconfiguration文件中重写 : ServerName test2.test.eu RewriteCond%{HTTP_HOST} ^ www.test2.test.eu $ [NC] RewriteRule ^(。*)$ https://www.test2.test.eu/ $ 1 [R = 301] RewriteCond%{SERVER_PORT}!^ 443 $ RewriteRule ^。* $ https://%{SERVER_NAME}%{REQUEST_URI} 任何build议非常赞赏。 […]
设置 Linux,Debian Wheezy,为大约1000个用户提供邮件服务。 Courier和Postfix安装在这个盒子里。 有关服务器的信息 这是一个后置设置,它将电子邮件放到/home/vmail/$domain/$user下的邮箱 – 这部分工作正常。 我打算做什么: 我想实现,当一个电子邮件通过服务器发送一个脚本( /home/vmail/mail_logger.sh )被触发,以便我可以login和采取行动。 为什么? 如果这样的帐户遭到黑客攻击,并且有人开始通过系统发送垃圾邮件,我希望对帐户实施放缓/禁用操作。 现在,我正在轮换日志文件,并提取哪些用户发送了一段时间内的电子邮件,并locking了每小时发送超过x封电子邮件(可configuration)的帐户。 这个日志旋转的实现并不好,所以我认为每次通过smtps发送一个邮件时都会触发一个hock可能是好事(现在只允许用户使用smtps,而不是smtp)。 我发现这本手册 ,它给了我一些想法如何实现不同的交付方式(smtp,smtpd,皮卡)的“hocks” 在main.cf中,我添加了以下几行 hooksmtp unix – nn – – pipe flags=F user=vmail argv=/home/vmail/mail_logger.sh ${sender} ${size} ${recipient} smtp hooksmtps unix – nn – – pipe flags=F user=vmail argv=/home/vmail/mail_logger.sh ${sender} ${size} ${recipient} smtps hookpickup unix – nn – – pipe flags=F […]
我已经在端口25上运行的mail.example.com服务器上使用postfix和dovecot来设置smtp服务器。然后我还使用mail.example.com上的mailin ( http://mailin.io )设置了另一个smtp服务器服务器,但在端口10025上运行。 这mailin的目的是简单地parsing从postfix接收到的电子邮件,并通过webhooksparsing结果作为json。 由于后缀没有apiparsing邮件内容,所以这就是为什么我使用mailin。 在我的/etc/postfix/main.cf我添加这一行: relay_domains = localhost:10025 ## this is the mailin smtp server running on port 10025 我的maillog: [root@mailserver ~]# tail -f /var/log/maillog Dec 17 04:36:07 mailserver postfix/smtpd[6858]: connect from localhost[127.0.0.1] Dec 17 04:36:07 mailserver postfix/smtpd[6858]: 6E2C21848: client=localhost[127.0.0.1] Dec 17 04:36:07 mailserver postfix/cleanup[6868]: 6E2C21848: message-id=<[email protected]> Dec 17 04:36:07 mailserver postfix/qmgr[6386]: 6E2C21848: […]
我们使用Apache2 mod_spamhaus,许多客户被禁止使用“Post”方法。 有没有办法否认mod_spamhaus不断禁止我们的客户做出假阳性或禁止客户只导致他们的ip是在一系列被禁止的ips? spamhaus.wl文件的语法是什么? 这是正确的写ips我们要白名单这样的文件? 例 122.0.0.1 127.0.0.2 N.
如何限制/ 24块的主机节点上每小时的SMTP连接? 例如,我想将其限制为每小时50封电子邮件。 谢谢
我更新我的邮递员安装后,服务器现在拒绝发送消息…我不明白为什么。 (我收到邮件,因为我的邮件帐户在同一台服务器上,但是它们不会发送给列表中的其他成员。) syslog显示以下错误消息 postfix/smtpd[2541]: NOQUEUE: reject: RCPT from localhost[127.0.0.1]: 454 4.7.1 <[email protected]>: Relay access denied; from=<[email protected]> to=<[email protected]> proto=ESMTP helo=<myserver.stratoserver.net> 任何想法如何解决这个问题或我应该看看? 这是postconf -n的输出 alias_database = hash:/etc/aliases alias_maps = hash:/etc/aliases, hash:/var/spool/postfix/plesk/aliases append_dot_mydomain = no biff = no config_directory = /etc/postfix disable_vrfy_command = yes inet_interfaces = all inet_protocols = all mailbox_command = procmail -a "$EXTENSION" mailbox_size_limit = 0 […]
我有一个pfsense-box路由iax-traffic(UDP端口4569)的问题。 我们公司有一个中央办公室和八个分支机构。 在分支机构,我们使用pfsense作为防火墙和VPN端点(openVPN)。 在七个办公室这工作正常,但在一个我有一个问题。 科: 电话networking192.168.74.0/24 星号服务器192.168.74.4 中央办公室: 电话networking192.168.24.0/24 星号服务器192.168.24.4 我在分公司的pfsense: em1 192.168.74.1 ovpnc1 192.168.251.70 em4 93.83.xxx.yyy互联网 networking看起来像 Asterisk-server branch 192.168.74.4 | | 192.168.74.1 pfsense branch – – – Internet 192.168.251.70 ovpnc1 | | 192.168.251.71 router at central 192.168.24.1 | | 192.168.24.4 Asterisk-server central 我需要两个Asterisk服务器之间的iax连接。 Iax使用UDP端口4569.服务器之间的ICMP连接正常工作。 我可以从服务器192.168.24.4,使用NTP(UDP端口123)获得时间。 我可以跟踪路由从一台服务器到另一台使用traceroute -U -p 4569 192.168…. 但我没有得到一个iax连接。 服务器每20秒尝试连接一次。 我可以在分支机构的VPN-Interface上看到来自中心局的数据包,但是他们没有被路由。 […]
我已经将Apache2前端作为反向代理configuration运行多年了。 我无法改变的是后端服务器在短时间内closures后的行为(即重新启动) 在重新检查后端是否回来之前,Apache将继续传送代理错误页面很长一段时间。 我需要手动重新启动每一次,我可以理解用户已经annoyed。 我怎么能告诉Apache不记得“破”代理后端,但每次重试? 如果这是不可能的,我怎样才能configuration时间阿帕奇“caching错误”很短,可以说10秒。 我正在谈论非常简单的标准反向代理configuration或多或less像这样: ProxyPass /site http://10.1.1.8/backend ProxyPassReverse /site http://10.1.1.8/backend
我无法在trunk上添加允许的VLAN,而且端口不是中继。 我试过了: Switch0#configure terminal Enter configuration commands, one per line. End with CNTL/Z. Switch(config)#interface FastEthernet 0/1 Switch(config-if)#switchport trunk encapsulation dot1q Switch(config-if)#switchport mode trunk Switch(config-if)#switchport trunk allowed vlan add 1,2,3 Switch(config-if)#end 但是它仍然表明: Switch#show interface FastEthernet 0/1 trunk Port Mode Encapsulation Status Native vlan Fa0/1 on 802.1q not-trunking 1 Port Vlans allowed on trunk Fa0/1 none Port […]
我正在尝试向Postfix添加规则。 我的目标如下:当任何人([email protected])发送一封电子邮件到([email protected])转发到([email protected])。 如果[email protected]正在发送邮件,只需让它通过。 回顾一下,如果发件人不是[email protected],则将邮件redirect到[email protected]。 如果发件人是[email protected],则不要redirect。 仅供参考,[email protected]是在/ etc / postfix / virtual中定义的别名,它发送给多个收件人。 我正在使用pcre header_checks,但它根本不起作用 – 没有任何事情发生,所有的邮件像以前一样stream动,而不被redirect。 如果有一个更好/更简单的方法来做到这一点,我是所有的耳朵! 所以根据这篇文章和这篇文章中的说明,我将下面几行添加到了main.cf和headers_check: main.cf: header_checks = pcre:/etc/postfix/headers_check /等/后缀/ headers_check /To:[email protected]/ && /From:(?([email protected]).)*/ REDIRECT [email protected] 但是,没有任何反应。 所有邮件仍然被放入[email protected]。 我删除了“发件人”检查,看看是否可以抓取所有发送到[email protected]的邮件并redirect。 然而,这也没有工作。 我跑了 postmap -q "From:[email protected]\nTo:[email protected]" pcre:/etc/postfix/headers_check 并收到回复 && /(?([email protected]).)*/ REDIRECT [email protected] 我也重新启动后缀(后缀重新加载),以确保它已加载configuration。 另外请注意,这是一台拥有大量虚拟主机的机器,每个虚拟主机都有自己的电子邮件地址和别名。 所有的都在/ etc / postfix / virtual中合并。 感谢您有关如何完成此任务的任何build议!