我已经使用 dovecot 设置了家庭邮件服务器,以便通过 IMAP 下载和存档来自多个网络邮件帐户的电子邮件。目标是每周使用 cron 作业自动执行此操作。
我不确定我应该使用 dovecot sync/backup 还是 fetchmail,但后者很受欢迎,所以我首先尝试了 fetchmail。但是,它似乎不起作用,我得到了这个:
user@mail:~$ fetchmail
38081 messages for [email protected] at imap.fastmail.com (folder Archive).
fetchmail: Error writing to MDA: Broken pipe
reading message [email protected]@imap.fastmail.com:1 of 38081 (2100 header octets) (726 body octets) not flushed
reading message [email protected]@imap.fastmail.com:2 of 38081 (4404 header octets) (6082 body octets)fetchmail: error writing message text
fetchmail: MDA error while fetching from [email protected]@imap.fastmail.com
fetchmail: Query status=6 (IOERR)
~/.fetchmailrc 如下所示:
poll imap.fastmail.com protocol IMAP
user "[email protected]" is "user@localhost" here
folder Archive
ssl fetchall
mda "/usr/lib/dovecot/deliver -d user@localhost -m .fastmail.Archive"
.fastmail.Archive 文件夹位于 ~/Maildir 的根目录。我在 dovecot 配置中使用 Maildir。
在 ~/.netrc 中我有以下内容:
machine imap.fastmail.com
login [email protected]
password <secret>
我还以 root 身份使用 strace 手动运行了 deliver,之后我检查 ~/Maildir 时没有收到任何消息。这是输出,不知道该怎么理解。
root@mail:/home/user/fastmail# strace /usr/lib/dovecot/deliver -d user@localhost < 'test.eml'
execve("/usr/lib/dovecot/deliver", ["/usr/lib/dovecot/deliver", "-d", "user@localhost"], 0x7ffcd6f61be0 /* 12 vars */) = 0
brk(NULL) = 0x5593bc6d8000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/dovecot/tls/x86_64/x86_64/libdovecot-lda.so.0", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/usr/lib/dovecot/tls/x86_64/x86_64", 0x7fffbb1506b0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/dovecot/tls/x86_64/libdovecot-lda.so.0", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/usr/lib/dovecot/tls/x86_64", 0x7fffbb1506b0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/dovecot/tls/x86_64/libdovecot-lda.so.0", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/usr/lib/dovecot/tls/x86_64", 0x7fffbb1506b0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/dovecot/tls/libdovecot-lda.so.0", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/usr/lib/dovecot/tls", 0x7fffbb1506b0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/dovecot/x86_64/x86_64/libdovecot-lda.so.0", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/usr/lib/dovecot/x86_64/x86_64", 0x7fffbb1506b0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/dovecot/x86_64/libdovecot-lda.so.0", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/usr/lib/dovecot/x86_64", 0x7fffbb1506b0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/dovecot/x86_64/libdovecot-lda.so.0", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/usr/lib/dovecot/x86_64", 0x7fffbb1506b0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/dovecot/libdovecot-lda.so.0", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\3206\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0644, st_size=34968, ...}) = 0
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f99e4722000
mmap(NULL, 37136, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f99e4718000
mmap(0x7f99e471b000, 12288, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3000) = 0x7f99e471b000
mmap(0x7f99e471e000, 8192, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x6000) = 0x7f99e471e000
mmap(0x7f99e4720000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x7000) = 0x7f99e4720000
close(3) = 0
openat(AT_FDCWD, "/usr/lib/dovecot/libdovecot-storage.so.0", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0000\332\3\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0644, st_size=1436376, ...}) = 0
mmap(NULL, 1439128, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f99e45b8000
mprotect(0x7f99e45ee000, 1167360, PROT_NONE) = 0
mmap(0x7f99e45ee000, 856064, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x36000) = 0x7f99e45ee000
mmap(0x7f99e46bf000, 307200, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x107000) = 0x7f99e46bf000
mmap(0x7f99e470b000, 53248, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x152000) = 0x7f99e470b000
close(3) = 0
openat(AT_FDCWD, "/usr/lib/dovecot/libdovecot.so.0", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\300\337\3\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0644, st_size=1619272, ...}) = 0
mmap(NULL, 1632856, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f99e4429000
mmap(0x7f99e4460000, 909312, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x37000) = 0x7f99e4460000
mmap(0x7f99e453e000, 450560, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x115000) = 0x7f99e453e000
mmap(0x7f99e45ac000, 36864, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x182000) = 0x7f99e45ac000
mmap(0x7f99e45b5000, 10840, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f99e45b5000
close(3) = 0
openat(AT_FDCWD, "/usr/lib/dovecot/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=35918, ...}) = 0
mmap(NULL, 35918, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f99e4420000
close(3) = 0
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\260A\2\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=1824496, ...}) = 0
mmap(NULL, 1837056, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f99e425f000
mprotect(0x7f99e4281000, 1658880, PROT_NONE) = 0
mmap(0x7f99e4281000, 1343488, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x22000) = 0x7f99e4281000
mmap(0x7f99e43c9000, 311296, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x16a000) = 0x7f99e43c9000
mmap(0x7f99e4416000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1b6000) = 0x7f99e4416000
mmap(0x7f99e441c000, 14336, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f99e441c000
close(3) = 0
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libdl.so.2", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0000\21\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0644, st_size=14592, ...}) = 0
mmap(NULL, 16656, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f99e425a000
mmap(0x7f99e425b000, 4096, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1000) = 0x7f99e425b000
mmap(0x7f99e425c000, 4096, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x2000) = 0x7f99e425c000
mmap(0x7f99e425d000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x2000) = 0x7f99e425d000
close(3) = 0
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f99e4258000
arch_prctl(ARCH_SET_FS, 0x7f99e4259000) = 0
mprotect(0x7f99e4416000, 16384, PROT_READ) = 0
mprotect(0x7f99e425d000, 4096, PROT_READ) = 0
mprotect(0x7f99e45ac000, 32768, PROT_READ) = 0
mprotect(0x7f99e470b000, 28672, PROT_READ) = 0
mprotect(0x7f99e4720000, 4096, PROT_READ) = 0
mprotect(0x5593baf97000, 4096, PROT_READ) = 0
mprotect(0x7f99e474b000, 4096, PROT_READ) = 0
munmap(0x7f99e4420000, 35918) = 0
getuid() = 0
geteuid() = 0
getrandom("\x1c\x75\x34\x6d", 4, 0) = 4
brk(NULL) = 0x5593bc6d8000
brk(0x5593bc6f9000) = 0x5593bc6f9000
uname({sysname="Linux", nodename="mail", ...}) = 0
getpid() = 7234
openat(AT_FDCWD, "/dev/null", O_WRONLY) = 3
fcntl(3, F_GETFD) = 0
fcntl(3, F_SETFD, FD_CLOEXEC) = 0
rt_sigaction(SIGPIPE, {sa_handler=SIG_IGN, sa_mask=[], sa_flags=SA_RESTORER|SA_RESTART, sa_restorer=0x7f99e4296840}, NULL, 8) = 0
rt_sigaction(SIGALRM, {sa_handler=0x7f99e4520210, sa_mask=[], sa_flags=SA_RESTORER|SA_SIGINFO, sa_restorer=0x7f99e4296840}, NULL, 8) = 0
geteuid() = 0
rt_sigaction(SIGINT, {sa_handler=0x7f99e4520c20, sa_mask=[], sa_flags=SA_RESTORER|SA_SIGINFO, sa_restorer=0x7f99e4296840}, NULL, 8) = 0
pipe([4, 5]) = 0
fcntl(4, F_GETFL) = 0 (flags O_RDONLY)
fcntl(4, F_SETFL, O_RDONLY|O_NONBLOCK) = 0
fcntl(5, F_GETFL) = 0x1 (flags O_WRONLY)
fcntl(5, F_SETFL, O_WRONLY|O_NONBLOCK) = 0
fcntl(4, F_GETFD) = 0
fcntl(4, F_SETFD, FD_CLOEXEC) = 0
fcntl(5, F_GETFD) = 0
fcntl(5, F_SETFD, FD_CLOEXEC) = 0
epoll_create(128) = 6
fcntl(6, F_GETFD) = 0
fcntl(6, F_SETFD, FD_CLOEXEC) = 0
epoll_ctl(6, EPOLL_CTL_ADD, 4, {EPOLLIN|EPOLLPRI|EPOLLERR|EPOLLHUP, {u32=3161333872, u64=94093009887344}}) = 0
rt_sigaction(SIGTERM, {sa_handler=0x7f99e4520c20, sa_mask=[], sa_flags=SA_RESTORER|SA_SIGINFO, sa_restorer=0x7f99e4296840}, NULL, 8) = 0
umask(077) = 022
socket(AF_UNIX, SOCK_STREAM, 0) = 7
fcntl(7, F_GETFL) = 0x2 (flags O_RDWR)
fcntl(7, F_SETFL, O_RDWR|O_NONBLOCK) = 0
connect(7, {sa_family=AF_UNIX, sun_path="/var/run/dovecot/config"}, 110) = 0
fcntl(7, F_GETFL) = 0x802 (flags O_RDWR|O_NONBLOCK)
fcntl(7, F_SETFL, O_RDWR) = 0
write(7, "VERSION\tconfig\t2\t0\nREQ\tmodule=ld"..., 70) = 70
fstat(7, {st_mode=S_IFSOCK|0777, st_size=0, ...}) = 0
fcntl(7, F_GETFL) = 0x2 (flags O_RDWR)
alarm(10) = 0
read(7, "\nmail_privileged_group=mail\nname"..., 8192) = 810
alarm(0) = 10
close(7) = 0
stat("/etc/resolv.conf", {st_mode=S_IFREG|0644, st_size=174, ...}) = 0
openat(AT_FDCWD, "/etc/host.conf", O_RDONLY|O_CLOEXEC) = 7
fstat(7, {st_mode=S_IFREG|0644, st_size=9, ...}) = 0
read(7, "multi on\n", 4096) = 9
read(7, "", 4096) = 0
close(7) = 0
openat(AT_FDCWD, "/etc/resolv.conf", O_RDONLY|O_CLOEXEC) = 7
fstat(7, {st_mode=S_IFREG|0644, st_size=174, ...}) = 0
read(7, "# Dynamic resolv.conf(5) file fo"..., 4096) = 174
read(7, "", 4096) = 0
close(7) = 0
uname({sysname="Linux", nodename="mail", ...}) = 0
socket(AF_UNIX, SOCK_STREAM|SOCK_CLOEXEC|SOCK_NONBLOCK, 0) = 7
connect(7, {sa_family=AF_UNIX, sun_path="/var/run/nscd/socket"}, 110) = -1 ENOENT (No such file or directory)
close(7) = 0
socket(AF_UNIX, SOCK_STREAM|SOCK_CLOEXEC|SOCK_NONBLOCK, 0) = 7
connect(7, {sa_family=AF_UNIX, sun_path="/var/run/nscd/socket"}, 110) = -1 ENOENT (No such file or directory)
close(7) = 0
openat(AT_FDCWD, "/etc/nsswitch.conf", O_RDONLY|O_CLOEXEC) = 7
fstat(7, {st_mode=S_IFREG|0644, st_size=526, ...}) = 0
read(7, "# /etc/nsswitch.conf\n#\n# Example"..., 4096) = 526
read(7, "", 4096) = 0
close(7) = 0
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 7
fstat(7, {st_mode=S_IFREG|0644, st_size=35918, ...}) = 0
mmap(NULL, 35918, PROT_READ, MAP_PRIVATE, 7, 0) = 0x7f99e4420000
close(7) = 0
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libnss_files.so.2", O_RDONLY|O_CLOEXEC) = 7
read(7, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0003\0\0\0\0\0\0"..., 832) = 832
fstat(7, {st_mode=S_IFREG|0644, st_size=55792, ...}) = 0
mmap(NULL, 83768, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 7, 0) = 0x7f99e4243000
mprotect(0x7f99e4246000, 40960, PROT_NONE) = 0
mmap(0x7f99e4246000, 28672, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 7, 0x3000) = 0x7f99e4246000
mmap(0x7f99e424d000, 8192, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 7, 0xa000) = 0x7f99e424d000
mmap(0x7f99e4250000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 7, 0xc000) = 0x7f99e4250000
mmap(0x7f99e4252000, 22328, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f99e4252000
close(7) = 0
mprotect(0x7f99e4250000, 4096, PROT_READ) = 0
munmap(0x7f99e4420000, 35918) = 0
openat(AT_FDCWD, "/etc/hosts", O_RDONLY|O_CLOEXEC) = 7
lseek(7, 0, SEEK_CUR) = 0
fstat(7, {st_mode=S_IFREG|0644, st_size=210, ...}) = 0
read(7, "127.0.0.1\tlocalhost\n192.168.1.24"..., 4096) = 210
lseek(7, 0, SEEK_CUR) = 210
read(7, "", 4096) = 0
close(7) = 0
access("/etc/ssl/certs", X_OK) = 0
socket(AF_UNIX, SOCK_STREAM, 0) = 7
fcntl(7, F_GETFL) = 0x2 (flags O_RDWR)
fcntl(7, F_SETFL, O_RDWR|O_NONBLOCK) = 0
connect(7, {sa_family=AF_UNIX, sun_path="/var/run/dovecot/stats-writer"}, 110) = 0
fstat(7, {st_mode=S_IFSOCK|0777, st_size=0, ...}) = 0
fcntl(7, F_GETFL) = 0x802 (flags O_RDWR|O_NONBLOCK)
epoll_ctl(6, EPOLL_CTL_ADD, 7, {EPOLLIN|EPOLLPRI|EPOLLERR|EPOLLHUP, {u32=3161385712, u64=94093009939184}}) = 0
write(7, "VERSION\tstats-client\t3\t0\n", 25) = 25
epoll_ctl(6, EPOLL_CTL_DEL, 4, 0x7fffbb150b0c) = 0
epoll_create(128) = 8
fcntl(8, F_GETFD) = 0
fcntl(8, F_SETFD, FD_CLOEXEC) = 0
epoll_ctl(8, EPOLL_CTL_ADD, 4, {EPOLLIN|EPOLLPRI|EPOLLERR|EPOLLHUP, {u32=3161395728, u64=94093009949200}}) = 0
epoll_ctl(8, EPOLL_CTL_ADD, 7, {EPOLLIN|EPOLLPRI|EPOLLERR|EPOLLHUP, {u32=3161395856, u64=94093009949328}}) = 0
epoll_ctl(6, EPOLL_CTL_DEL, 7, 0x7fffbb150b1c) = 0
epoll_wait(8, [{EPOLLIN, {u32=3161395856, u64=94093009949328}}], 2, -1) = 1
read(7, "VERSION\tstats-server\t3\t0\nFILTER\t"..., 8192) = 33
epoll_ctl(8, EPOLL_CTL_DEL, 4, 0x7fffbb150b2c) = 0
epoll_ctl(6, EPOLL_CTL_ADD, 4, {EPOLLIN|EPOLLPRI|EPOLLERR|EPOLLHUP, {u32=3161333872, u64=94093009887344}}) = 0
epoll_ctl(6, EPOLL_CTL_ADD, 7, {EPOLLIN|EPOLLPRI|EPOLLERR|EPOLLHUP, {u32=3161385712, u64=94093009939184}}) = 0
epoll_ctl(8, EPOLL_CTL_DEL, 7, 0x7fffbb150b1c) = 0
epoll_ctl(6, EPOLL_CTL_DEL, 4, 0x7fffbb150b2c) = 0
epoll_ctl(8, EPOLL_CTL_ADD, 4, {EPOLLIN|EPOLLPRI|EPOLLERR|EPOLLHUP, {u32=3161395728, u64=94093009949200}}) = 0
epoll_ctl(8, EPOLL_CTL_DEL, 4, 0x7fffbb150aec) = 0
epoll_ctl(6, EPOLL_CTL_ADD, 4, {EPOLLIN|EPOLLPRI|EPOLLERR|EPOLLHUP, {u32=3161333872, u64=94093009887344}}) = 0
close(8) = 0
socket(AF_UNIX, SOCK_DGRAM|SOCK_CLOEXEC, 0) = 8
connect(8, {sa_family=AF_UNIX, sun_path="/dev/log"}, 110) = 0
socket(AF_UNIX, SOCK_STREAM, 0) = 9
fcntl(9, F_GETFL) = 0x2 (flags O_RDWR)
fcntl(9, F_SETFL, O_RDWR|O_NONBLOCK) = 0
connect(9, {sa_family=AF_UNIX, sun_path="/var/run/dovecot/auth-userdb"}, 110) = 0
epoll_ctl(6, EPOLL_CTL_DEL, 4, 0x7fffbb150d5c) = 0
epoll_create(128) = 10
fcntl(10, F_GETFD) = 0
fcntl(10, F_SETFD, FD_CLOEXEC) = 0
epoll_ctl(10, EPOLL_CTL_ADD, 4, {EPOLLIN|EPOLLPRI|EPOLLERR|EPOLLHUP, {u32=3161405440, u64=94093009958912}}) = 0
fstat(9, {st_mode=S_IFSOCK|0777, st_size=0, ...}) = 0
fcntl(9, F_GETFL) = 0x802 (flags O_RDWR|O_NONBLOCK)
lseek(9, 0, SEEK_CUR) = -1 ESPIPE (Illegal seek)
getsockname(9, {sa_family=AF_UNIX}, [28->2]) = 0
epoll_ctl(10, EPOLL_CTL_ADD, 9, {EPOLLIN|EPOLLPRI|EPOLLERR|EPOLLHUP, {u32=3161406112, u64=94093009959584}}) = 0
setsockopt(9, SOL_TCP, TCP_CORK, [1], 4) = -1 EOPNOTSUPP (Operation not supported)
write(9, "VERSION\t1\t0\nUSER\t1\tuser@loca"..., 50) = 50
epoll_wait(10, [{EPOLLIN, {u32=3161406112, u64=94093009959584}}], 2, 155000) = 1
read(9, "VERSION\t1\t1\nSPID\t7235\n", 8192) = 22
epoll_wait(10, [{EPOLLIN, {u32=3161406112, u64=94093009959584}}], 2, 154984) = 1
read(9, "NOTFOUND\t1\n", 8170) = 11
epoll_ctl(10, EPOLL_CTL_DEL, 4, 0x7fffbb150c7c) = 0
epoll_ctl(6, EPOLL_CTL_ADD, 4, {EPOLLIN|EPOLLPRI|EPOLLERR|EPOLLHUP, {u32=3161333872, u64=94093009887344}}) = 0
epoll_ctl(6, EPOLL_CTL_DEL, 4, 0x7fffbb150c7c) = 0
epoll_ctl(10, EPOLL_CTL_ADD, 4, {EPOLLIN|EPOLLPRI|EPOLLERR|EPOLLHUP, {u32=3161405440, u64=94093009958912}}) = 0
epoll_ctl(10, EPOLL_CTL_DEL, 4, 0x7fffbb150d8c) = 0
epoll_ctl(6, EPOLL_CTL_ADD, 4, {EPOLLIN|EPOLLPRI|EPOLLERR|EPOLLHUP, {u32=3161333872, u64=94093009887344}}) = 0
epoll_ctl(6, EPOLL_CTL_DEL, 4, 0x7fffbb150d8c) = 0
epoll_ctl(10, EPOLL_CTL_ADD, 4, {EPOLLIN|EPOLLPRI|EPOLLERR|EPOLLHUP, {u32=3161405440, u64=94093009958912}}) = 0
epoll_ctl(10, EPOLL_CTL_DEL, 9, 0x7fffbb150dbc) = 0
epoll_ctl(10, EPOLL_CTL_DEL, 4, 0x7fffbb150d4c) = 0
epoll_ctl(6, EPOLL_CTL_ADD, 4, {EPOLLIN|EPOLLPRI|EPOLLERR|EPOLLHUP, {u32=3161333872, u64=94093009887344}}) = 0
close(10) = 0
close(9) = 0
epoll_ctl(6, EPOLL_CTL_DEL, 7, 0x7fffbb15105c) = 0
close(7) = 0
epoll_ctl(6, EPOLL_CTL_DEL, 4, 0x7fffbb15105c) = 0
close(4) = 0
close(5) = 0
close(6) = 0
close(3) = 0
exit_group(67) = ?
+++ exited with 67 +++
doveconf -n 的输出:
root@mail:/etc/dovecot# dovecot -n
# 2.3.4.1 (f79e8e7e4): /etc/dovecot/dovecot.conf
# Pigeonhole version 0.5.4 ()
# OS: Linux 4.19.0-17-amd64 x86_64 Debian 10.10
# Hostname: mail
mail_location = maildir:~/Maildir
mail_privileged_group = mail
namespace inbox {
inbox = yes
location =
mailbox Archive {
special_use = \Archive
}
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 {
driver = pam
}
protocols = " imap"
ssl = required
ssl_cert = </etc/letsencrypt/live/domain.com/fullchain.pem
ssl_client_ca_dir = /etc/ssl/certs
ssl_dh = # hidden, use -P to show it
ssl_key = # hidden, use -P to show it
userdb {
driver = passwd
}
/var/run/dovecot/ 的权限统计
root@mail:/etc/dovecot# ls -l /var/run/dovecot/*stat*
srw------- 1 root root 0 Aug 9 13:37 /var/run/dovecot/old-stats
prw------- 1 root root 0 Aug 9 13:37 /var/run/dovecot/old-stats-mail
prw------- 1 root root 0 Aug 9 13:37 /var/run/dovecot/old-stats-user
srw------- 1 root root 0 Aug 9 13:37 /var/run/dovecot/stats-reader
srw-rw---- 1 root dovecot 0 Aug 9 13:37 /var/run/dovecot/stats-writer
有什么想法可能出了什么问题吗?使用 dovecot sync/backup 是否更好?
答案1
事实证明
mda "/usr/lib/dovecot/deliver -d user@localhost -m .fastmail.Archive"
不起作用。当我删除@localhost并修复文件夹名称时,它就可以正常工作:
mda "/usr/lib/dovecot/deliver -d user -m fastmail.Archive"
我仍然不明白为什么我没有得到任何类型的错误输出,该命令就像它工作一样,而且我在 dovecot 日志中也看不到任何内容。至少在没有打开调试日志选项的情况下看不到。strace 输出中的上述搜索错误令人困惑,我不明白这与删除 @localhost 解决问题之间有什么关系。