==== 必填信息。没有填写将不予回复 ====
- iRedMail 版本号:iRedMail-0.9.0
- 使用哪个数据库存储用户帐号: MySQL:
- 使用的 Linux/BSD 发行版名称及版本号:centos 6.5
- 与您的问题相关的日志信息:
====

为什么升级到RedMail-0.9.0(重新安装)了以后,
网页时不时完全不显示(显示为空白页),需要再次重启apache以后才能显示网页。

想问一下是什么问题呢,是哪里的设置问题吗?

不好意思,发现错误了,原来是没有激活。

张工,请帮帮我邮箱只能发不能收的问题。

我的服务器有多个域名,一直都能正常收发邮件,设置也没做改变,
今天突然发现有一个域名只能发不能收,其它域名都能正常收发,很是奇怪。

比如我从test@gmail.com发送到我的邮件info@zhuren.com时,服务器的错误日志如下:
Jun  3 17:57:32 www postfix/smtpd[2091]: connect from unknown[183.79.28.107]
Jun  3 17:57:32 www postfix/smtpd[2091]: NOQUEUE: reject: RCPT from unknown[183.79.28.107]: 550 5.7.9 <info@zhuren.com>: Relay access denied; from=<myzz@yahoo.com> to=<info@zhuren.com> proto=SMTP helo=<web100405.mail.kks.yahoo.com>
Jun  3 17:57:32 www postfix/smtpd[2091]: disconnect from unknown[183.79.28.107]




test@gmail.com的收到的退信内容如下:
Hi. This is the qmail-send program at mail1.heteml.com.
I'm afraid I wasn't able to deliver your message to the following addresses.
This is a permanent error; I've given up. Sorry it didn't work out.

<info@zhuren.com>:
121.112.76.59 does not like recipient.
Remote host said: 554 5.7.1 <info@zhuren.com>: Relay access denied Giving up on 121.112.76.59.
.....

ZhangHuangbin 写道:

Apache 不支持为基于主机名的多个虚拟机提供 SSL 支持。参考: http://stackoverflow.com/questions/1193 … apache-ssl


是的,我昨天也放弃了,已经想办法禁用了https.

因为一般apache也会添加多个域名的,
所以我觉得最好在安装iredmail时有是否使用https的选项,
这样对于Apache有多个虚拟机时也不会出现问题。

==== 必填信息。没有填写将不予回复 ====
- iRedMail 版本:
- 使用的 Linux/BSD 发行版名称及版本号:
- 与您的问题相关的日志信息:
==== 我的服务器IP是192.168.1.99,
装完iredmail后输入https://192.168.1.99/mail能正常显示。

但是在 Apache WEB服务器 添加了新的虚拟服务器后,访问https://192.168.1.99/mai就会出现下面错误

错误码: ssl_error_rx_record_too_long


大家有没有遇到过类似的问题,应该如何解决?
网上找了多好解决办法都失败告终,崩溃了。

另外,iredmail有没可能禁用https呢,应该如何进行设置?

谢谢!!

另外还有一问题,想请张大侠指导一下:

有没可能把收到邮件后立即触发PHP,php得到发信邮箱地址并进行处理后,删除此邮件。

iRedMail能实现这样的功能吗?

我的问题解决了,应该是脚本所属用户的问题。

下面是解决办法。
http://iredmail.org/wiki/index.php?titl … l.Script.2

ZhangHuangbin 写道:
syoueiwa 写道:

所有内容只有下面两行而已:

很明显你没有将邮件内容传递给脚本。

是的,
传递时直接就找不到要处理的脚本(/home/sites/test/cron.sh),
因为提示提示找不到这个脚本错误:fatal: pipe_command: execvp /home/sites/test/cron: No such file or directory

但是这个脚本确认是存在的,通过vi /home/sites/test/cron.sh可读可写

是不是我哪里处理不对?

lwydata 写道:

/home/sites/test/cron.sh 有接收 std-in 吗?

我用 php 处理信件没有此问题.


目前我只是做测试而已,]/home/sites/test/cron.sh 的所有内容只有下面两行而已:

#!/bin/sh
/usr/bin/lynx -source http://*******.jp/test.php


可以把你的代码和过程贴出给我看看吗,非常感谢!!

各位技术支持大哥,大家好


有个问题希望能得到帮助。


目的:我想把收到邮件转到了某个程序(/home/sites/test/cron.sh)进行处理,我按照下面的FAQ,进行配置。
http://iredmail.org/wiki/index.php?titl … nal.Script

具体配置如下:
1. 在master.cf增加了下面两句:
external-pipe  unix  -       n       n       -       -       pipe
  flags=DRhu user=vmail:vmail argv=/home/sites/test/cron.sh -f ${sender} -d ${user}@${domain} -m ${extension}

2. 新建/home/sites/test/cron.sh文件,这个文件内容如下:
#!/bin/sh
/usr/bin/lynx -source http://*******.jp/test.php

3. 在数据库vmail的数据表mailbox的transport列修改为:external-pipe



重启postfix后测试收取邮件,出现了fatal: pipe_command: execvp /home/sites/test/cron: No such file or directory的错误。
具体错误日志如下:
Dec 20 18:09:25 ailen postfix/smtpd[17947]: connect from localhost[127.0.0.1]
Dec 20 18:09:25 ailen postfix/trivial-rewrite[17937]: warning: do not list domain ailen.biz in BOTH mydestination and virtual_mailbox_domains
Dec 20 18:09:25 ailen postfix/smtpd[17947]: 1E18F1C0D27: client=localhost[127.0.0.1]
Dec 20 18:09:25 ailen postfix/cleanup[17940]: 1E18F1C0D27: message-id=<808499.91574.qm@web100405.mail.kks.yahoo.com>
Dec 20 18:09:25 ailen postfix/qmgr[17916]: 1E18F1C0D27: from=<sh**wa@yahoo.com>, size=4105, nrcpt=1 (queue active)
Dec 20 18:09:25 ailen pipe[17948]: fatal: pipe_command: execvp /home/sites/test/cron: No such file or directory
Dec 20 18:09:25 ailen postfix/smtpd[17947]: disconnect from localhost[127.0.0.1]
Dec 20 18:09:25 ailen amavis[2773]: (02773-06) Passed CLEAN, LOCAL [183.79.28.107] [219.117.204.168] <sh**wa@yahoo.com> -> <info@ailen.biz>, Message-ID: <808499.91574.qm@web100405.mail.kks.yahoo.com>, mail_id: WF35-hkzWBjQ, Hits: -6.66, size: 3458, queued_as: 1E18F1C0D27, dkim_id=@yahoo.com,sh**wa@yahoo.com, 1575 ms
Dec 20 18:09:25 ailen postfix/pipe[17919]: 1E18F1C0D27: to=<info@ailen.biz>, relay=external-pipe, delay=0.04, delays=0.02/0/0/0.02, dsn=4.3.0, status=deferred (temporary failure. Command output: pipe: fatal: pipe_command: execvp /home/sites/test/cron: No such file or directory )
Dec 20 18:09:25 ailen postfix/smtp[17944]: 6B2FE1C0CDB: to=<info@ailen.biz>, relay=127.0.0.1[127.0.0.1]:10024, delay=1.8, delays=0.18/0/0/1.6, dsn=2.0.0, status=sent (250 2.0.0 from MTA([127.0.0.1]:10025): 250 2.0.0 Ok: queued as 1E18F1C0D27)
Dec 20 18:09:25 ailen postfix/qmgr[17916]: 6B2FE1C0CDB: removed

自已找到解决办法了,跟大家分享一下吧。



发信PHP代码类似如下就可以了。

$old_from = ini_get("sendmail_from");
ini_set("sendmail_from", $this->From);
$params = sprintf("-oi -f %s", $this->From);
@mail($to, $this->EncodeHeader($this->Subject), $body, $header, $params);

使用PHP的发信函数mail()的邮件发现邮件头有些不太合适。
首先邮件头如下:

Delivered-To: zhen@gmail.com
Received: by 10.229.214.67 with SMTP id gz3cs96219qcb;
        Mon, 5 Jul 2010 21:26:22 -0700 (PDT)
Received: by 10.142.187.19 with SMTP id k19mr4536774wff.135.1278390380064;
        Mon, 05 Jul 2010 21:26:20 -0700 (PDT)
Return-Path: <apache@www.syou.com>
Received: from www.syou.com (syou.com [31.120.56.220])
        by mx.google.com with ESMTP id k11si9934667wfa.149.2010.07.05.21.26.18;
        Mon, 05 Jul 2010 21:26:19 -0700 (PDT)
Received-SPF: pass (google.com: domain of apache@www.syou.com designates 31.120.56.220 as permitted sender) client-ip=31.120.56.220;
Authentication-Results: mx.google.com; spf=pass (google.com: domain of apache@www.syou.com designates 31.120.56.220 as permitted sender) smtp.mail=apache@www.syou.com
Received: by www.syou.com (Postfix, from userid 48)
    id 8D9F79E8255; Tue,  6 Jul 2010 13:25:03 +0900 (JST)
X-DKIM: Sendmail DKIM Filter v2.8.3 www.syou.com 8D9F79E8255
To: zhen@gmail.com
Subject: =?UTF-8?B?44GU5rOo5paH44KS44GC44KK44GM44Go44GG44GU44GW44GE44G+44GZ44CC?=
X-PHP-Originating-Script: 501:class-phpmailer.php
Date: Tue, 6 Jul 2010 13:25:03 +0900
From: =?UTF-8?Q?OK_INTERNATIONAL=28=E6=A0=AA=29?= <info@shopup.com>
Message-ID: <4fcd606becaa5cb6da24b6c4b831a5bf@www.shopup.com>
X-Priority: 3
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Content-Type: text/html; charset="UTF-8"
....

上面的邮件我是用我是在mail()函数中设置发信人为 info@shopup.com,收信人为zhen@gmail.com
但信发出去后,发现Return-Path为apache@www.syou.com(www.syou.com是我的服务器hostname),并不是我想要的info@shopup.com

我应该怎么设置使得发出去的信Return-Path和发信人From一致呢?


而且邮送域也不对,我不希望是服务器hostname(www.syou.com),而应该是自动发信用的shopup.com

好晕呀,邮箱设置就是问题多多呀。

斑竹哥哥和各位帮帮看看,拜托了。

13

(8 篇回复,发表在 iRedMail 技术支持)

我刚测了占用端口情况,如下

lsof -i tcp:20209
COMMAND    PID      USER   FD   TYPE DEVICE SIZE NODE NAME
dkim-filt 2329 dkim-milt    3u  IPv4   7388       TCP www.shop889.com:20209 (LISTEN)


dkim-milt 就是dkim-filter吗?
我都关闭了dkim-filter服务,这个20209端口还是被占用

14

(8 篇回复,发表在 iRedMail 技术支持)

没有,我用的是iredmail6.0,后来为了使多域名支持dkim,所以按照http://www.howtoforge.com/set-up-dkim-for-multiple-domains-on-postfix-with-dkim-milter-2.8.x-centos-5.3安装了dkim-milter。

昨天重启了服务器就出现这个问题了。

15

(8 篇回复,发表在 iRedMail 技术支持)

刚检查了日志文件,发现了一堆下面的错误提示:


Jul  6 12:28:34 www dkim-filter[3980]: exited with status 69, restarting
Jul  6 12:28:34 www dkim-filter[28678]: Sendmail DKIM Filter: Unable to bind to port inet:20209@localhost: Address already in use
Jul  6 12:28:34 www dkim-filter[28678]: Sendmail DKIM Filter: Unable to create listening socket on conn inet:20209@localhost
Jul  6 12:28:34 www dkim-filter[28678]: smfi_opensocket() failed

16

(8 篇回复,发表在 iRedMail 技术支持)

我今天早上把超大的maillog删除了,然后又新建了maillog,发现才几个小时maillog就已经达到了246MB

怎么会增长这么快呀,好奇怪呀

17

(8 篇回复,发表在 iRedMail 技术支持)

ZhangHuangbin 写道:

检查 logrotate 设置

是指/etc/logrotate.conf吗,如果是的话,设置如下:



# see "man logrotate" for details
# rotate log files weekly
weekly

# keep 4 weeks worth of backlogs
rotate 4

# create new (empty) log files after rotating old ones
create

# uncomment this if you want your log files compressed
#compress

# RPM packages drop log rotation information into this directory
include /etc/logrotate.d

# no packages own wtmp -- we'll rotate them here
/var/log/wtmp {
    monthly
    minsize 1M
    create 0664 root utmp
    rotate 1
}

# system-specific logs may be also be configured here.

18

(8 篇回复,发表在 iRedMail 技术支持)

今天发现邮件日志文件超大,竟然有12016MB。不过不影响邮件收发。
这正常吗?
我应该怎么查看到底哪里出问题了?
应该怎么样对日志文件减肥或重置呢?


服务器才运行不到一个月,还没怎么正式对外使用。
另外我把灰名单功能policyd取消了。

会不是会是SMTP认证方面出问题了呀?

eddiechen 写道:

你发邮件给 test@gmail.com ,怎么可能呢?

你建立好自己的domain,需要设置dns。

domain和DNS都建好了,

test@gmail.com是我贴上来时手动更改了,实际上都是有效的邮箱的。

内网域名相互之间收发邮件正常,接收外网邮件也正常。
就是往外网发邮件无法发送。
能指点一二,到底是为什么呀?

下面是错误日志:

Jun 25 10:32:12 www dovecot: pop3-login: Login: user=<shou@shopjp.com>, method=PLAIN, rip=231.56.143.174, lip=214.186.231.79
Jun 25 10:32:12 www dovecot: POP3(shou@shopjp.com): Disconnected: Logged out top=0/0, retr=0/0, del=0/3, size=2696
Jun 25 10:32:13 www postfix/smtpd[20879]: connect from unknown[231.56.143.174]
Jun 25 10:32:13 www postfix/smtpd[20879]: NOQUEUE: reject: RCPT from unknown[231.56.143.174]: 554 5.7.1 <test@gmail.com>: Relay access denied; from=<info@hanbai.jp> to=<test@gmail.com> proto=ESMTP helo=<zyh>
Jun 25 10:32:13 www postfix/smtpd[20879]: disconnect from unknown[231.56.143.174]
Jun 25 10:32:13 www dovecot: pop3-login: Login: user=<info@hanbai.jp>, method=PLAIN, rip=231.56.143.174, lip=214.186.231.79
Jun 25 10:32:13 www dovecot: POP3(info@hanbai.jp): Disconnected: Logged out top=0/0, retr=0/0, del=0/2, size=1863




下面是Windows Live Mail 发送时返回错误信息:
无法发送邮件。待发电子邮件 [SMTP] 服务器的验证设置可能不正确。有关解决此问题的帮助,请转到“帮助”,搜索“Windows Live Mail 疑难解答”,然后阅读“我在发送电子邮件时遇到问题”部分。如果需要有关确定正确服务器设置的帮助,请与您的电子邮件服务提供商联系。

被拒绝的电子邮件地址是“test@gmail.com”。

主题 ''
服务器错误: 554
服务器响应: 554 5.7.1 <shou@3u-web.com>: Relay access denied
服务器: 'mail.sho.com'
Windows Live Mail 错误 ID: 0x800CCC79
协议: SMTP
端口: 587
安全(SSL): 否

另外下面是收到退信:



This is the mail system at host mail.shop.com.

I'm sorry to have to inform you that your message could not
be delivered to one or more recipients. It's attached below.

For further assistance, please send mail to postmaster.

If you do so, please include this problem report. You can
delete your own text from the attached returned message.

                   The mail system

<root@www.shop.com>: mail for www.shop.com loops back to myself

下面是日志:

Jun 13 23:47:20 mail postfix/smtpd[3301]: connect from EM114-48-174-159.pool.e-mobile.ne.jp[114.48.174.159]
Jun 13 23:47:20 mail postfix/smtpd[3242]: connect from unknown[209.85.212.48]
Jun 13 23:47:21 mail postfix/smtpd[3301]: 59CB91850001: client=EM114-48-174-159.pool.e-mobile.ne.jp[114.48.174.159], sasl_method=LOGIN, sasl_username=test@shop.com
Jun 13 14:47:21 mail policyd: rcpt=7, greylist=update, host=209.85.212.48 (unknown), from=test@gmail.com, to=test@shop.com, size=0
Jun 13 14:47:21 mail policyd: rcpt=7, throttle_rcpt=update(a), host=209.85.212.48, from=test@gmail.com, to=test@shop.com, count=4/64(2), threshold=4%
Jun 13 23:47:21 mail postfix/smtpd[3242]: 738A51850008: client=unknown[209.85.212.48]
Jun 13 23:47:21 mail postfix/cleanup[3151]: 59CB91850001: message-id=<74BDB0561EBF498DA779CCF7776E6482@zyh>
Jun 13 23:47:21 mail dkim-filter[2644]: 59CB91850001 "DKIM-Signature" header added
Jun 13 23:47:21 mail postfix/qmgr[2174]: 59CB91850001: from=<test@shop.com>, size=1506, nrcpt=1 (queue active)
Jun 13 23:47:21 mail postfix/smtpd[3301]: disconnect from EM114-48-174-159.pool.e-mobile.ne.jp[114.48.174.159]
Jun 13 23:47:21 mail dkim-filter[2644]: cache: 32 queries, 3 hits (9%), 0 expired
Jun 13 23:47:21 mail postfix/cleanup[3309]: 738A51850008: message-id=<AANLkTikUyb0xInEgntg-fA00PMcCO_h5K5OEvENAyN6L@mail.gmail.com>
Jun 13 23:47:21 mail dkim-filter[2644]: 738A51850008 DKIM verification successful
Jun 13 23:47:22 mail postfix/qmgr[2174]: 738A51850008: from=<test@gmail.com>, size=2845, nrcpt=1 (queue active)
Jun 13 23:47:25 mail postfix/smtpd[3320]: connect from mail.shop.com[127.0.0.1]
Jun 13 23:47:25 mail postfix/smtpd[3321]: connect from mail.shop.com[127.0.0.1]
Jun 13 23:47:25 mail postfix/smtpd[3321]: 12D06185000D: client=mail.shop.com[127.0.0.1]
Jun 13 23:47:25 mail postfix/cleanup[3151]: 12D06185000D: message-id=<AANLkTikUyb0xInEgntg-fA00PMcCO_h5K5OEvENAyN6L@mail.gmail.com>
Jun 13 23:47:25 mail postfix/smtpd[3320]: 14BC9185000E: client=mail.shop.com[127.0.0.1]
Jun 13 23:47:25 mail postfix/cleanup[3309]: 14BC9185000E: message-id=<74BDB0561EBF498DA779CCF7776E6482@zyh>
Jun 13 23:47:25 mail dkim-filter[2644]: 12D06185000D DKIM verification successful
Jun 13 23:47:25 mail dkim-filter[2644]: (unknown-jobid) external host mail.shop.com attempted to send as shop.com
Jun 13 23:47:25 mail dkim-filter[2644]: 14BC9185000E DKIM verification successful
Jun 13 23:47:25 mail postfix/qmgr[2174]: 12D06185000D: from=<test@gmail.com>, size=3557, nrcpt=1 (queue active)
Jun 13 23:47:25 mail amavis[2260]: (02260-06) Passed CLEAN, LOCAL [209.85.212.48] [209.85.212.48] <test@gmail.com> -> <test@shop.com>, Message-ID: <AANLkTikUyb0xInEgntg-fA00PMcCO_h5K5OEvENAyN6L@mail.gmail.com>, mail_id: 5ggjuhjQrqKg, Hits: -108.197, size: 3086, queued_as: 12D06185000D, dkim_id=@gmail.com,test@gmail.com, 3037 ms
Jun 13 23:47:25 mail postfix/smtp[3314]: 738A51850008: to=<test@shop.com>, relay=127.0.0.1[127.0.0.1]:10024, delay=3.9, delays=0.85/0.01/0/3, dsn=2.0.0, status=sent (250 2.0.0 Ok, id=02260-06, from MTA([127.0.0.1]:10025): 250 2.0.0 Ok: queued as 12D06185000D)
Jun 13 23:47:25 mail postfix/smtpd[3321]: disconnect from mail.shop.com[127.0.0.1]
Jun 13 23:47:25 mail postfix/qmgr[2174]: 738A51850008: removed
Jun 13 23:47:25 mail postfix/qmgr[2174]: 14BC9185000E: from=<test@shop.com>, size=2475, nrcpt=1 (queue active)
Jun 13 23:47:25 mail amavis[2261]: (02261-05) Passed CLEAN, LOCAL [114.48.174.159] [114.48.174.159] <test@shop.com> -> <www@shop.com>, Message-ID: <74BDB0561EBF498DA779CCF7776E6482@zyh>, mail_id: n3vSLNs8-tBs, Hits: -5.193, size: 1902, queued_as: 14BC9185000E, dkim_id=@shop.com, 3391 ms
Jun 13 23:47:25 mail postfix/smtpd[3320]: disconnect from mail.shop.com[127.0.0.1]
Jun 13 23:47:25 mail postfix/smtp[3155]: 59CB91850001: to=<www@shop.com>, relay=127.0.0.1[127.0.0.1]:10024, delay=4.1, delays=0.66/0/0/3.4, dsn=2.0.0, status=sent (250 2.0.0 Ok, id=02261-05, from MTA([127.0.0.1]:10025): 250 2.0.0 Ok: queued as 14BC9185000E)
Jun 13 23:47:25 mail postfix/qmgr[2174]: 59CB91850001: removed
Jun 13 23:47:25 mail postfix/pipe[3325]: 12D06185000D: to=<test@shop.com>, relay=dovecot, delay=0.17, delays=0.06/0.05/0/0.06, dsn=2.0.0, status=sent (delivered via dovecot service)
Jun 13 23:47:25 mail postfix/qmgr[2174]: 12D06185000D: removed
Jun 13 23:47:25 mail postfix/pipe[3328]: 14BC9185000E: to=<www@shop.com>, relay=dovecot, delay=0.17, delays=0.08/0.03/0/0.06, dsn=2.0.0, status=sent (delivered via dovecot service)
Jun 13 23:47:25 mail postfix/qmgr[2174]: 14BC9185000E: removed

24

(8 篇回复,发表在 iRedMail 技术支持)

ZhangHuangbin 写道:

你需要配置 Amavisd,让它用一个 DKIM 签名支持所有域名。
打开 /etc/amavisd.conf,搜索一下 dkim 就可以知道怎么设置。


谢谢!



另外我也找到了另外的解决方法,把网址贴出来供大家参考一下吧,我试过了,多个域名都成功了。
http://www.howtoforge.com/set-up-dkim-f … centos-5.3

25

(8 篇回复,发表在 iRedMail 技术支持)

按照上面的来做的话,也只是支持一个域名呀。

目前我的问题是如何生成多域名的DKIM呢。

比如:

abc.com
cde.com
efg.com
....