AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / server / 问题

问题[cyrus](server)

Martin Hope
ram khanal
Asked: 2021-02-08 10:08:57 +0800 CST

mysql 未使用 cyrus 进行身份验证以进行后缀身份验证

  • 0

所以我一直在构建一个邮件服务器,我已经设置了 postfix 和一个数据库,现在我想要的是 cyrus 应该从我已经设置了一个数据库的数据库中验证我的邮件服务器用户,现在我遇到了一些问题

yum -y install cyrus-sasl*

我的后缀 -n 看起来像这样

alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
broken_sasl_auth_clients = yes
command_directory = /usr/sbin
config_directory = /etc/postfix
cyrus_sasl_config_path = /etc/sasl2/
daemon_directory = /usr/libexec/postfix
data_directory = /var/lib/postfix
debug_peer_level = 2
debugger_command = PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin ddd $daemon_directory/$process_name $process_id & sleep 5
html_directory = no
inet_interfaces = localhost, 192.168.1.1
inet_protocols = ipv4
local_recipient_maps = mysql:/etc/postfix/mysql-local.cf
mail_owner = postfix
mailq_path = /usr/bin/mailq.postfix
manpage_directory = /usr/share/man
mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain
mydomain = domain.com
myhostname = my.domain.com
myorigin = $mydomain
newaliases_path = /usr/bin/newaliases.postfix
queue_directory = /var/spool/postfix
readme_directory = /usr/share/doc/postfix-2.10.1/README_FILES
sample_directory = /usr/share/doc/postfix-2.10.1/samples
sendmail_path = /usr/sbin/sendmail.postfix
setgid_group = postdrop
smtp_tls_security_level = may
smtpd_sasl_auth_enable = yes
smtpd_sasl_security_options = noanonymous, noplaintext
smtpd_sasl_tls_security_options = noanonymous
smtpd_sasl_type = cyrus
smtpd_tls_auth_only = no
smtpd_tls_cert_file = /etc/postfix/ssl/server.crt
smtpd_tls_key_file = /etc/postfix/ssl/server.key
smtpd_tls_security_level = may
smtpd_use_tls = yes
unknown_local_recipient_reject_code = 550
virtual_alias_maps = mysql:/etc/postfix/mysql-virtual-aliases.cf
virtual_mailbox_domains = mysql:/etc/postfix/mysql-virtual-domains.cf
virtual_mailbox_maps = mysql:/etc/postfix/mysql-virtual-users.cf

我的 postconf -M 看起来像这样

smtp       inet  n       -       n       -       -       smtpd
submission inet  n       -       n       -       -       smtpd 
-o smtpd_sasl_security_options=noanonymous
 -o smtpd_sasl_auth_enable=yes 
-o broken_sasl_auth_clients=yes 
-o smtpd_recipient_restrictions=permit_sasl_authenticated,reject 
-o milter_macro_daemon_name=ORIGINATING
smtps      inet  n       -       n       -       -       smtpd
 -o smtpd_sasl_security_options=noanonymous 
-o smtpd_sasl_auth_enable=yes 
-o broken_sasl_auth_clients=yes 
-o syslog_name=postfix/smtps 
-o smtpd_recipient_restrictions=permit_sasl_authenticated,reject 
-o milter_macro_daemon_name=ORIGINATING
pickup     unix  n       -       n       60      1       pickup
cleanup    unix  n       -       n       -       0       cleanup
qmgr       unix  n       -       n       300     1       qmgr
tlsmgr     unix  -       -       n       1000?   1       tlsmgr
rewrite    unix  -       -       n       -       -       trivial-rewrite
bounce     unix  -       -       n       -       0       bounce
defer      unix  -       -       n       -       0       bounce
trace      unix  -       -       n       -       0       bounce
verify     unix  -       -       n       -       1       verify
flush      unix  n       -       n       1000?   0       flush
proxymap   unix  -       -       n       -       -       proxymap
proxywrite unix  -       -       n       -       1       proxymap
smtp       unix  -       -       n       -       -       smtp
relay      unix  -       -       n       -       -       smtp
showq      unix  n       -       n       -       -       showq
error      unix  -       -       n       -       -       error
retry      unix  -       -       n       -       -       error
discard    unix  -       -       n       -       -       discard
local      unix  -       n       n       -       -       local
virtual    unix  -       n       n       -       -       virtual
lmtp       unix  -       -       n       -       -       lmtp
anvil      unix  -       -       n       -       1       anvil
scache     unix  -       -       n       -       1       scache

}

猫 /etc/sasl2/smtpd.conf

{

pwcheck_method: saslauthd
auxprop_plugin: mysql
mech_list: PLAIN LOGIN
sql_engine: mysql
sql_hostnames: 127.0.0.1, localhost
sql_user: postfix
sql_passwd: password
sql_database: server
sql_select: SELECT password FROM users WHERE email = '%u'

}

现在的问题是当我尝试从 mysql 时,我无法验证数据库的用户

猫 /etc/imapd.conf

configdirectory: /var/lib/imap
partition-default: /var/spool/imap
admins: cyrus
sievedir: /var/lib/imap/sieve
sendmail: /usr/sbin/sendmail
hashimapspool: true
sasl_pwcheck_method: saslauthd
sasl_mech_list: PLAIN LOGIN
allowplaintext: no
defaultdomain: mail
tls_cert_file: /etc/pki/cyrus-imapd/cyrus-imapd.pem
tls_key_file: /etc/pki/cyrus-imapd/cyrus-imapd.pem
tls_ca_file: /etc/pki/tls/certs/ca-bundle.crt
# uncomment this if you're operating in a DSCP environment (RFC-4594)
# qosmarking: af13

猫 /etc/cyrus.conf

# standard standalone server implementation

START {
  # do not delete this entry!
  recover       cmd="ctl_cyrusdb -r"

  # this is only necessary if using idled for IMAP IDLE
  idled         cmd="idled"
}

# UNIX sockets start with a slash and are put into /var/lib/imap/sockets
SERVICES {
  # add or remove based on preferences
  imap          cmd="imapd" listen="imap" prefork=5
  imaps         cmd="imapd -s" listen="imaps" prefork=1
  pop3          cmd="pop3d" listen="pop3" prefork=3
  pop3s         cmd="pop3d -s" listen="pop3s" prefork=1
  sieve         cmd="timsieved" listen="sieve" prefork=0

  # these are only necessary if receiving/exporting usenet via NNTP
#  nntp         cmd="nntpd" listen="nntp" prefork=3
#  nntps                cmd="nntpd -s" listen="nntps" prefork=1

  # at least one LMTP is required for delivery
#  lmtp         cmd="lmtpd" listen="lmtp" prefork=0
  lmtpunix      cmd="lmtpd" listen="/var/lib/imap/socket/lmtp" prefork=1

  # this is only necessary if using notifications
#  notify       cmd="notifyd" listen="/var/lib/imap/socket/notify" proto="udp" prefork=1
}

EVENTS {
  # this is required
  checkpoint    cmd="ctl_cyrusdb -c" period=30

  # this is only necessary if using duplicate delivery suppression,
  # Sieve or NNTP
  delprune      cmd="cyr_expire -E 3" at=0400

  # this is only necessary if caching TLS sessions
  tlsprune      cmd="tls_prune" at=0400
}

所以任何人都可以让我摆脱这个问题谢谢....

linux email postfix sasl cyrus
  • 1 个回答
  • 153 Views
Martin Hope
dcdruck
Asked: 2016-12-28 09:10:17 +0800 CST

如何使用 sieveInstall 为电子邮件中带有点的用户安装筛子

  • 0

我在 StackOverflow 上的成员已经有一段时间了,但这是我在 ServerFault 上的第一篇文章,所以如果我在这篇文章中做错了什么,请随时打电话给我。

TL;DR:使用 Cyrus 和 sendmail。我们有类似firstname.lastname@ourdomain但sieveInstall -i <user> <compiled_sieve>只允许使用字母数字的电子邮件。我不知道如何解决这个问题。

我的公司在 AWS EC2 Linux 服务器上使用 Cyrus (v2.3.16-Fedora-RPM-2.3.16-6.9.amzn1) 和 sendmail。

从历史上看,我们使用firstname@ourdomain电子邮件地址是因为我们很小。然而,我们正在成长并开始firstname.lastname@ourdomain为所有新员工使用。

要进行服务器端邮件过滤,我们使用筛子。我们获取用户定义的过滤规则列表,从这些规则中创建一个筛选器,使用 编译它sievec,然后使用 安装它sieveInstall -i <user> <compiled_sieve>。这一切都由 Perl 脚本自动完成。

我遇到的问题是它sieveInstall不适用于其中包含非字母数字字符(例如点)的电子邮件,因此新员工无法使用我们的服务器端过滤。这对于我们较旧的 firstname@ourdomain 电子邮件非常有效。

文档sieveInstall似乎不存在,也没有手册页。

有谁知道我如何做到这一点?

我也简要调查过,sieveshell但由于某种原因它无法连接到本地主机,可能是因为端口未打开。

sieve cyrus
  • 1 个回答
  • 142 Views
Martin Hope
H. Chen
Asked: 2016-08-02 05:30:00 +0800 CST

Postfix:虚拟用户收不到外部邮件

  • 0

我是后缀的新手。发送电子邮件工作正常,但我无法接收外部电子邮件。ERR:找不到用户。这是我的配置。怎么了?

系统

Centos7.1 x64(Conoha 的镜像)

软件

postfix 3.1.1(自己编译)

make makefiles shared=yes shlib_directory=/usr/local/lib/postfix/3.1.1 dynamicmaps=yes 'CCARGS=-DHAS_MYSQL -I/usr/include/mysql -DUSE_SASL_AUTH -DDEF_SERVER_SASL_TYPE=\"dovecot\" ' 'AUXLIBS_MYSQL=-L/usr/lib64/mysql -lmysqlclient -lz -lm' 

鸽舍 2.2.10 (yum)

赛勒斯-sasl 2.1.26(yum)

赛勒斯-imapd * 2.4.17(百胜)

postfixadmin 2.93(从 sf.net 下载)

MariaDB 10.1.16(百胜)

nginx 1.6.3(百胜)

php (yum,禁用了一些危险功能)

网络

使用 mydomain123.com 而不是真正的域名。

使用 123.123.123.123 代替真实 ip。

专用网络

192.168.0.1 (255.255.248.0)

10.0.0.1 (255.255.248.0)

公共网络

123.123.123.123 (255.255.254.0)(使用 PTR:mydomain.com)

127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4 123-123-123-123
::1         localhost localhost.localdomain localhost6 localhost6.localdomain6 123-123-123-123

主机名 123-123-123-123

开放端口

公共 110/tcp 80/tcp 143/tcp 995/tcp 25/tcp 993/tcp 443/tcp 587/tcp 8025/tcp(后缀管理员)

私人所有

域名&DNS

使用 mydomain123.com 而不是真正的域名。

使用 123.123.123.123 代替真实 ip。

mydomain123.com

@A 123.123.123.123

@MX mail.mydomain123.com

www A 123.123.123.123

邮件 A 123.123.123.123

弹出 A 123.123.123.123

pop3 一个 123.123.123.123

imap A 123.123.123.123

smtp A 123.123.123.123

用户

groupadd -g 5000 vmail

useradd -g vmail -u 5000 -s /sbin/nologin vmail

其他默认。

/etc/postfix/main.cf

compatibility_level = 2
queue_directory = /var/spool/postfix
command_directory = /usr/sbin
daemon_directory = /usr/libexec/postfix
data_directory = /var/lib/postfix
mail_owner = postfix
myhostname = mail.mydomain123.com
mydomain = mydomain123.com
myorigin = $mydomain
inet_interfaces = all
mydestination = $myhostname, localhost.$mydomain, localhost
local_recipient_maps =
unknown_local_recipient_reject_code = 550
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
smtpd_banner = $myhostname ESMTP unknow
debug_peer_level = 2
debugger_command =
     PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin
     ddd $daemon_directory/$process_name $process_id & sleep 5
sendmail_path = /usr/sbin/sendmail
newaliases_path = /usr/bin/newaliases
mailq_path = /usr/bin/mailq
setgid_group = postdrop
html_directory = no
manpage_directory = /usr/local/man
sample_directory = /etc/postfix
readme_directory = no
smtputf8_enable = no
smtpd_sasl_type = dovecot
smtpd_sasl_path = /var/spool/postfix/private/auth
smtpd_sasl_application_name = smtpd
smtpd_sasl_auth_enable = yes
smtpd_sasl_local_domain = $myhostname
broken_sasl_auth_clients = yes
smtpd_recipient_restrictions = permit_mynetworks,permit_sasl_authenticated,reject_unauth_destination,reject_unknown_sender_domain
smtpd_sasl_security_restrictions = permit_mynetworks,permit_sasl_authenticated,reject_unauth_destination
smtpd_client_restrictions = permit_sasl_authenticated
smtpd_sasl_security_options = noanonymous
proxy_read_maps = $local_recipient_maps $mydestination $virtual_alias_maps $virtual_alias_domains $virtual_mailbox_maps $virtual_mailbox_domains $relay_recipient_maps $relay_domains $canonical_maps $sender_canonical_maps $recipient_canonical_maps $relocated_maps $transport_maps $mynetworks $virtual_mailbox_limit_maps
virtual_mailbox_base = /home/vmail/
virtual_mailbox_domains = proxy:mysql:/etc/postfix/sql/mysql_virtual_domains_maps.cf
virtual_alias_maps =
   proxy:mysql:/etc/postfix/sql/mysql_virtual_alias_maps.cf,
   proxy:mysql:/etc/postfix/sql/mysql_virtual_alias_domain_maps.cf,
   proxy:mysql:/etc/postfix/sql/mysql_virtual_alias_domain_catchall_maps.cf
virtual_mailbox_maps =
   proxy:mysql:/etc/postfix/sql/mysql_virtual_mailbox_maps.cf,
   proxy:mysql:/etc/postfix/sql/mysql_virtual_alias_domain_mailbox_maps.cf
virtual_uid_maps = static:5000
virtual_gid_maps = static:5000
virtual_transport = dovecot
dovecot_destination_recipient_limit = 1
meta_directory = /etc/postfix
shlib_directory = /usr/local/lib/postfix/${mail_version}

/etc/postfix/master.cf

smtp      inet  n       -       n       -       -       smtpd
pickup    unix  n       -       n       60      1       pickup
cleanup   unix  n       -       n       -       0       cleanup
qmgr      unix  n       -       n       300     1       qmgr
tlsmgr    unix  -       -       n       1000?   1       tlsmgr
rewrite   unix  -       -       n       -       -       trivial-rewrite
bounce    unix  -       -       n       -       0       bounce
defer     unix  -       -       n       -       0       bounce
trace     unix  -       -       n       -       0       bounce
verify    unix  -       -       n       -       1       verify
flush     unix  n       -       n       1000?   0       flush
proxymap  unix  -       -       n       -       -       proxymap
proxywrite unix -       -       n       -       1       proxymap
smtp      unix  -       -       n       -       -       smtp
relay     unix  -       -       n       -       -       smtp
showq     unix  n       -       n       -       -       showq
error     unix  -       -       n       -       -       error
retry     unix  -       -       n       -       -       error
discard   unix  -       -       n       -       -       discard
local     unix  -       n       n       -       -       local
virtual   unix  -       n       n       -       -       virtual
lmtp      unix  -       -       n       -       -       lmtp
anvil     unix  -       -       n       -       1       anvil
scache    unix  -       -       n       -       1       scache
dovecot   unix  -       n       n       -       -       pipe
  flags=DRhu user=vmail:vmail argv=/usr/libexec/dovecot/dovecot-lda -f ${sender} -d ${recipient}

/etc/postfix/sql/mysql_virtual_alias_maps.cf

user = mymaildb
password = mypassword
hosts = localhost
dbname = mymaildb
query = SELECT goto FROM alias WHERE address='%s' AND active = '1'

/etc/postfix/sql/mysql_virtual_alias_domain_maps.cf

user = mymaildb
password = mypassword
hosts = localhost
dbname = mymaildb
query = SELECT goto FROM alias,alias_domain WHERE alias_domain.alias_domain = '%d' and alias.address = CONCAT('%u', '@', alias_domain.target_domain) AND alias.active = 1 AND alias_domain.active='1'

/etc/postfix/sql/mysql_virtual_alias_domain_catchall_maps.cf

user = mymaildb
password = mypassword
hosts = localhost
dbname = mymaildb
query = SELECT goto FROM alias,alias_domain WHERE alias_domain.alias_domain = '%d' and alias.address = CONCAT('@', alias_domain.target_domain) AND alias.active = 1 AND alias_domain.active='1'

/etc/postfix/sql/mysql_virtual_domains_maps.cf

user = mymaildb
password = mypassword
hosts = localhost
dbname = mymaildb
query = SELECT domain FROM domain WHERE domain='%s' AND active = '1'

/etc/postfix/sql/mysql_virtual_mailbox_maps.cf

user = mymaildb
password = mypassword
hosts = localhost
dbname = mymaildb
query = SELECT maildir FROM mailbox WHERE username='%s' AND active = '1'

/etc/postfix/sql/mysql_virtual_alias_domain_mailbox_maps.cf

user = mymaildb
password = mypassword
hosts = localhost
dbname = mymaildb
query = SELECT maildir FROM mailbox,alias_domain WHERE alias_domain.alias_domain = '%d' and mailbox.username = CONCAT('%u','@',alias_domain.target_domain) AND mailbox.active = 1 AND alias_domain.active='1'

/etc/postfix/sql/mysql_virtual_mailbox_limit_maps.cf

user = mymaildb
password = mypassword
hosts = localhost
dbname = mymaildb
query = SELECT quota FROM mailbox WHERE username='%s' AND active = '1'

/etc/dovecot/dovecot.conf

# 2.2.10: /etc/dovecot/dovecot.conf
# OS: Linux 3.10.0-327.22.2.el7.x86_64 x86_64 CentOS Linux release 7.2.1511 (Core)  
#log_path = /var/log/dovecot.log
#info_log_path = /var/log/dovecot-info.log
protocols = imap pop3

listen = *

!include conf.d/*.conf

passdb {

  driver = sql

  args = /etc/dovecot/dovecot-sql.conf.ext

}

userdb {

  driver = static

  args = uid=5000 gid=5000 home=/home/vmail/%d/%n

}

#debug log

auth_debug_passwords=yes

mail_debug=yes

auth_verbose=yes

auth_verbose_passwords=plain

/etc/dovecot/conf.d/10-auth.conf

disable_plaintext_auth = no
auth_mechanisms = plain login cram-md5
!include auth-system.conf.ext

/etc/dovecot/conf.d/10-ssl.conf

ssl = no

/etc/dovecot/conf.d/10-mail.conf

mail_location = maildir:/home/vmail/%d/%n/Maildir
namespace inbox {
  inbox = yes
}
mbox_write_locks = fcntl

/etc/dovecot/conf.d/10-logging.conf

log_path = /var/log/dovecot.log
info_log_path = /var/log/dovecot-info.log
debug_log_path = /var/log/dovecot-debug.log
plugin {
}

/etc/dovecot/conf.d/10-master.conf

service imap-login {
  inet_listener imap {
    port = 143
  }
  inet_listener imaps {
  }
}
service pop3-login {
  inet_listener pop3 {
    port = 110
  }
  inet_listener pop3s {
  }
}
service lmtp {
  unix_listener lmtp {
  }
}
service imap {
}
service pop3 {
}
service auth {
  unix_listener auth-userdb {
    mode = 0600
    user = vmail
    group = vmail
  }
  unix_listener /var/spool/postfix/private/auth {
    mode = 0666
    user = postfix
  }
}
service auth-worker {
}
service dict {
  unix_listener dict {
  }
}

/etc/dovecot/conf.d/15-lda.conf

postmaster_address = [email protected]
protocol lda {
}

/etc/dovecot/dovecot-sql.conf.ext

driver = mysql
connect = host=localhost dbname=mymaildb user=mymaildb password=mypassword
userdb_warning_disable=yes
#postfixadmin
default_pass_scheme = MD5-CRYPT
password_query = SELECT username AS user,password FROM mailbox WHERE username = '%u' AND active='1'
user_query = SELECT CONCAT('/home/vmail/', maildir) AS home, 5000 AS uid, 5000 AS gid, CONCAT('*:bytes=', quota) as quota_rule FROM mailbox WHERE username = '%u' AND active='1'

postfixadmin config.inc.php

<?php

$CONF['configured'] = true;
$CONF['setup_password'] = 'mypasswordhash';
$CONF['default_language'] = 'en';
$CONF['language_hook'] = '';

$CONF['database_type'] = 'mysqli';
$CONF['database_host'] = 'localhost';
$CONF['database_user'] = 'mymaildb';
$CONF['database_password'] = 'mypassword';
$CONF['database_name'] = 'mymaildb';
$CONF['database_prefix'] = '';
$CONF['database_tables'] = array (
    'admin' => 'admin',
    'alias' => 'alias',
    'alias_domain' => 'alias_domain',
    'config' => 'config',
    'domain' => 'domain',
    'domain_admins' => 'domain_admins',
    'fetchmail' => 'fetchmail',
    'log' => 'log',
    'mailbox' => 'mailbox',
    'vacation' => 'vacation',
    'vacation_notification' => 'vacation_notification',
    'quota' => 'quota',
    'quota2' => 'quota2',
);
$CONF['admin_email'] = '';
$CONF['smtp_server'] = 'localhost';
$CONF['smtp_port'] = '25';
$CONF['encrypt'] = 'dovecot:CRAM-MD5';
$CONF['authlib_default_flavor'] = 'md5raw';
$CONF['dovecotpw'] = "/usr/bin/doveadm pw";
$CONF['password_validation'] = array(
#    '/regular expression/' => '$PALANG key (optional: + parameter)',
    '/.{5}/'                => 'password_too_short 5',      # minimum length 5 characters
    '/([a-zA-Z].*){3}/'     => 'password_no_characters 3',  # must contain at least 3 characters
    '/([0-9].*){2}/'        => 'password_no_digits 2',      # must contain at least 2 digits
);
$CONF['generate_password'] = 'NO';
$CONF['show_password'] = 'NO';
$CONF['page_size'] = '10';
$CONF['default_aliases'] = array (
    'abuse' => '[email protected]',
    'hostmaster' => '[email protected]',
    'postmaster' => '[email protected]',
    'webmaster' => '[email protected]'
);
$CONF['domain_path'] = 'YES';
$CONF['domain_in_mailbox'] = 'NO';
$CONF['maildir_name_hook'] = 'NO';

$CONF['admin_struct_hook']          = '';
$CONF['domain_struct_hook']         = '';
$CONF['alias_struct_hook']          = '';
$CONF['mailbox_struct_hook']        = '';
$CONF['alias_domain_struct_hook']   = '';
$CONF['fetchmail_struct_hook']      = '';
$CONF['aliases'] = '1000';
$CONF['mailboxes'] = '1000';
$CONF['maxquota'] = '1000';
$CONF['domain_quota_default'] = '2048';
$CONF['quota'] = 'YES';
$CONF['domain_quota'] = 'YES';
$CONF['quota_multiplier'] = '1024000';
$CONF['transport'] = 'NO';
$CONF['transport_options'] = array (
    'virtual',  // for virtual accounts
    'local',    // for system accounts
    'relay'     // for backup mx
);
$CONF['transport_default'] = 'virtual';
$CONF['vacation'] = 'NO';
$CONF['vacation_domain'] = 'autoreply.mydomain123.com';
$CONF['vacation_control'] ='YES';
$CONF['vacation_control_admin'] = 'YES';
$CONF['vacation_choice_of_reply'] = array (
   0 => 'reply_once',        // Sends only Once the message during Out of Office
   # considered annoying - only send a reply on every mail if you really need it
   # 1 => 'reply_every_mail',       // Reply on every email
   60*60 *24*7 => 'reply_once_per_week'        // Reply if last autoreply was at least a week ago
);
$CONF['alias_control'] = 'YES';
$CONF['alias_control_admin'] = 'YES';
$CONF['special_alias_control'] = 'NO';
$CONF['alias_goto_limit'] = '0';
$CONF['alias_domain'] = 'YES';
$CONF['backup'] = 'NO';
$CONF['sendmail'] = 'YES';
$CONF['logging'] = 'YES';
$CONF['fetchmail'] = 'NO';
$CONF['fetchmail_extra_options'] = 'NO';
$CONF['show_header_text'] = 'NO';
$CONF['header_text'] = ':: Postfix Admin ::';
$CONF['show_footer_text'] = 'YES';
$CONF['footer_text'] = 'Return to mydomain123.com';
$CONF['footer_link'] = 'mydomain123.com';
$CONF['motd_user'] = '';
$CONF['motd_admin'] = '';
$CONF['motd_superadmin'] = '';
$CONF['welcome_text'] = <<<EOM
Hi,
Welcome to your new account.
EOM;
$CONF['emailcheck_resolve_domain']='YES';
$CONF['show_status']='YES';
$CONF['show_status_key']='YES';
$CONF['show_status_text']='&nbsp;&nbsp;';
$CONF['show_undeliverable']='YES';
$CONF['show_undeliverable_color']='tomato';
$CONF['show_undeliverable_exceptions']=array("unixmail.domain.ext","exchangeserver.domain.ext");
$CONF['show_popimap']='YES';
$CONF['show_popimap_color']='darkgrey';
$CONF['show_custom_domains']=array("subdomain.domain.ext","domain2.ext");
$CONF['show_custom_colors']=array("lightgreen","lightblue");
$CONF['recipient_delimiter'] = "";
$CONF['mailbox_postcreation_script'] = '';
$CONF['mailbox_postedit_script'] = '';
$CONF['mailbox_postdeletion_script'] = '';
$CONF['domain_postcreation_script'] = '';
$CONF['domain_postdeletion_script'] = '';
$CONF['create_mailbox_subdirs'] = array();
$CONF['create_mailbox_subdirs_host']='localhost';
$CONF['create_mailbox_subdirs_prefix']='INBOX.';
$CONF['used_quotas'] = 'YES';
$CONF['new_quota_table'] = 'YES';
$CONF['create_mailbox_subdirs_hostoptions'] = array('');
$CONF['theme_logo'] = 'images/logo-default.png';
$CONF['theme_css'] = 'css/default.css';
$CONF['theme_custom_css'] = '';
$CONF['xmlrpc_enabled'] = false;
if (file_exists(dirname(__FILE__) . '/config.local.php')) {
    include(dirname(__FILE__) . '/config.local.php');
}
/* vim: set expandtab softtabstop=4 tabstop=4 shiftwidth=4: */

/var/log/maillog [没有错误]

localhost postfix/smtpd[31623]: 1077ADEA2: client=unknown[myip], sasl_method=CRAM-MD5, [email protected]
localhost postfix/smtpd[31623]: disconnect from unknown[myip] ehlo=1 auth=1 mail=1 rcpt=1 quit=1 unknown=0/1 commands=5/6

/var/log/dovecot.log [发送电子邮件时没有错误,但是...]

auth: Fatal: master: service(auth): child 30172 killed with signal 11 (core dumped)
lda: Error: userdb lookup([email protected]): Disconnected unexpectedly
lda: Fatal: Internal error occurred. Refer to server log for more information.
auth: Fatal: master: service(auth): child 30757 killed with signal 11 (core dumped)
auth: Fatal: master: service(auth): child 30976 killed with signal 11 (core dumped)
lda: Error: userdb lookup([email protected]): Disconnected unexpectedly
08:18:07 lda: Fatal: Internal error occurred. Refer to server log for more information.
lda: Error: userdb lookup([email protected]): Disconnected unexpectedly
lda: Fatal: Internal error occurred. Refer to server log for more information.
auth: Fatal: master: service(auth): child 31229 killed with signal 11 (core dumped)

/var/log/dovecot-info.log [没有错误]

Aug 02 10:22:24 aauth-worker(31671): Info: passwd([email protected],myip): unknown user 
Aug 02 10:22:24 imap-login: Info: Login: user=<[email protected]>, method=CRAM-MD5, rip=myip, lip=123.123.123.123, mpid=31673, session=<my session>

/var/log/dovecot-debug.log [没有错误,BASE64 解码]

auth: Debug: auth client connected (pid=0)
auth: Debug: client in: AUTH    1   CRAM-MD5    service=smtp    nologin lip=123.123.123.123 rip=myip
auth: Debug: client passdb out: CONT    1   <[email protected]>
auth: Debug: client in: CONT    1   [email protected] [some hash..] (previous base64 data may contain sensitive data)
auth: Debug: password([email protected],myip): passdb doesn't support credential lookups
auth-worker(31687): Debug: Loading modules from directory: /usr/lib64/dovecot/auth
auth-worker(31687): Debug: Module loaded: /usr/lib64/dovecot/auth/libdriver_mysql.so
auth-worker(31687): Debug: Module loaded: /usr/lib64/dovecot/auth/libdriver_sqlite.so
auth-worker(31687): Debug: sql([email protected],myip): query: SELECT username AS user,password FROM mailbox WHERE username = '[email protected]' AND active='1'
auth: Debug: password([email protected],myip): Credentials: [some hash]
auth: Debug: client passdb out: OK  1   [email protected]

SQL 日志 [没有错误,但没有查询邮箱。为什么???]

 /usr/sbin/mysqld, Version: 10.1.16-MariaDB (MariaDB Server). started with:
    Tcp port: 0  Unix socket: (null)
    Time                 Id Command    Argument
            2 Connect   mymaildb@localhost as anonymous on mymaildb
                2 Query SELECT username AS user,password FROM mailbox WHERE username = '[email protected]' AND active='1'
                3 Connect   mymaildb@localhost as anonymous on mymaildb
                3 Query SELECT goto FROM alias WHERE address='mydomain123.com' AND active = '1'
                4 Connect   mymaildb@localhost as anonymous on mymaildb
                4 Query SELECT domain FROM domain WHERE domain='mydomain123.com' AND active = '1'
                3 Query SELECT goto FROM alias WHERE address='[email protected]' AND active = '1'
                3 Query SELECT goto FROM alias WHERE address='[email protected]' AND active = '1'

SQL 日志(发给 root 的 OK 电子邮件)

5 Connect   mymaildb@localhost as anonymous on mymaildb
            5 Query SELECT goto FROM alias WHERE address='mydomain123.com' AND active = '1'
            6 Connect   mymaildb@localhost as anonymous on mymaildb
            6 Query SELECT domain FROM domain WHERE domain='mydomain123.com' AND active = '1'
            7 Connect   mymaildb@localhost as anonymous on mymaildb
            7 Query SELECT username AS user,password FROM mailbox WHERE username = '[email protected]' AND active='1'
            7 Quit  

            5 Query SELECT goto FROM alias WHERE address='root@localhost' AND active = '1'
            8 Connect   mymaildb@localhost as anonymous on mymaildb
            8 Query SELECT goto FROM alias,alias_domain WHERE alias_domain.alias_domain = 'localhost' and alias.address = CONCAT('root', '@', alias_domain.target_domain) AND alias.active = 1 AND alias_domain.active='1'
            9 Connect   mymaildb@localhost as anonymous on mymaildb
            9 Query SELECT goto FROM alias,alias_domain WHERE alias_domain.alias_domain = 'localhost' and alias.address = CONCAT('@', alias_domain.target_domain) AND alias.active = 1 AND alias_domain.active='1'
            5 Query SELECT goto FROM alias WHERE address='root' AND active = '1'
            5 Query SELECT goto FROM alias WHERE address='@localhost' AND active = '1'
            9 Query SELECT goto FROM alias,alias_domain WHERE alias_domain.alias_domain = 'localhost' and alias.address = CONCAT('@', alias_domain.target_domain) AND alias.active = 1 AND alias_domain.active='1'
            5 Query SELECT goto FROM alias WHERE address='localhost' AND active = '1'
            6 Query SELECT domain FROM domain WHERE domain='localhost' AND active = '1'

            8 Quit  
            6 Quit  
            9 Quit  
            5 Quit  
email smtp postfix dovecot cyrus
  • 1 个回答
  • 1104 Views
Martin Hope
Mark
Asked: 2012-07-04 09:13:28 +0800 CST

cyrus-imap SSL 错误

  • 1

我们最近推出了一个网站,几天前 mail.log 文件开始快速增长(每天 2GB)。我刚刚查看了日志文件,下面的行重复了数千次:

Jul  3 17:00:23 ubuntu cyrus/imaps[6138]: Fatal error: imaps: required OpenSSL options not present
Jul  3 17:00:23 ubuntu cyrus/master[9410]: process 6138 exited, status 75
Jul  3 17:00:23 ubuntu cyrus/master[9410]: service imaps pid 6138 in READY state: terminated abnormally
Jul  3 17:00:23 ubuntu cyrus/master[6139]: about to exec /usr/lib/cyrus/bin/imapd
Jul  3 17:00:23 ubuntu cyrus/imaps[6139]: executed
Jul  3 17:00:23 ubuntu cyrus/imaps[6139]: imaps: required OpenSSL options not present

我不是系统管理员专家,电子邮件已设置为朋友。在我们有时间深入研究之前,是否有快速解决方法?

email openssl cyrus
  • 1 个回答
  • 2315 Views
Martin Hope
please delete me
Asked: 2012-05-15 11:59:16 +0800 CST

我如何设置 exim4 以将电子邮件发送到我的 cyrus (sasl) 并将它们的副本转发到 gmail?

  • 1

目前,exim4 将我域中的所有电子邮件转发到我的 gmail 帐户。(还有我兄弟的帐户。)使用拆分配置,(/etc/exim4/conf.d/routers/350_exim4-config_vdom_aliases) 使用 (domains = dsearch;/etc/exim4/virtual),其中我有一个数字文件,每个域/子域一个,内容为 (* : [email protected])。(它实际上符号链接到一个包含这些内容的文件。)现在,我安装了 Cyrus 和 Squirrelmail,我想在本地托管我的电子邮件,但仍将电子邮件的副本转发到 gmail。

我如何设置 exim4 以将电子邮件发送到我的 cyrus (sasl) 并将它们的副本转发到 gmail?

debian exim cyrus
  • 1 个回答
  • 673 Views
Martin Hope
Nick
Asked: 2010-04-18 13:11:23 +0800 CST

如何在 cyrus 中使用后缀别名?

  • 1

我有一个名为 user/nrahl 的 cyrus 邮箱。如果我从服务器本身使用“邮件”命令,然后键入:

mail nrahl

要发送消息,消息会神奇地出现在我的 Thunderbird IMAP 收件箱中。但是我需要将来自 POP3 帐户的消息发送到 Cyrus 以进行传递,并且传入的消息会发送到“[email protected]”。

我已经设置并运行了 fetchmail,它正在从 POP3 帐户下载邮件,并将它们传递到 Postfix。Postfix(现在我已经在 /etc/alias 中设置了别名)正在接受消息,并将其传递给 Cyrus 套接字。



但问题是:Cyrus 拒绝了带有 550 - 邮箱未知错误的消息。



/var/log/mail.log 中的实际消息是:

Apr 17 16:56:57 IMAP cyrus/lmtpunix[5640]: verify_user(user.fetchmail) failed: 邮箱不存在
Apr 17 16:56:57 IMAP postfix/lmtp[5561]: CFFD61556BD: to=, relay=localhost[/var/run/cyrus/socket/lmtp], delay=0.08, delays=0.07/0/0/0.01, dsn=5.1.1, status=bounced (host localhost[/var/run/cyrus/socket/lmtp] said: 550-Mailbox unknown. 要么没有与这个 550-name 关联的邮箱,要么你没有权限查看550 5.1.1 用户未知(回复 RCPT TO 命令))



看起来它正在尝试将 nrahl 的所有邮件转发到 postfix@localhost,而不是 nrahl@localhost,我不知道为什么。我需要它将发往 [email protected] 的邮件转发到 Cyrus 的“nrahl”邮箱。

email postfix cyrus
  • 1 个回答
  • 1896 Views
Martin Hope
Nick
Asked: 2010-04-16 15:40:03 +0800 CST

Cyrus:如何配置 saslauthd 进行身份验证?

  • 1

我正在尝试让 Cyrus IMAP(Ubuntu 9.04 上的 v 2.2)设置和工作,但我在让登录正常工作时遇到了一些麻烦。



我为我的测试用户“nrahl”创建了一个邮箱:

cm user/nrahl

然后创建了一个密码:

$ saslpasswd2 nrahl



我正在尝试使用 Thunderbird 连接到邮箱。我使用机器的 LAN IP 地址作为主机,并使用“nrahl”作为用户名。它连接到服务器并提示我输入密码。当我输入它时,我得到“登录服务器失败”。在 Thunderbird 中,/var/log/mail.log 显示:

4 月 15 日 19:20:01 IMAP cyrus/imap[1930]:接受连接
Apr 15 19:20:09 IMAP cyrus/imap[1930]: badlogin: [192.168.5.21] plaintext nrahl SASL(-13): authentication failure: checkpass failed



/etc/imapd.conf 的一部分已删除注释:

sieveusehomedir: 假
sievedir: /var/spool/sieve
#mailnotifier:和风
#sievenotifier:和风
#dracinterval:0
#drahost:本地主机
hashmapspool: 真
允许明文:是
sasl_mech_list:平原
#allowapop:没有
#sasl_maximum_layer:256
#loginrealms:example.com
#virtdomains:用户标识
#默认域:
sasl_pwcheck_method:saslauthd
#sasl_auxprop_plugin: sasldb
sasl_auto_transition:没有

更新:

设置时:

sasl_pwcheck_method: alwaystrue

在 /etc/imapd.conf 中,登录正常工作。所以我假设这个问题与 saslauthd 有关。

ubuntu imap saslauthd cyrus
  • 2 个回答
  • 7053 Views
Martin Hope
Nick
Asked: 2010-04-16 13:45:33 +0800 CST

Cyrus IMAP:无法连接到远程主机:连接被拒绝

  • 2

我正在 Ubuntu Server 9.04 上设置 Cyrus 2.2 IMAP 服务器。

如果我从服务器本身远程登录:

# telnet localhost imap

我得到:

* OK IMAP Cyrus IMAP4 v2.2.13-Debian-2.2.13-14ubuntu3 server ready

这是我应该看到的。如果我从网络上的另一台机器上尝试:

telnet 192.168.5.122 imap

我得到:

telnet: Unable to connect to remote host: Connection refused

更新:来自 /etc/cyrus.conf

# add or remove based on preferences
imap            cmd="imapd -U 30" listen="imap" prefork=0 maxchild=100
imaps           cmd="imapd -s -U 30" listen="imaps" prefork=0 maxchild=100
#pop3           cmd="pop3d -U 30" listen="pop3" prefork=0 maxchild=50
#pop3s          cmd="pop3d -s -U 30" listen="pop3s" prefork=0 maxchild=50
#nntp           cmd="nntpd -U 30" listen="nntp" prefork=0 maxchild=100
#nntps          cmd="nntpd -s -U 30" listen="nntps" prefork=0 maxchild=100

据我所知,盒子上没有运行防火墙。我尝试重新启动 saslauthd 和 cyrus2.2 守护程序,但没有任何效果。

我还能尝试什么?

ubuntu imap telnet cyrus
  • 3 个回答
  • 3299 Views
Martin Hope
Steve
Asked: 2010-01-10 11:55:35 +0800 CST

如何在 cyrus-imap 文件夹上运行 sieve?

  • 1

我有一个筛子脚本,我想在我的 cyrus imap 设置中的一个文件夹上运行它。该脚本已经可以很好地处理新收到的邮件,但我也必须在旧邮件存档上运行它。

有没有简单的方法可以做到这一点?还是一种简单的方法来“重新传递”邮件而不添加额外的标题?

email imap sieve cyrus
  • 1 个回答
  • 528 Views

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    新安装后 postgres 的默认超级用户用户名/密码是什么?

    • 5 个回答
  • Marko Smith

    SFTP 使用什么端口?

    • 6 个回答
  • Marko Smith

    命令行列出 Windows Active Directory 组中的用户?

    • 9 个回答
  • Marko Smith

    什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同?

    • 3 个回答
  • Marko Smith

    如何确定bash变量是否为空?

    • 15 个回答
  • Martin Hope
    Tom Feiner 如何按大小对 du -h 输出进行排序 2009-02-26 05:42:42 +0800 CST
  • Martin Hope
    Noah Goodrich 什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同? 2009-05-19 18:24:42 +0800 CST
  • Martin Hope
    Brent 如何确定bash变量是否为空? 2009-05-13 09:54:48 +0800 CST
  • Martin Hope
    cletus 您如何找到在 Windows 中打开文件的进程? 2009-05-01 16:47:16 +0800 CST

热门标签

linux nginx windows networking ubuntu domain-name-system amazon-web-services active-directory apache-2.4 ssh

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve