1

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

查询结果:
Not an open relay.
0 seconds - Good on Connection time
2.262 seconds - Good on Transaction time
Reverse DNS FAILED! This is a problem.
Warning - Reverse DNS does not match SMTP Banner

昨天调整了下main.cf
修改
#remove permit_mynetworks, at 20100424 00:40
smtpd_sender_restrictions = reject_sender_login_mismatch, permit_sasl_authenticated, reject_authenticated_sender_login_mismatch, reject_unauthenticated_sender_login_mismatch

#remove permit_mynetworks, at 20100424 00:40
smtpd_helo_restrictions = permit_sasl_authenticated, check_helo_access pcre:/etc/postfix/helo_access.pcre

现在垃圾邮件少了

2

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

Apr 24 00:42:46 mail postfix/smtp[22988]: 6E3A14C33C2: to=<ke-rui007@163.com>, relay=127.0.0.1[127.0.0.1]:10024, delay=0.86, delays=0.12/0.01/0/0.73, dsn=2.0.0, status=sent (250 2.0.0 Ok, id=21182-07, from MTA([127.0.0.1]:10025): 250 2.0.0 Ok: queued as 44C3B4C33D0)
Apr 24 00:42:46 mail postfix/qmgr[22987]: 6E3A14C33C2: removed
Apr 24 00:42:49 mail postfix/smtp[22995]: 44C3B4C33D0: to=<ke-rui007@163.com>, relay=mxnew-b.163.com[220.181.12.93]:25, delay=3.2, delays=0.01/0.01/0.19/3, dsn=2.0.0, status=sent (250 Mail OK queued as mx47,XcCowKA75VMHztFLHE7HAA--.768S2 1272040970)
Apr 24 00:42:49 mail postfix/qmgr[22987]: 44C3B4C33D0: removed

上面的邮箱都不是我的
被人用作relay服务器了,怎么解决?
验证什么都开了

3

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

原来的配置
# Set listen IP/PORT.
$notify_method  = 'smtp:[127.0.0.1]:10025';
$forward_method = 'smtp:[127.0.0.1]:10025';

# Set default action.
$final_virus_destiny      = D_DISCARD;
$final_banned_destiny     = D_PASS;
$final_spam_destiny       = D_PASS;
$final_bad_header_destiny = D_PASS;

4

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

800份左右

5

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

iredmail 0.4
垃圾邮件很多,怎么调整到垃圾邮件配置使其不接收直接删除,现在是都收下了,在标题中表示垃圾邮件

另外,日志中很多类似以下的内容,如何解决:
Apr 23 21:53:12 mail postfix/qmgr[20244]: 7EC214C3412: from=<>, size=3360, nrcpt=1 (queue active)
Apr 23 21:53:12 mail postfix/qmgr[20244]: 832ED4C3420: from=<>, size=9387, nrcpt=1 (queue active)

设置别名即可解决

7

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

分别给hotmail和yahoo提交了表格,2天左右时间他们都处理好了
发送给他们的邮件正常了

步骤还挺复杂我先粗略的写下

基于 rc 0.3.1
用到的plugins 是globaladdressbook

1.表结构调整
-- 表的结构 `contacts`

CREATE TABLE IF NOT EXISTS `contacts` (
  `contact_id` int(10) unsigned NOT NULL auto_increment,
  `changed` datetime NOT NULL default '1000-01-01 00:00:00',
  `del` tinyint(1) NOT NULL default '0',
  `name` varchar(128) NOT NULL,
  `email` varchar(128) NOT NULL,
  `firstname` varchar(128) NOT NULL,
  `surname` varchar(128) NOT NULL,
  `vcard` text,
  `user_id` int(10) unsigned NOT NULL default '0',
  `global_contact` int(1) NOT NULL default '0',
  `firm` varchar(128) default NULL,
  `position` varchar(50) default NULL,
  `p_tel` varchar(30) default NULL,
  `p_fax` varchar(30) default NULL,
  `p_mob` varchar(20) default NULL,
  `p_address` text,
  `w_tel` varchar(20) default NULL,
  `w_fax` varchar(20) default NULL,
  `w_mob` varchar(20) default NULL,
  `w_address` text,
  `notice` text,
  `email2` varchar(128) default NULL,
  `email3` varchar(128) default NULL,
  `email4` varchar(128) default NULL,
  `birth` varchar(10) default NULL,
  PRIMARY KEY  (`contact_id`),
  KEY `user_contacts_index` (`user_id`,`email`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 ;

2.globaladdressbook 插件

-- 语言包增加
zh_CN.inc (UTF8编码)

<?php
/* Author: Philip Weir */

$labels = array();
$labels['globaladdressbook'] = '全局联系人';

$messages = array();

?>

-- 修改 globaladdressbook.php

        public function get_address_book($args)
        {
                if ($args['id'] === $this->abook_id) {
                        $args['instance'] = new rcube_contacts(rcmail::get_instance()->db, $this->user_id);
                        $args['instance']->readonly = $this->readonly;
                        $args['instance']->global = true; #增加标示为全局
                }

3.修改 /var/www/roundcubemail/program/include/rcube_contacts.php

class rcube_contacts extends rcube_addressbook
{
  var $db = null;
  var $db_name = '';
  var $user_id = 0;
  var $filter = null;
  var $result = null;
  var $search_fields;
  var $search_string;
  var $table_cols = array('name', 'email', 'firstname', 'surname', 'global_contact', 'vcard', 'firm', 'position', 'p_tel', 'p_fax', 'p_mob', 'p_address', 'w_tel', 'w_fax', 'w_mob', 'w_address', 'notice', 'email2', 'email3', 'email4', 'birth');

  /** public properties */
  var $primary_key = 'contact_id';
  var $readonly = false;
  var $list_page = 1;
  var $page_size = 10;
  var $ready = false;
  var $global = false;

---------------
 function list_records($cols=null, $subset=0)
...
      $sql_result = $this->db->limitquery(
        "SELECT * FROM ".$this->db_name."
         WHERE  del<>1".
        ($this->global ? " AND global_contact = 1": " AND user_id=?").
        ($this->filter ? " AND (".$this->filter.")" : "") .
        " ORDER BY name",

----------------
  function count()
  {
    // count contacts for this user
    $sql_result = $this->db->query(
      "SELECT COUNT(contact_id) AS rows
       FROM ".$this->db_name."
       WHERE  del<>1".
       ($this->global ? " AND global_contact = 1": " AND user_id=?").
       ($this->filter ? " AND (".$this->filter.")" : ""),
      $this->user_id);

-----------------
  function get_record($id, $assoc=false)
...
    $this->db->query(
      "SELECT * FROM ".$this->db_name."
       WHERE  contact_id=?".
      ($this->global ? " AND global_contact = 1": " AND user_id=?").
      " AND    del<>1",

-----------------
  function update($id, $save_cols)
  {
    $updated = false;
    $write_sql = array();
    foreach ($this->table_cols as $col)
      if (isset($save_cols[$col]))
        $write_sql[] = sprintf("%s=%s", $this->db->quoteIdentifier($col), $this->db->quote($save_cols[$col]));

    if (!empty($write_sql))
    {
      $this->db->query(
        "UPDATE ".$this->db_name."
         SET    changed=".$this->db->now().", ".join(', ', $write_sql)."
         WHERE  contact_id=?".
        ($this->global ? " AND global_contact = 1": " AND user_id=?").
        " AND    del<>1",
        $id,
        $this->user_id);

      $updated = $this->db->affected_rows();
    }

    return $updated;
  }


-----------------
  function delete($ids)
  {
    if (is_array($ids))
      $ids = join(',', $ids);
    $this->db->query(
      "UPDATE ".$this->db_name."
       SET    del=1".
        ($this->global ? " WHERE global_contact = 1": " WHERE user_id=?").
       " AND    contact_id IN (".$ids.")",
      $this->user_id);

    return $this->db->affected_rows();
  }

4.修改 /var/www/roundcubemail/program/steps/addressbook/show.inc

function rcmail_contact_details($attrib)
...
  $a_show_cols = array('name', 'firstname', 'surname', 'global_contact', 'email', 'firm', 'position', 'p_tel', 'p_fax', 'p_mob', 'p_address', 'w_tel', 'w_fax', 'w_mob', 'w_address', 'notice', 'email2', 'email3', 'email4', 'birth');
  $microformats = array('name' => 'fn', 'email' => 'email');

  foreach ($a_show_cols as $col) {
if (($col=='email' || $col=='email2' || $col=='email3' || $col=='email4') && !empty($record[$col])) {
      $value = html::a(array(
        'href' => 'mailto:' . $record[$col],
        'onclick' => sprintf("return %s.command('compose','%s',this)", JS_OBJECT_NAME, JQ($record[$col])),
        'title' => rcube_label('composeto'),
        'class' => $microformats[$col],
      ), Q($record[$col]));
    }
    else if ($col=='global_contact'){
      $value = html::span($microformats[$col], Q($record[$col]==1?'Yes':'No'));
    }
    else if (!empty($record[$col])) {
      $value = html::span($microformats[$col], Q($record[$col]));
    }
    else
      $value = '';
...

5.修改 /var/www/roundcubemail/program/steps/addressbook/edit.inc

function rcmail_contact_editform($attrib)
...
  $out = "$form_start<table>\n\n";

  $a_show_cols = array('name', 'firstname', 'surname', 'global_contact', 'email', 'firm', 'position', 'p_tel', 'p_fax', 'p_mob', 'p_address', 'w_tel', 'w_fax', 'w_mob', 'w_address', 'notice', 'email2', 'email3', 'email4', 'birth');
  foreach ($a_show_cols as $col)
  {
    $attrib['id'] = 'rcmfd_'.$col;
    $value = rcmail_get_edit_field($col, $record[$col], $attrib);
        if($col == "global_contact"){
        $out .= sprintf("<tr><td class=\"title\"><label for=\"%s\">%s</label></td><td>%s</td></tr>\n",
                    $attrib['id'],
                    Q(rcube_label($col)),
                    rcmail_get_edit_field($col, $record[$col], $attrib, 'checkbox'));
        } else if(!$value == "")
        $out .= sprintf("<tr><td class=\"title\"><label for=\"%s\">%s</label></td><td>%s</td></tr>\n",
                    $attrib['id'],
                    Q(rcube_label($col)),
                    $value);
  }

  $out .= "\n</table>$form_end";
...

6.修改 /var/www/roundcubemail/program/steps/addressbook/save.inc

// setup some vars we need
$a_save_cols = array('name', 'firstname', 'surname', 'global_contact', 'email', 'p_tel', 'firm', 'position', 'p_tel', 'p_fax', 'p_mob', 'p_address', 'w_tel', 'w_fax', 'w_mob', 'w_address', 'notice', 'email2', 'email3', 'email4', 'birth');
$a_record = array();

// read POST values into hash array
foreach ($a_save_cols as $col)
{
  $fname = '_'.$col;

if($col == 'global_contact'){
if(isset($_POST[$fname])){
$a_record[$col] = 1;
}else{
$a_record[$col] = 0;
}
}else
  if (isset($_POST[$fname]))
    $a_record[$col] = get_input_value($fname, RCUBE_INPUT_POST);
}

7. 添加 /var/www/roundcubemail/program/localization/zh_CN/labels.inc (UTF8)

$labels['global_contact'] = '全局联系人';
$labels['firm']      = '公司名称';
$labels['position'] = '职务';
$labels['p_tel']   = '电话';
$labels['p_fax']     = '传真';
$labels['p_mob']      = '手机';
$labels['p_address'] = '地址';
$labels['w_tel']   = '工作电话';
$labels['w_fax']     = '工作传真';
$labels['w_mob']      = '工作手机';
$labels['w_address'] = '工作地址';
$labels['notice']   = '备注';
$labels['email2']     = 'E-Mail2';
$labels['email3']     = 'E-Mail3';
$labels['email4']     = 'E-Mail4';
$labels['birth']     = '生日';

8. 修改 /var/www/roundcubemail/plugins/globaladdressbook/config.inc.php
这样全局通讯录的管理权限就可以使用了

$rcmail_config['globaladdressbook_readonly'] = true;
// global address book admin user
// either a single username or an array of usernames
$rcmail_config['globaladdressbook_admin'] = array('user1@youdomain','user2@youdomain');

主要目的:可以生成一张报表,提供通知邮箱已经满或者即将满的用户清理邮箱

基于mysql 的全局我已经自己修改完成,并且投入使用

这个我也在关注

插件有 global address book

但不知怎么使用

12

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

发送到 Hotmail 日志:
Apr 18 13:44:43 mail postfix/smtp[10409]: 093B3173012D: to=<xxx@hotmail.com>, relay=mx1.hotmail.com[65.54.188.94]:25, delay=1.7, delays=0.08/0.01/1.4/0.21, dsn=5.0.0, status=bounced (host mx1.hotmail.com[65.54.188.94] said: 550 OU-002 Mail rejected by Windows Live Hotmail for policy reasons. Reasons for rejection may be related to content with spam-like characteristics or IP/domain reputation problems. If you are not an email/network admin please contact your E-mail/Internet Service Provider for help. Email/network admins, please visit http://postmaster.live.com for email delivery information and support (in reply to MAIL FROM command))

发送到 yahoo.com.cn 日志:
Apr 18 13:44:42 mail postfix/smtp[10404]: CE51417300EA: to=<xxx@yahoo.com.cn>, relay=127.0.0.1[127.0.0.1]:10024, delay=0.29, delays=0.07/0.01/0/0.21, dsn=2.0.0, status=sent (250 2.0.0 Ok, id=04900-19, from MTA([127.0.0.1]:10025): 250 2.0.0 Ok: queued as 093B3173012D)
Apr 18 13:44:42 mail postfix/qmgr[4961]: CE51417300EA: removed

#postqueue -p
(host mta-v1.mail.vip.cnb.yahoo.com[203.209.228.230] refused to talk to me: 421 4.7.1 [TS03] All messages from 203.125.124.67 will be permanently deferred; Retrying will NOT succeed. See http://postmaster.yahoo.com/errors/421-ts03.html)
                                         xxx@yahoo.com.cn

yahoo邮箱没有收到信息,也没有退信

13

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

iRedOS 0.5

收发邮件正常(gmail,sina都正常)

查询了PBL,IP没有列入
现存问题:
1.发送到yahoo的邮件一直在队列中
2.发送到hotmail的邮件直接退回
接收yahoo和hotmail的邮件没有问题

困惑啊
ps:mail和www的服务器ip不同

14

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

第一个问题解决,转:

amavisd-new 不对本地域名过滤方法

本人也曾因为amavisd-new过滤本地域外发的邮件而抓耳挠腮,通过一个多星期的查找资料,才找到了两个合适的方法.
在说方法之前,我先要说明下amavisd.conf中的local_domains*不能做到跳过检测,如果网友质疑,可以拿出方法来囧我.
方法一:
通过submission跳过检测.
这个方法唯一的缺点就是,使用OE或Foxmail等代理软件的用户必须修改smtp默认的端口号(默认是25).
编辑postfix/master.cf
启用submission这个进程,加入认证方式和过滤策略,保存后退出
submission        inet n      -       n       -       -       smtpd
    -o smtpd_etrn_restrictions=reject
    -o smtpd_sasl_auth_enable=yes       
    -o smtpd_client_restrictions=permit_sasl_authenticated,reject
    -o content_filter=smtp-amavis:[127.0.0.1]:10026
这里过滤策略用得是smtp-amavis:[127.0.0.1]:10026
修改amavisd.conf
打开amavisd的监听端口,以后amavisd将监听10024,10025,10026这三个端口
$inet_socket_port = [10024, 10026];
大部分人的配置只是打开了10024,如$inet_socket_port = 10024.
接着添加对10026端口的策略,如果你的配置中已存在对10026端口的策略,请注释掉.
$interface_policy{'10026'} = 'CHECKBYPASS';

$policy_bank{'CHECKBYPASS'} = {  # mail from submission and smtps ports
   bypass_spam_checks_maps   => [1],  # don't spam-check this mail
   bypass_banned_checks_maps => [1],  # don't banned-check this mail
   bypass_header_checks_maps => [1],  # don't header-check this mail 
};
保存后退出
重启postfix和amavisd
netstat -tnlp 看看端口状态
tcp        0      0 0.0.0.0:587                 0.0.0.0:*                   LISTEN      18525/master 
587既是submission的监听端口.
现在设置outlook或foxmail
修改发件设置中smtp端口号为587即可,别忘了在防火墙中放开587.
用本域用户试发一封邮件看看.
amavis[30236]: (30236-16) Passed CLEAN, CHECKBYPASS [222.45.26.224] [222.45.26.224] <hello@bendan.com.cn> -> <duanmingde@yahoo.com.cn>, Message-ID: <200901081436279537084@bendan.com.cn>, mail_id: ALw5YMALJbGF, Hits: -, size: 1605, queued_as: 1FFA8474002, 182 ms
如果出现红色的部分,说明设置成功了,这样,不管是否垃圾邮件都将跳过检测.由于跳过检测,发信的速度会很快,而且对系统的开销小.这是个不错的办法.

第二个方法:
修改@mynetworks.
编辑amavisd.conf
默认为:
@mynetworks = qw( 127.0.0.0/8 [::1] [FE80::]/10 [FEC0::]/10
                  10.0.0.0/8 172.16.0.0/12 192.168.0.0/16 );
加入你要跳过过滤的IP网段
例如:
@mynetworks = qw( 127.0.0.0/8 [::1] [FE80::]/10 [FEC0::]/10
                  10.0.0.0/8 172.16.0.0/12 192.168.0.0/16 222.45.26.0/24 );
同时修改MYNETS策略成如下

$policy_bank{'MYNETS'} = {   # mail originating from @mynetworks
  originating => 1,  # is true in MYNETS by default, but let's make it explicit
  os_fingerprint_method => undef,  # don't query p0f for internal clients
  bypass_spam_checks_maps => [1], # don't spam-check internal mail
  bypass_banned_checks_maps => [1], # don't banned-check internal mail
  bypass_header_checks_maps => [1], # don't header-check internal mail
};
保存后重启amaivsd
以后来自222.45.26.0/24的邮件都跳过检测.
同样会看到如下记录
amavis[15750]: (15750-11) Passed CLEAN, MYNETS LOCAL [222.45.26.132] [222.45.26.132] <world@bendan.com.cn> -> <duanmingde@yahoo.com.cn>, Message-ID: <E9E8D264BCF84E23AD210DC0E9A3C1CF@bendan13e0dfc8ed>, mail_id: VbR2kBqI-F1W, Hits: -, size: 11378, queued_as: E741F1D94001, 450 ms
这种方法也不是万金油,他也只能跳过来自@mynetworks中地址的邮件

两种方法任意选择

15

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

1. a@abc.com 发送到 b@abc.com 邮件有些被认为是垃圾邮件,存放到垃圾邮箱中了
为什么?

2.有很多同事反馈给同事发送邮件都没有收到(使用outlook),查看webmail看到在垃圾邮件中
如何将所有接收的邮件都存放在收件箱中而不放到垃圾箱中,以便使用客户端接收的能都接收到

使用postfixadmin无法查看到每个邮箱目前已经使用的容量及其目前邮件数量

问有什么好的方法解决?