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 / 问题

问题[maildir](server)

Martin Hope
Frotz
Asked: 2021-03-14 14:46:21 +0800 CST

使用 Maildir 让 Alpine 一路运行

  • 0

我正在将 Linux 机器转换为使用~/Maildir/而不是~/mail/. 要求之一是让 Alpine 使用这种新的安排。使用http://www.alpine.x10host.com/alpine/info/maildir.html上的 maildir 补丁,我已经能够让 Alpine 读取来自 的传入邮件~/Maildir,但它仍然无法读取或保存电子邮件那种格式。我能想到的最好的是.pinerc:

folder-collections=~/Maildir/ ~/Maildir/[]

但这只会导致消息以 mbox 格式保存在~/Maildir.

email maildir
  • 1 个回答
  • 405 Views
Martin Hope
Ants0
Asked: 2017-01-10 00:47:44 +0800 CST

邮件已送达但在客户端未显示

  • 1

我有以下邮件服务器设置(dovecot --version = 2.2.13,postfix version=2.11.3-1),用户别名存储在 mariadb 中,并且针对活动目录服务器进行身份验证。一切似乎都很好(别名查找、NTLM 身份验证等 ..),但交付时却没有。邮件似乎在邮箱内正确传递,但没有发送到任何客户端。

==> /var/log/mail.log <==
Jan  9 11:18:51 smail spamd[18014]: spamd: result: . 0 -   ALL_TRUSTED,HTML_MESSAGE scantime=0.1,size=4279,user=debian-spamd,uid=113,required_score=5.0,rhost=localhost,raddr=::1,rport=57414,mid=<[email protected]>,autolearn=ham autolearn_force=no

 ==> /var/log/mail.info <==
 Jan  9 11:18:51 smail spamd[18014]: spamd: result: . 0 - ALL_TRUSTED,HTML_MESSAGE scantime=0.1,size=4279,user=debian-spamd,uid=113,required_score=5.0,rhost=localhost,raddr=::1,rport=57414,mid=<[email protected]>,autolearn=ham autolearn_force=no

 ==> /var/log/mail.log <==
 Jan  9 11:18:51 smail spamd[18013]: prefork: child states: II

 ==> /var/log/mail.info <==
 Jan  9 11:18:51 smail spamd[18013]: prefork: child states: II

 ==> /var/log/mail.log <==
 Jan  9 11:18:51 smail postfix/pipe[1960]: 910D221F870: to=<[email protected]>, relay=spamassassin, delay=0.32, delays=0.08/0/0/0.24, dsn=2.0.0, status=sent (delivered via spamassassin service)

1 月 9 日 11:18:51 smail postfix/qmgr[1864]: 910D221F870: 删除 Jan 9 11:18:51 smail postfix/pickup[1863]: DE51C21F8AC: uid=113 from=

 ==> /var/log/mail.info <==
 Jan  9 11:18:51 smail postfix/pipe[1960]: 910D221F870: to=<[email protected]>, relay=spamassassin, delay=0.32, delays=0.08/0/0/0.24, dsn=2.0.0, status=sent (delivered via spamassassin service)

1 月 9 日 11:18:51 smail postfix/qmgr[1864]: 910D221F870: 删除 Jan 9 11:18:51 smail postfix/pickup[1863]: DE51C21F8AC: uid=113 from=

 ==> /var/log/mail.log <==
 Jan  9 11:18:51 smail postfix/cleanup[1958]: DE51C21F8AC: message- id=<[email protected]>

 ==> /var/log/mail.info <==
 Jan  9 11:18:51 smail postfix/cleanup[1958]: DE51C21F8AC: message-id=<[email protected]>

 ==> /var/log/mail.log <==
 Jan  9 11:18:51 smail postfix/qmgr[1864]: DE51C21F8AC: from=<[email protected]>, size=4738, nrcpt=1 (queue active)

 ==> /var/log/mail.info <==
 Jan  9 11:18:51 smail postfix/qmgr[1864]: DE51C21F8AC: from=<[email protected]>, size=4738, nrcpt=1 (queue active)

  ==> /var/log/mail.log <==
  Jan  9 11:18:52 smail postfix/local[1964]: DE51C21F8AC: to=<[email protected]>, relay=local, delay=0.24, delays=0.15/0/0/0.08, dsn=2.0.0, status=sent (delivered to command: procmail -a "$EXTENSION")

  ==> /var/log/mail.info <==
  Jan  9 11:18:52 smail postfix/local[1964]: DE51C21F8AC: to=<[email protected]>, relay=local, delay=0.24, delays=0.15/0/0/0.08, dsn=2.0.0, status=sent (delivered to command: procmail -a "$EXTENSIO

我检查了 postfix 和 dovecot 中的两个邮件位置,它们似乎匹配:

**postconf -n**
alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
append_dot_mydomain = no
biff = no
config_directory = /etc/postfix
inet_interfaces = all
mailbox_command = procmail -a "$EXTENSION"
mailbox_size_limit = 0
mydestination = $myhostname, localhost.$mydomain, localhost
myhostname = smail.localdomain.lan
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128 192.168.0.0/24
readme_directory = no
recipient_delimiter = +
relayhost =
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
smtpd_recipient_restrictions = permit_sasl_authenticated,        permit_mynetworks, reject_unauth_destination
smtpd_relay_restrictions = permit_mynetworks permit_sasl_authenticated defer_unauth_destination
smtpd_sasl_auth_enable = yes
smtpd_sasl_path = private/auth
smtpd_sasl_type = dovecot
smtpd_tls_auth_only = yes
smtpd_tls_cert_file = /etc/dovecot/dovecot.pem
smtpd_tls_key_file = /etc/dovecot/private/dovecot.pem
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtpd_use_tls = yes
virtual_alias_maps = mysql:/etc/postfix/mysql-virtual-alias-maps.cf
virtual_gid_maps = static:5000
virtual_mailbox_base = /var/mail/
virtual_mailbox_domains = $mydomain
virtual_mailbox_maps = ldap:/etc/postfix/ldap-users.cf
virtual_minimum_uid = 5000
virtual_transport = lmtp:unix:private/dovecot-lmtp
virtual_uid_maps = static:5000

和鸽舍 -n

# 2.2.13: /etc/dovecot/dovecot.conf
# OS: Linux 3.16.0-4-amd64 x86_64 Debian 8.6 ext4
auth_mechanisms = plain ntlm login
auth_use_winbind = yes
mail_location = maildir:/var/mail/%u
mail_privileged_group = vmail
namespace inbox {
inbox = yes
location = 
 mailbox Drafts {
    special_use = \Drafts
 }
 mailbox Junk {
 special_use = \Junk
 }
 mailbox Sent {
 special_use = \Sent
 }
 mailbox "Sent Messages" {
 special_use = \Sent
 }
 mailbox Trash {
 special_use = \Trash
  }
 prefix = 
  }
  passdb {
  args = /etc/dovecot/dovecot-ldap.conf
  driver = ldap
  }
  passdb {
   args = /etc/dovecot/dovecot-sql.conf.ext
   driver = sql
   }
   protocols = imap lmtp
   service auth-worker {
    user = vmail
   }
   service auth {
   unix_listener /var/spool/postfix/private/auth {
   group = postfix
   mode = 0666
   user = postfix
   }
   unix_listener auth-userdb {
   mode = 0666
    user = vmail
    }
   user = root
   }
    service imap-login {
    inet_listener imap {
    port = 0
   }
   }
   service lmtp {
   unix_listener /var/spool/postfix/private/dovecot-lmtp {
   group = postfix
   mode = 0666
   user = postfix
    }
    }
   ssl = required
   ssl_cert = </etc/dovecot/dovecot.pem
   ssl_key = </etc/dovecot/private/dovecot.pem
   userdb {
   args = uid=5000 gid=5000 home=/var/mail/%u
   driver = static
   }

如果有人可以提供提示,我将不胜感激......谢谢

outlook ldap postfix maildir dovecot
  • 1 个回答
  • 1107 Views
Martin Hope
duck degen
Asked: 2016-12-29 07:23:26 +0800 CST

电子邮件服务器迁移后,某些 IMAP 文件夹未显示在 Roundcube 中

  • 1

我正在移动电子邮件服务器,并且有一些带有嵌套 IMAP 文件夹。新服务器使用邮箱安装并基于后缀,就像旧的电子邮件服务器一样。

因此,我复制了电子邮件文件夹的全部内容,保留了时间戳和所有文件,然后将邮件目录移到了新服务器上。

几年前也进行了类似的操作,来自另一个基于 postfix 的电子邮件服务器。

现在发生的事情是,在新服务器中,只有一些 IMAP 文件夹显示在圆形立方体中,我似乎无法弄清楚究竟是什么原因造成的。有一些电子邮件用户拥有大量嵌套文件夹,有时这些文件夹根本不显示,或者有时会显示文件夹的子集。它似乎与文件夹名称无关,因为在命名文件夹或类似名称时没有使用有趣的字符。

我检查了文件权限,它们都是正确的。

想法?

postfix imap maildir
  • 1 个回答
  • 1267 Views
Martin Hope
Greg K
Asked: 2012-07-08 08:07:07 +0800 CST

Postfix 不使用 Maildir 发送电子邮件

  • 3

我已经按照本指南设置了 postfix。我还没有完成它,因为从发送测试电子邮件开始,自从从 mbox 切换到 Maildir 后,电子邮件不再被发送。

我创建了一个包含 cur、new 和 tmp 子目录的 Maildir 目录。

~$ ll
drwxrwxr-x 5 greg greg    4096 2012-07-07 16:40 Maildir/
~$ ll Maildir/
drwxrwxr-x 2 greg greg 4096 2012-07-07 16:40 cur
drwxrwxr-x 2 greg greg 4096 2012-07-07 16:40 new
drwxrwxr-x 2 greg greg 4096 2012-07-07 16:40 tmp

发送测试邮件。

~$ netcat mail.example.com 25
220 ubuntu ESMTP Postfix (Ubuntu)
ehlo example.com
250-ubuntu
250-PIPELINING
250-SIZE 10240000
250-VRFY
250-ETRN
250-STARTTLS
250-ENHANCEDSTATUSCODES
250-8BITMIME
250 DSN
mail from: [email protected]
250 2.1.0 Ok
rcpt to: [email protected]
250 2.1.5 Ok
data
354 End data with <CR><LF>.<CR><LF>
Subject: test email

Hi,
Just testing.
.
250 2.0.0 Ok: queued as 56B541EA53
quit
221 2.0.0 Bye

检查邮件队列。

~$ mailq
Mail queue is empty

检查邮件是否已送达。

~$ ls -l Maildir/new
total 0

一些后缀设置:

~$ sudo postconf home_mailbox
home_mailbox = Maildir/
~$ sudo postconf mailbox_command
mailbox_command =

/var/log/mail.log

Jul  7 16:57:33 li305-246 postfix/smtpd[21039]: connect from example.com[178.79.168.xxx]
Jul  7 16:58:14 li305-246 postfix/smtpd[21039]: 56B541EA53: client=example.com[178.79.168.xxx]
Jul  7 16:58:33 li305-246 postfix/cleanup[21042]: 56B541EA53: message-id=<20120707155814.56B541EA53@ubuntu>
Jul  7 16:58:33 li305-246 postfix/qmgr[20882]: 56B541EA53: from=<[email protected]>, size=321, nrcpt=1 (queue active)
Jul  7 16:58:33 li305-246 postfix/smtp[21043]: 56B541EA53: to=<[email protected]>, relay=none, delay=30, delays=30/0.01/0/0, dsn=5.4.6, status=bounced (mail for example.com loops back to myself)
Jul  7 16:58:33 li305-246 postfix/cleanup[21042]: 1F68B1EA55: message-id=<20120707155833.1F68B1EA55@ubuntu>
Jul  7 16:58:33 li305-246 postfix/bounce[21044]: 56B541EA53: sender non-delivery notification: 1F68B1EA55
Jul  7 16:58:33 li305-246 postfix/qmgr[20882]: 1F68B1EA55: from=<>, size=1999, nrcpt=1 (queue active)
Jul  7 16:58:33 li305-246 postfix/qmgr[20882]: 56B541EA53: removed
Jul  7 16:58:33 li305-246 postfix/smtp[21043]: 1F68B1EA55: to=<[email protected]>, relay=none, delay=0, delays=0/0/0/0, dsn=5.4.6, status=bounced (mail for example.com loops back to myself)
Jul  7 16:58:33 li305-246 postfix/qmgr[20882]: 1F68B1EA55: removed
Jul  7 16:58:36 li305-246 postfix/smtpd[21039]: disconnect from domain.me[178.79.168.xxx]
Jul  7 17:10:38 li305-246 postfix/master[20878]: terminating on signal 15
Jul  7 17:10:39 li305-246 postfix/master[21254]: daemon started -- version 2.8.5, configuration /etc/postfix

有任何想法吗?

ubuntu postfix maildir
  • 1 个回答
  • 6645 Views
Martin Hope
user101130
Asked: 2012-07-02 06:56:16 +0800 CST

如何使用 procmail 和与 MUA 一起使用的 Maildir(和 postfix)创建默认子文件夹?

  • 2

我有一个 procmail 设置,并希望有一个与 MUA 一起使用的垃圾邮件文件夹。

我找到了这个教程http://www.cyberciti.biz/faq/how-do-i-move-spam-mail-to-spam-folder/但它没有按预期工作。

我希望能够打开邮件客户端并查看垃圾邮件文件夹以推断邮件是否真的是垃圾邮件。我如何做到这一点具有可以从 Thunderbird 和 Roundcube 等邮件客户端读取/访问的“默认”垃圾邮件文件夹设置?

procmail maildir
  • 2 个回答
  • 3868 Views
Martin Hope
Verity
Asked: 2012-06-14 21:15:49 +0800 CST

删除邮件服务器和客户端之间的垃圾邮件

  • 2

我的 postfix 配置不当,让大量垃圾邮件进入了一个帐户。我现在已经修复了 postfix,因此它成为了一个更好的垃圾邮件过滤器,几乎没有新的垃圾邮件通过。但是,服务器上仍然有很多旧的垃圾邮件,我想以某种方式将其删除。这些是 Maildir 样式的电子邮件文件(即每封电子邮件一个文件)。是否有命令行工具可以处理这些已经通过邮件服务器的电子邮件?我不希望他们到达客户。

基本上,我只需要一个 cli 来检查一个电子邮件文件是否是垃圾邮件,然后我可以使用“查找”命令整理其余部分。

我找到了 rblcheck 但它似乎需要一个 IP 地址(而不是整个电子邮件)作为输入。

有任何想法吗?

spam postfix maildir
  • 2 个回答
  • 216 Views
Martin Hope
bradlis7
Asked: 2010-03-19 05:55:26 +0800 CST

使用 Maildir 格式的 procmail 脚本出错

  • 2

我在 /etc/procmailrc 中有这段代码:

DROPPRIVS=yes

DEFAULT=$HOME/Maildir/

:0
* ? /usr/bin/test -d $DEFAULT || /bin/mkdir $DEFAULT
{ }
:0 E
{
        # Bail out if directory could not be created
        EXITCODE=127
        HOST=bail.out
}

MAILDIR=$HOME/Maildir/

但是,当目录已经存在时,有时它会发送一封带有此错误的返回电子邮件:554 5.3.0 unknown mailer error 127. 请注意,电子邮件仍会送达,但它也会将错误代码发送回发送用户。

我通过注释掉EXITCODE和HOST线暂时解决了这个问题,但我想知道是否有更好的解决方案。

我在网络上的多个地方找到了这段代码,但真的找不到为什么这个错误会回到我身边。当我向本地用户发送电子邮件时似乎会发生这种情况。有时用户有一个.forward文件要发送给其他用户,有时没有,但结果是一样的。我也试过删除DROPPRIVS,以防它搞砸了转发,但它似乎并没有影响它。

  • 线路开始有* ? /usr/bin/test问题吗?
  • *表示一个正则表达式,但它?使它返回一个整数值,对吗?
  • 匹配的整数是什么?还是只是比较整数返回值?
  • 我需要两个块之间的空间吗?

谢谢您的帮助。

linux email procmail maildir
  • 2 个回答
  • 996 Views
Martin Hope
ane
Asked: 2010-03-13 07:44:22 +0800 CST

Spamassassin 单线使用 X-Spam-Flag 标记和移动邮件:是的到新目录?

  • 2

假设您有一个目录,其中包含数万条消息。并且您想将垃圾邮件与非垃圾邮件区分开来。

具体来说,您希望:

  1. 对目录运行 spamassassin,用 X-Spam-Flag 标记每条消息:如果它认为它是垃圾邮件,则为 YES
  2. 使用 tcsh shell 或 perl 单行 grep 带有标志的所有邮件并将这些邮件移动到 /tmp/spam

你可以运行什么命令来完成这个?例如,一些伪代码:

/usr/local/bin/spamassassin -eL ./Maildir/cur/* | grep "X-Spam-Flag: YES" | mv %1 /tmp/spam
scripting spam spamassassin maildir grep
  • 2 个回答
  • 1446 Views
Martin Hope
ane
Asked: 2010-03-12 10:39:53 +0800 CST

将 53,800 多个文件移动到 54 个单独的文件夹中,每个文件夹大约 1000 个文件?

  • 2

尝试使用 Gmail 的 POP 提取器导入 53,800 多个单独的文件(邮件)。

Gmail 可以理解地拒绝,并给出错误:“要下载的邮件太多。另一台服务器上的邮件太多。”

有问题的文件夹类似于:

/usr/home/customer/Maildir/cur/1203672790.V57I586f04M867101.mail.net:2,S
/usr/home/customer/Maildir/cur/1203676329.V57I586f22M520117.mail.net:2,S
/usr/home/customer/Maildir/cur/1203677194.V57I586f26M688004.mail.net:2,S
/usr/home/customer/Maildir/cur/1203679158.V57I586f2bM182864.mail.net:2,S
/usr/home/customer/Maildir/cur/1203680493.V57I586f33M740378.mail.net:2,S
/usr/home/customer/Maildir/cur/1203685837.V57I586f0bM835200.mail.net:2,S
/usr/home/customer/Maildir/cur/1203687920.V57I586f65M995884.mail.net:2,S
...

使用 shell(FreeBSD 上的 tcsh、sh 等),我可以键入什么单行命令来将这个充满文件的目录拆分到单独的文件夹中,这样 Gmail 一次只能看到 1000 条消息? 带有 find 或 ls 的东西 | xargs mv 也许。无论是最快的。

所需的输出目录现在看起来像:

/usr/home/customer/Maildir/cur/1203672790.V57I586f04M867101.mail.net:2,S
/usr/home/customer/Maildir/cur/1203676329.V57I586f22M520117.mail.net:2,S
...
/usr/home/customer/set1/ (contains messages 1-1000)
/usr/home/customer/set2/ (contains messages 1001-2000)
/usr/home/customer/set3/ (etc.)
maildir pop3 gmail
  • 2 个回答
  • 1016 Views
Martin Hope
user31640
Asked: 2010-01-14 10:00:28 +0800 CST

通过 IMAP 迁移 Outlook PST -> Maildir

  • 1

我们的小商店一直在 Exchange 上(目前是 2003 年)。但是,我们使用第 3 方托管的 Exchange 提供程序,并严格限制我们允许每个用户使用多少服务器端存储。结果是我们的用户在本地 PST 文件中都有额外的电子邮件,我们每天都会对其进行备份。

我们正试图将每个人转移到 Maildir 支持的 dovecot。我基本上有这个人的问题的反面:推荐 Dovecot / Thunderbird 到 Exchange / Outlook 迁移策略,还有一个额外的复杂问题是 Exchange 目前不保存所有电子邮件,甚至接近它。

对于大多数用户,我们可以简单地在 Outlook 中创建 IMAP 帐户,然后在 Outlook 中复制/粘贴或拖动文件夹,然后 Outlook 通过 IMAP 将邮件向上推送到 dovecot,然后它们会在用户的邮件目录中弹出另一侧。

但是,对于一些用户来说,我们被困住了。他们有多个大型 PST 档案。每个人都在运行 Outlook 2003。Outlook 2003 支持两种类型的 PST 文件:一种是最大大小为 2GB 的向后兼容版本,另一种是支持数 TB 的重大更改版本。

我们的用户混合了最大大小的旧格式文件和新格式文件。我们对他们尝试了同样笨拙的方法(只有两三个用户有这个问题,而我们总共只有十几个电子邮件帐户),但是当您在 Outlook 2003 中创建一个新的基于 IMAP 的帐户时,它不会t 让您选择 PST 文件类型,您会遇到最大 2GB 的问题。

结果是 Outlook 最终不会让您将更多数据复制到 PST 中,这意味着您无法通过此方法将其他 PST 中的任何数据移动到服务器上。

使用另一个 2GB PST 向服务器创建一个新的 IMAP 帐户将不起作用,因为我们似乎无法让 Outlook 在不下载所有邮件的情况下重现 IMAP 端文件夹结构,这只会将其填充回 2GB。

imapsync 之类的工具将不起作用,因为 Exchange 服务器上不存在电子邮件,它仅存在于用户的本地 PST 中。

如果我在这里遗漏了一些明显的东西,我很抱歉,我对 Outlook/Exchange 并没有太多经验。

exchange outlook imap maildir dovecot
  • 3 个回答
  • 7191 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