Hello, I have installed and all working except for address verifier. It hangs and then timesout.
My startup cli: emailrelay --syslog --log -v --no-daemon --port 25 --admin 4321 --remote-clients --forward-on-disconnect --forward-to nfswindsor.tinc:2525 --spool-dir /spool/ --address-verifier=verify.sh
verify.sh
#!/bin/bash
# address verifier -- accept only our domains
touch /var/log/did-i-run
echo ""
echo "$1"
exit 1
And the log:
Start EmailRelay
Mar 13 09:28:00 dhost.local emailrelay[870]: total 16
Mar 13 09:28:00 dhost.local emailrelay[870]: drwxr-xr-x 2 root root 41 Mar 13 09:27 .
Mar 13 09:28:00 dhost.local emailrelay[870]: drwxr-xr-x. 131 root root 4096 Mar 10 16:11 ..
Mar 13 09:28:00 dhost.local emailrelay[870]: -rwxr--r-- 1 root root 494 Mar 12 22:42 startup.sh
Mar 13 09:28:00 dhost.local emailrelay[870]: -rwxr-xr-x 1 root root 179 Mar 13 09:27 verify.sh
Mar 13 09:28:00 dhost.local emailrelay[870]: total 0
Mar 13 09:28:00 dhost.local emailrelay[870]: drwxr-xr-x 2 root root 132 Mar 12 22:43 .
Mar 13 09:28:00 dhost.local emailrelay[870]: drwxr-xr-x 1 root root 56 Mar 12 17:14 ..
Mar 13 09:28:00 dhost.local emailrelay[870]: -rw-rw---- 1 root daemon 0 Mar 12 17:38 emailrelay.18.1741801087.1.content
Mar 13 09:28:00 dhost.local emailrelay[870]: -rw-rw---- 1 root daemon 0 Mar 12 22:43 emailrelay.18.1741819427.1.content
Mar 13 09:28:00 dhost.local emailrelay[870]: -rw-rw---- 1 root daemon 0 Mar 12 17:14 emailrelay.19.1741799693.1.content
Mar 13 09:28:07 dhost.local emailrelay[870]: emailrelay: info: smtp server on 0.0.0.0:25
Mar 13 09:28:07 dhost.local emailrelay[870]: emailrelay: info: smtp server on ::.25
Mar 13 09:28:07 dhost.local emailrelay[870]: emailrelay: info: admin server on 0.0.0.0:4321
Mar 13 09:28:07 dhost.local emailrelay[870]: emailrelay: info: admin server on ::.4321
Mar 13 09:28:07 dhost.local emailrelay[870]: emailrelay: info: forwarding to nfswindsor.tinc:2525
Mar 13 09:28:20 dhost.local emailrelay[870]: emailrelay: info: smtp connection from 172.17.0.1:57738
Mar 13 09:28:20 dhost.local emailrelay[870]: emailrelay: info: tx>>: "220 linuxf:0.localnet -- E-MailRelay V2.6 -- Service ready"
Mar 13 09:28:25 dhost.local emailrelay[870]: emailrelay: info: rx<<: "helo qq"
Mar 13 09:28:25 dhost.local emailrelay[870]: emailrelay: info: tx>>: "250 hello"
Mar 13 09:28:36 dhost.local emailrelay[870]: emailrelay: info: rx<<: "mail from: qq@qq.com"
Mar 13 09:28:36 dhost.local emailrelay[870]: emailrelay: info: tx>>: "250 sender qq@qq.com OK"
Mar 13 09:28:36 dhost.local emailrelay[870]: emailrelay: info: new content file [emailrelay.18.1741858116.1.content]
Mar 13 09:28:50 dhost.local emailrelay[870]: emailrelay: info: rx<<: "rcpt to: david@davidsbrowne.com"
Mar 13 09:28:50 dhost.local emailrelay[870]: emailrelay: info: address verifier: executing [/config/app/emailrelay/verify.sh] [david@davidsbrowne.com] [qq@qq.com] [172.17.0.1:57738] [linuxf:0.localnet] [none] []
^@Mar 13 09:29:50 dhost.local emailrelay[870]: emailrelay: warning: rejecting recipient "david@davidsbrowne.com": timeout: timeout
Mar 13 09:29:50 dhost.local emailrelay[870]: emailrelay: info: tx>>: "450 timeout"
Mar 13 09:29:51 dhost.local emailrelay[870]: emailrelay: info: waiting for killed process to terminate: pid 20
^@Mar 13 09:30:16 dhost.local emailrelay[870]: emailrelay: info: rx<<: "\0"
Mar 13 09:30:16 dhost.local emailrelay[870]: emailrelay: info: tx>>: "500 command unrecognized"
Mar 13 09:30:17 dhost.local emailrelay[870]: emailrelay: info: rx<<: "quit"
Mar 13 09:30:17 dhost.local emailrelay[870]: emailrelay: info: tx>>: "221 OK"
Mar 13 09:30:17 dhost.local emailrelay[870]: emailrelay: info: smtp connection closed: smtp protocol done: 172.17.0.1:57738
Mar 13 09:30:17 dhost.local emailrelay[870]: emailrelay: info: forwarding: [client disconnect]
Mar 13 09:30:17 dhost.local emailrelay[870]: emailrelay: info: forwarding: no messages to send
The touch in the verify script does not do anything, so it appears the script never tuns? Any ideas?
Diff:
You are listening on port 25 so I assume you are running emailrelay as root, and in that case the address verifier will run with the effective userid of the "daemon" account and it will therefore (probably) not have write access to /var/log. Try /var/tmp or use "--user=root" to disable the effective userid shenanigans.
I would use "strace" to get a better idea of what is going on -- perhaps "strace -e trace=process emailrelay ..etc..".
BTW the "--filter-timeout" option also sets the timeout for the address verifier.
Problem occured even before I added the touch. That was just to see if the script was running. I have removed and moved to port 2525. Same result. here is the strace
execve("/usr/local/sbin/emailrelay", ["emailrelay", "--syslog", "--log", "-v", "--no-daemon", "--port", "2525", "--admin", "4321", "--remote-clients", "--forward-on-disconnect", "--forward-to", "nfswindsor.tinc:2525", "--spool-dir", "/spool/", "--address-verifier=verify.sh"], 0x7ffe35b26188 / 7 vars /) = 0
brk(NULL) = 0x1b16000
arch_prctl(0x3001 / ARCH_??? /, 0x7ffe70c04d40) = -1 EINVAL (Invalid argument)
access("/etc/ld.so.preload", R_OK) = -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=10263, ...}) = 0
mmap(NULL, 10263, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7fdc59900000
close(3) = 0
openat(AT_FDCWD, "/lib64/libstdc++.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\220\373\10\0\0\0\0\0"..., 832) = 832
lseek(3, 1594464, SEEK_SET) = 1594464
read(3, "\4\0\0\0\20\0\0\0\5\0\0\0GNU\0\2\0\0\300\4\0\0\0\3\0\0\0\0\0\0\0", 32) = 32
fstat(3, {st_mode=S_IFREG|0755, st_size=1661432, ...}) = 0
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fdc598fe000
lseek(3, 1594464, SEEK_SET) = 1594464
read(3, "\4\0\0\0\20\0\0\0\5\0\0\0GNU\0\2\0\0\300\4\0\0\0\3\0\0\0\0\0\0\0", 32) = 32
mmap(NULL, 3753504, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7fdc5933f000
mprotect(0x7fdc594c5000, 2093056, PROT_NONE) = 0
mmap(0x7fdc596c4000, 53248, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x185000) = 0x7fdc596c4000
mmap(0x7fdc596d1000, 9760, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7fdc596d1000
close(3) = 0
openat(AT_FDCWD, "/lib64/libm.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 \305\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=1598848, ...}) = 0
mmap(NULL, 3674432, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7fdc58fbd000
mprotect(0x7fdc5913e000, 2093056, PROT_NONE) = 0
mmap(0x7fdc5933d000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x180000) = 0x7fdc5933d000
close(3) = 0
openat(AT_FDCWD, "/lib64/libgcc_s.so.1", 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\0p.\0\0\0\0\0\0"..., 832) = 832
lseek(3, 95504, SEEK_SET) = 95504
read(3, "\4\0\0\0\20\0\0\0\5\0\0\0GNU\0\2\0\0\300\4\0\0\0\3\0\0\0\0\0\0\0", 32) = 32
fstat(3, {st_mode=S_IFREG|0755, st_size=103784, ...}) = 0
lseek(3, 95504, SEEK_SET) = 95504
read(3, "\4\0\0\0\20\0\0\0\5\0\0\0GNU\0\2\0\0\300\4\0\0\0\3\0\0\0\0\0\0\0", 32) = 32
mmap(NULL, 2196176, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7fdc58da4000
mprotect(0x7fdc58dbc000, 2093056, PROT_NONE) = 0
mmap(0x7fdc58fbb000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x17000) = 0x7fdc58fbb000
close(3) = 0
openat(AT_FDCWD, "/lib64/libpthread.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\0o\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=150208, ...}) = 0
mmap(NULL, 2225344, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7fdc58b84000
mprotect(0x7fdc58b9f000, 2093056, PROT_NONE) = 0
mmap(0x7fdc58d9e000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1a000) = 0x7fdc58d9e000
mmap(0x7fdc58da0000, 13504, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7fdc58da0000
close(3) = 0
openat(AT_FDCWD, "/lib64/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\200\251\3\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=2164800, ...}) = 0
lseek(3, 808, SEEK_SET) = 808
read(3, "\4\0\0\0\20\0\0\0\5\0\0\0GNU\0\2\0\0\300\4\0\0\0\3\0\0\0\0\0\0\0", 32) = 32
mmap(NULL, 4020448, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7fdc587ae000
mprotect(0x7fdc5897b000, 2093056, PROT_NONE) = 0
mmap(0x7fdc58b7a000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1cc000) = 0x7fdc58b7a000
mmap(0x7fdc58b80000, 14560, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7fdc58b80000
close(3) = 0
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fdc598fc000
mmap(NULL, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fdc598f9000
arch_prctl(ARCH_SET_FS, 0x7fdc598f9740) = 0
mprotect(0x7fdc58b7a000, 16384, PROT_READ) = 0
mprotect(0x7fdc58d9e000, 4096, PROT_READ) = 0
mprotect(0x7fdc58fbb000, 4096, PROT_READ) = 0
mprotect(0x7fdc5933d000, 4096, PROT_READ) = 0
mprotect(0x7fdc596c4000, 49152, PROT_READ) = 0
mprotect(0x765000, 4096, PROT_READ) = 0
mprotect(0x7fdc59903000, 4096, PROT_READ) = 0
munmap(0x7fdc59900000, 10263) = 0
set_tid_address(0x7fdc598f9a10) = 22
set_robust_list(0x7fdc598f9a20, 24) = 0
rt_sigaction(SIGRTMIN, {sa_handler=0x7fdc58b8a970, sa_mask=[], sa_flags=SA_RESTORER|SA_SIGINFO, sa_restorer=0x7fdc58b969f0}, NULL, 8) = 0
rt_sigaction(SIGRT_1, {sa_handler=0x7fdc58b8aa00, sa_mask=[], sa_flags=SA_RESTORER|SA_RESTART|SA_SIGINFO, sa_restorer=0x7fdc58b969f0}, NULL, 8) = 0
rt_sigprocmask(SIG_UNBLOCK, [RTMIN RT_1], NULL, 8) = 0
prlimit64(0, RLIMIT_STACK, NULL, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0
getrandom("\x3f\x9c\x69\x2f\x67\x82\x3a\x91", 8, GRND_NONBLOCK) = 8
brk(NULL) = 0x1b16000
brk(0x1b37000) = 0x1b37000
futex(0x7fdc596d167c, FUTEX_WAKE_PRIVATE, 2147483647) = 0
futex(0x7fdc596d1688, FUTEX_WAKE_PRIVATE, 2147483647) = 0
getcwd("/config/app/emailrelay", 1024) = 23
brk(NULL) = 0x1b37000
brk(0x1b59000) = 0x1b59000
getcwd("/config/app/emailrelay", 1024) = 23
lstat("/proc/self/exe", {st_mode=S_IFLNK|0777, st_size=0, ...}) = 0
readlink("/proc/self/exe", "/usr/local/sbin/emailrelay", 1024) = 26
stat("/config/app/emailrelay/verify.sh", {st_mode=S_IFREG|0755, st_size=176, ...}) = 0
stat("/config/app/emailrelay/verify.sh", {st_mode=S_IFREG|0755, st_size=176, ...}) = 0
umask(002) = 022
umask(077) = 002
openat(AT_FDCWD, "/etc/localtime", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=3687, ...}) = 0
fstat(3, {st_mode=S_IFREG|0644, st_size=3687, ...}) = 0
read(3, "TZif2\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\10\0\0\0\10\0\0\0\0"..., 4096) = 3687
lseek(3, -2347, SEEK_CUR) = 1340
read(3, "TZif2\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\10\0\0\0\10\0\0\0\0"..., 4096) = 2347
close(3) = 0
stat("/etc/localtime", {st_mode=S_IFREG|0644, st_size=3687, ...}) = 0
socket(AF_UNIX, SOCK_STREAM|SOCK_CLOEXEC|SOCK_NONBLOCK, 0) = 3
connect(3, {sa_family=AF_UNIX, sun_path="/var/run/nscd/socket"}, 110) = -1 ENOENT (No such file or directory)
close(3) = 0
socket(AF_UNIX, SOCK_STREAM|SOCK_CLOEXEC|SOCK_NONBLOCK, 0) = 3
connect(3, {sa_family=AF_UNIX, sun_path="/var/run/nscd/socket"}, 110) = -1 ENOENT (No such file or directory)
close(3) = 0
openat(AT_FDCWD, "/etc/nsswitch.conf", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=2215, ...}) = 0
read(3, "#\n# /etc/nsswitch.conf\n#\n# Name "..., 4096) = 2215
read(3, "", 4096) = 0
close(3) = 0
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=10263, ...}) = 0
mmap(NULL, 10263, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7fdc59900000
close(3) = 0
openat(AT_FDCWD, "/lib64/glibc-hwcaps/x86-64-v3/libnss_sss.so.2", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/lib64/glibc-hwcaps/x86-64-v3", 0x7ffe70c03c90) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib64/glibc-hwcaps/x86-64-v2/libnss_sss.so.2", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/lib64/glibc-hwcaps/x86-64-v2", 0x7ffe70c03c90) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib64/tls/x86_64/x86_64/libnss_sss.so.2", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/lib64/tls/x86_64/x86_64", 0x7ffe70c03c90) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib64/tls/x86_64/libnss_sss.so.2", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/lib64/tls/x86_64", 0x7ffe70c03c90) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib64/tls/x86_64/libnss_sss.so.2", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/lib64/tls/x86_64", 0x7ffe70c03c90) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib64/tls/libnss_sss.so.2", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/lib64/tls", {st_mode=S_IFDIR|0555, st_size=6, ...}) = 0
openat(AT_FDCWD, "/lib64/x86_64/x86_64/libnss_sss.so.2", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/lib64/x86_64/x86_64", 0x7ffe70c03c90) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib64/x86_64/libnss_sss.so.2", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/lib64/x86_64", 0x7ffe70c03c90) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib64/x86_64/libnss_sss.so.2", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/lib64/x86_64", 0x7ffe70c03c90) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib64/libnss_sss.so.2", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/lib64", {st_mode=S_IFDIR|0555, st_size=4096, ...}) = 0
openat(AT_FDCWD, "/usr/lib64/glibc-hwcaps/x86-64-v3/libnss_sss.so.2", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/usr/lib64/glibc-hwcaps/x86-64-v3", 0x7ffe70c03c90) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib64/glibc-hwcaps/x86-64-v2/libnss_sss.so.2", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/usr/lib64/glibc-hwcaps/x86-64-v2", 0x7ffe70c03c90) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib64/tls/x86_64/x86_64/libnss_sss.so.2", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/usr/lib64/tls/x86_64/x86_64", 0x7ffe70c03c90) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib64/tls/x86_64/libnss_sss.so.2", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/usr/lib64/tls/x86_64", 0x7ffe70c03c90) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib64/tls/x86_64/libnss_sss.so.2", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/usr/lib64/tls/x86_64", 0x7ffe70c03c90) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib64/tls/libnss_sss.so.2", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/usr/lib64/tls", {st_mode=S_IFDIR|0555, st_size=6, ...}) = 0
openat(AT_FDCWD, "/usr/lib64/x86_64/x86_64/libnss_sss.so.2", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/usr/lib64/x86_64/x86_64", 0x7ffe70c03c90) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib64/x86_64/libnss_sss.so.2", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/usr/lib64/x86_64", 0x7ffe70c03c90) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib64/x86_64/libnss_sss.so.2", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/usr/lib64/x86_64", 0x7ffe70c03c90) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib64/libnss_sss.so.2", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/usr/lib64", {st_mode=S_IFDIR|0555, st_size=4096, ...}) = 0
munmap(0x7fdc59900000, 10263) = 0
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=10263, ...}) = 0
mmap(NULL, 10263, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7fdc59900000
close(3) = 0
openat(AT_FDCWD, "/lib64/libnss_files.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\0\260'\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=54368, ...}) = 0
mmap(NULL, 2172760, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7fdc5859b000
mprotect(0x7fdc585a6000, 2097152, PROT_NONE) = 0
mmap(0x7fdc587a6000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xb000) = 0x7fdc587a6000
mmap(0x7fdc587a8000, 22360, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7fdc587a8000
close(3) = 0
mprotect(0x7fdc587a6000, 4096, PROT_READ) = 0
munmap(0x7fdc59900000, 10263) = 0
openat(AT_FDCWD, "/etc/passwd", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=826, ...}) = 0
lseek(3, 0, SEEK_SET) = 0
read(3, "root❌0:0:root:/root:/bin/bash\n"..., 4096) = 826
close(3) = 0
getuid() = 0
getgid() = 0
getuid() = 0
getgid() = 0
setgroups(0, []) = 0
geteuid() = 0
getegid() = 0
getuid() = 0
getgid() = 0
setresuid(-1, 0, -1) = 0
setresgid(-1, 2, -1) = 0
setresuid(-1, 2, -1) = 0
epoll_create1(EPOLL_CLOEXEC) = 3
mmap(NULL, 8392704, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_STACK, -1, 0) = 0x7fdc57d9a000
mprotect(0x7fdc57d9b000, 8388608, PROT_READ|PROT_WRITE) = 0
clone(child_stack=0x7fdc58599fb0, flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SYSVSEM|CLONE_SETTLS|CLONE_PARENT_SETTID|CLONE_CHILD_CLEARTID, parent_tid=0x7fdc5859a9d0, tls=0x7fdc5859a700, child_tidptr=0x7fdc5859a9d0) = 23
futex(0x7fdc5859a9d0, FUTEX_WAIT, 23, NULL) = 0
socket(AF_NETLINK, SOCK_RAW|SOCK_CLOEXEC, NETLINK_ROUTE) = 4
bind(4, 0x7ffe70c03bf8, 12) = 0
getsockname(4, 0x7ffe70c03bf8, 0x7ffe70c03bf4) = 0
sendto(4, 0x7ffe70c03c60, 20, 0, 0x7ffe70c03c04, 12) = 20
recvmsg(4, 0x7ffe70c03c20, 0) = 252
recvmsg(4, 0x7ffe70c03c20, 0) = 72
recvmsg(4, 0x7ffe70c03c20, 0) = 20
close(4) = 0
stat(0x7fdc5894c282, 0x7ffe70c03840) = 0
openat(AT_FDCWD, 0x7fdc5894c2cd, O_RDONLY|O_CLOEXEC) = 4
fstat(4, 0x7ffe70c032e0) = 0
read(4, 0x1b35b40, 4096) = 9
read(4, "", 4096) = 0
close(4) = 0
futex(0x7fdc58b82a04, FUTEX_WAKE_PRIVATE, 2147483647) = 0
openat(AT_FDCWD, 0x7fdc5894c282, O_RDONLY|O_CLOEXEC) = 4
fstat(4, 0x7ffe70c03500) = 0
read(4, 0x1b35b40, 4096) = 85
read(4, "", 4096) = 0
fstat(4, 0x7ffe70c035c0) = 0
close(4) = 0
socket(AF_UNIX, SOCK_STREAM|SOCK_CLOEXEC|SOCK_NONBLOCK, 0) = 4
connect(4, 0x7ffe70c03580, 110) = -1 ENOENT (No such file or directory)
close(4) = 0
socket(AF_UNIX, SOCK_STREAM|SOCK_CLOEXEC|SOCK_NONBLOCK, 0) = 4
connect(4, 0x7ffe70c03740, 110) = -1 ENOENT (No such file or directory)
close(4) = 0
openat(AT_FDCWD, 0x7fdc585a3d70, O_RDONLY|O_CLOEXEC) = 4
fstat(4, 0x7ffe70c03720) = 0
lseek(4, 0, SEEK_SET) = 0
read(4, 0x1b35b40, 4096) = 1610
read(4, "", 4096) = 0
lseek(4, 0, SEEK_CUR) = 1610
close(4) = 0
setresuid(-1, 0, -1) = 0
umask(002) = 077
umask(007) = 002
openat(AT_FDCWD, 0x7ffe70c040b0, O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = 4
fstat(4, 0x7ffe70c03fc0) = 0
close(4) = 0
umask(077) = 007
geteuid() = 0
getegid() = 2
getuid() = 0
getgid() = 0
setresuid(-1, 2, -1) = 0
getpid() = 22
setresuid(-1, 0, -1) = 0
umask(002) = 077
umask(007) = 002
openat(AT_FDCWD, 0x1b2a760, O_WRONLY|O_CREAT|O_EXCL, 0666) = 4
unlink(0x1b2a760) = 0
close(4) = 0
umask(077) = 007
geteuid() = 0
getegid() = 2
getuid() = 0
getgid() = 0
setresuid(-1, 2, -1) = 0
uname(0x7ffe70c03f90) = 0
socket(AF_NETLINK, SOCK_RAW|SOCK_CLOEXEC, NETLINK_ROUTE) = 4
bind(4, 0x7ffe70c039d8, 12) = 0
getsockname(4, 0x7ffe70c039d8, 0x7ffe70c039d4) = 0
sendto(4, 0x7ffe70c03a40, 20, 0, 0x7ffe70c039e4, 12) = 20
recvmsg(4, 0x7ffe70c03a00, 0) = 252
recvmsg(4, 0x7ffe70c03a00, 0) = 72
recvmsg(4, 0x7ffe70c03a00, 0) = 20
close(4) = 0
stat(0x7fdc5894c282, 0x7ffe70c03700) = 0
openat(AT_FDCWD, 0x7fdc585a3d70, O_RDONLY|O_CLOEXEC) = 4
fstat(4, 0x7ffe70c035d0) = 0
lseek(4, 0, SEEK_SET) = 0
read(4, 0x1b35b40, 4096) = 1610
read(4, "", 4096) = 0
lseek(4, 0, SEEK_CUR) = 1610
close(4) = 0
openat(AT_FDCWD, 0x7fdc596fae24, O_RDONLY|O_CLOEXEC) = 4
fstat(4, 0x7ffe70c02ce0) = 0
mmap(NULL, 10263, PROT_READ, MAP_PRIVATE, 4, 0) = 0x7fdc59900000
close(4) = 0
openat(AT_FDCWD, 0x1b3de00, O_RDONLY|O_CLOEXEC) = 4
read(4, 0x7ffe70c02e58, 832) = 832
fstat(4, 0x7ffe70c02ce0) = 0
mmap(NULL, 2121968, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 4, 0) = 0x7fdc57b93000
mprotect(0x7fdc57b98000, 2097152, PROT_NONE) = 0
mmap(0x7fdc57d98000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 4, 0x5000) = 0x7fdc57d98000
close(4) = 0
openat(AT_FDCWD, 0x1b3de40, O_RDONLY|O_CLOEXEC) = 4
read(4, 0x7ffe70c027c8, 832) = 832
fstat(4, 0x7ffe70c02650) = 0
mmap(NULL, 2194080, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 4, 0) = 0x7fdc5797b000
mprotect(0x7fdc5798f000, 2097152, PROT_NONE) = 0
mmap(0x7fdc57b8f000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 4, 0x14000) = 0x7fdc57b8f000
mmap(0x7fdc57b91000, 6816, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7fdc57b91000
close(4) = 0
mprotect(0x7fdc57b8f000, 4096, PROT_READ) = 0
mprotect(0x7fdc57d98000, 4096, PROT_READ) = 0
munmap(0x7fdc59900000, 10263) = 0
socket(AF_INET, SOCK_DGRAM|SOCK_CLOEXEC|SOCK_NONBLOCK, IPPROTO_IP) = 4
setsockopt(4, SOL_IP, IP_RECVERR, 0x7ffe70c020e4, 4) = 0
connect(4, 0x7fdc58b82a34, 16) = 0
poll(0x7ffe70c02268, 1, 0) = 1 ([0x7ffe70c02268])
sendto(4, 0x7ffe70c02390, 37, MSG_NOSIGNAL, NULL, 0) = 37
poll(0x7ffe70c02268, 1, 5000) = 1 ([0x7ffe70c02268])
close(4) = 0
socket(AF_INET, SOCK_DGRAM|SOCK_CLOEXEC|SOCK_NONBLOCK, IPPROTO_IP) = 4
setsockopt(4, SOL_IP, IP_RECVERR, 0x7ffe70c020e4, 4) = 0
connect(4, 0x7fdc58b82a44, 16) = 0
poll(0x7ffe70c02268, 1, 0) = 1 ([0x7ffe70c02268])
sendto(4, 0x7ffe70c02390, 37, MSG_NOSIGNAL, NULL, 0) = 37
poll(0x7ffe70c02268, 1, 3000) = 1 ([0x7ffe70c02268])
ioctl(4, FIONREAD, 0x7ffe70c0222c) = 0
recvfrom(4, 0x7ffe70c02f20, 1024, 0, 0x7ffe70c02270, 0x7ffe70c02250) = 107
close(4) = 0
socket(AF_INET, SOCK_DGRAM|SOCK_CLOEXEC|SOCK_NONBLOCK, IPPROTO_IP) = 4
setsockopt(4, SOL_IP, IP_RECVERR, 0x7ffe70c020e4, 4) = 0
connect(4, 0x7fdc58b82a34, 16) = 0
poll(0x7ffe70c02268, 1, 0) = 1 ([0x7ffe70c02268])
sendto(4, 0x7ffe70c02390, 24, MSG_NOSIGNAL, NULL, 0) = 24
poll(0x7ffe70c02268, 1, 5000) = 1 ([0x7ffe70c02268])
close(4) = 0
socket(AF_INET, SOCK_DGRAM|SOCK_CLOEXEC|SOCK_NONBLOCK, IPPROTO_IP) = 4
setsockopt(4, SOL_IP, IP_RECVERR, 0x7ffe70c020e4, 4) = 0
connect(4, 0x7fdc58b82a44, 16) = 0
poll(0x7ffe70c02268, 1, 0) = 1 ([0x7ffe70c02268])
sendto(4, 0x7ffe70c02390, 24, MSG_NOSIGNAL, NULL, 0) = 24
poll(0x7ffe70c02268, 1, 3000) = 1 ([0x7ffe70c02268])
ioctl(4, FIONREAD, 0x7ffe70c0222c) = 0
recvfrom(4, 0x7ffe70c02f20, 1024, 0, 0x7ffe70c02270, 0x7ffe70c02250) = 99
close(4) = 0
openat(AT_FDCWD, 0x7fdc596fae24, O_RDONLY|O_CLOEXEC) = 4
fstat(4, 0x7ffe70c02cd0) = 0
mmap(NULL, 10263, PROT_READ, MAP_PRIVATE, 4, 0) = 0x7fdc59900000
close(4) = 0
openat(AT_FDCWD, 0x1b2a730, O_RDONLY|O_CLOEXEC) = 4
read(4, 0x7ffe70c02e48, 832) = 832
lseek(4, 672016, SEEK_SET) = 672016
read(4, 0x7ffe70c02d20, 32) = 32
fstat(4, 0x7ffe70c02cd0) = 0
lseek(4, 672016, SEEK_SET) = 672016
read(4, 0x7ffe70c029f0, 32) = 32
mmap(NULL, 2800040, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 4, 0) = 0x7fdc576cf000
mprotect(0x7fdc57774000, 2093056, PROT_NONE) = 0
mmap(0x7fdc57973000, 32768, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 4, 0xa4000) = 0x7fdc57973000
close(4) = 0
openat(AT_FDCWD, 0x1b2b950, O_RDONLY|O_CLOEXEC) = 4
read(4, 0x7ffe70c027b8, 832) = 832
fstat(4, 0x7ffe70c02640) = 0
mmap(NULL, 2128832, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 4, 0) = 0x7fdc574c7000
mprotect(0x7fdc574ce000, 2093056, PROT_NONE) = 0
mmap(0x7fdc576cd000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 4, 0x6000) = 0x7fdc576cd000
close(4) = 0
openat(AT_FDCWD, 0x1b2b990, O_RDONLY|O_CLOEXEC) = 4
read(4, 0x7ffe70c02798, 832) = 832
lseek(4, 348832, SEEK_SET) = 348832
read(4, 0x7ffe70c02670, 32) = 32
fstat(4, 0x7ffe70c02620) = 0
lseek(4, 348832, SEEK_SET) = 348832
read(4, 0x7ffe70c02340, 32) = 32
mmap(NULL, 2462976, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 4, 0) = 0x7fdc5726d000
mprotect(0x7fdc572c3000, 2093056, PROT_NONE) = 0
mmap(0x7fdc574c2000, 16384, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 4, 0x55000) = 0x7fdc574c2000
mmap(0x7fdc574c6000, 1280, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7fdc574c6000
close(4) = 0
openat(AT_FDCWD, 0x1b2ba10, O_RDONLY|O_CLOEXEC) = 4
read(4, 0x7ffe70c026f8, 832) = 832
lseek(4, 312384, SEEK_SET) = 312384
read(4, 0x7ffe70c025d0, 32) = 32
fstat(4, 0x7ffe70c02580) = 0
lseek(4, 312384, SEEK_SET) = 312384
read(4, 0x7ffe70c022a0, 32) = 32
mmap(NULL, 2434848, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 4, 0) = 0x7fdc5701a000
mprotect(0x7fdc57067000, 2093056, PROT_NONE) = 0
mmap(0x7fdc57266000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 4, 0x4c000) = 0x7fdc57266000
mmap(0x7fdc5726c000, 1824, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7fdc5726c000
close(4) = 0
openat(AT_FDCWD, 0x1b2ba50, O_RDONLY|O_CLOEXEC) = 4
read(4, 0x7ffe70c026d8, 832) = 832
lseek(4, 25296, SEEK_SET) = 25296
read(4, 0x7ffe70c025b0, 32) = 32
fstat(4, 0x7ffe70c02560) = 0
lseek(4, 25296, SEEK_SET) = 25296
read(4, 0x7ffe70c02280, 32) = 32
mmap(NULL, 2125856, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 4, 0) = 0x7fdc56e12000
mprotect(0x7fdc56e19000, 2093056, PROT_NONE) = 0
mmap(0x7fdc57018000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 4, 0x6000) = 0x7fdc57018000
mmap(0x7fdc57019000, 32, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7fdc57019000
close(4) = 0
openat(AT_FDCWD, 0x1b2ba90, O_RDONLY|O_CLOEXEC) = 4
read(4, 0x7ffe70c026b8, 832) = 832
lseek(4, 157400, SEEK_SET) = 157400
read(4, 0x7ffe70c02590, 32) = 32
fstat(4, 0x7ffe70c02540) = 0
lseek(4, 157400, SEEK_SET) = 157400
read(4, 0x7ffe70c02260, 32) = 32
mmap(NULL, 2270704, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 4, 0) = 0x7fdc56be7000
mprotect(0x7fdc56c0e000, 2097152, PROT_NONE) = 0
mmap(0x7fdc56e0e000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 4, 0x27000) = 0x7fdc56e0e000
mmap(0x7fdc56e10000, 5616, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7fdc56e10000
close(4) = 0
openat(AT_FDCWD, 0x1b2bb10, O_RDONLY|O_CLOEXEC) = 4
read(4, 0x7ffe70c02698, 832) = 832
lseek(4, 533040, SEEK_SET) = 533040
read(4, 0x7ffe70c02570, 32) = 32
fstat(4, 0x7ffe70c02520) = 0
lseek(4, 533040, SEEK_SET) = 533040
read(4, 0x7ffe70c02270, 32) = 32
mmap(NULL, 2634280, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 4, 0) = 0x7fdc56963000
mprotect(0x7fdc569e6000, 2093056, PROT_NONE) = 0
mmap(0x7fdc56be5000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 4, 0x82000) = 0x7fdc56be5000
close(4) = 0
openat(AT_FDCWD, 0x1b2bb50, O_RDONLY|O_CLOEXEC) = 4
read(4, 0x7ffe70c02678, 832) = 832
fstat(4, 0x7ffe70c02500) = 0
mmap(NULL, 2109600, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 4, 0) = 0x7fdc5675f000
mprotect(0x7fdc56762000, 2093056, PROT_NONE) = 0
mmap(0x7fdc56961000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 4, 0x2000) = 0x7fdc56961000
close(4) = 0
mprotect(0x7fdc56961000, 4096, PROT_READ) = 0
mprotect(0x7fdc56be5000, 4096, PROT_READ) = 0
mprotect(0x7fdc56e0e000, 4096, PROT_READ) = 0
mprotect(0x7fdc57018000, 4096, PROT_READ) = 0
mprotect(0x7fdc57266000, 20480, PROT_READ) = 0
mprotect(0x7fdc576cd000, 4096, PROT_READ) = 0
mprotect(0x7fdc574c2000, 12288, PROT_READ) = 0
mprotect(0x7fdc57973000, 28672, PROT_READ) = 0
statfs(0x7fdc56c07033, 0x7ffe70c030c0) = 0
statfs(0x7fdc56c0703a, 0x7ffe70c030c0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, 0x7fdc56c07017, O_RDONLY|O_CLOEXEC) = 4
fstat(4, 0x7ffe70c02fa0) = 0
read(4, 0x1b293c0, 1024) = 369
close(4) = 0
openat(AT_FDCWD, 0x7fdc56c07043, O_RDONLY|O_CLOEXEC) = 4
fstat(4, 0x7ffe70c02ff0) = 0
read(4, 0x1b293c0, 1024) = 1024
read(4, 0x1b293c0, 1024) = 1024
read(4, 0x1b293c0, 1024) = 105
read(4, "", 1024) = 0
close(4) = 0
access(0x7fdc56c0705b, F_OK) = -1 ENOENT (No such file or directory)
munmap(0x7fdc59900000, 10263) = 0
rt_sigprocmask(SIG_BLOCK, 0x7ffe70c03570, 0x7ffe70c03780, 8) = 0
uname(0x7ffe70c03580) = 0
rt_sigprocmask(SIG_SETMASK, 0x7ffe70c03780, NULL, 8) = 0
socket(AF_INET6, SOCK_STREAM, IPPROTO_IP) = 4
close(4) = 0
socket(AF_INET, SOCK_STREAM, IPPROTO_IP) = 4
rt_sigaction(SIGPIPE, 0x7ffe70c03c80, NULL, 8) = 0
fcntl(4, F_GETFL) = 0x2 (flags O_RDWR)
fcntl(4, F_SETFL, O_RDWR|O_NONBLOCK) = 0
setresuid(-1, 0, -1) = 0
setresgid(-1, 0, -1) = 0
setsockopt(4, SOL_SOCKET, SO_REUSEADDR, 0x7ffe70c03e60, 4) = 0
bind(4, 0x1b39f00, 16) = 0
geteuid() = 0
getegid() = 0
getuid() = 0
getgid() = 0
setresuid(-1, 0, -1) = 0
setresgid(-1, 2, -1) = 0
setresuid(-1, 2, -1) = 0
listen(4, 31) = 0
epoll_ctl(3, EPOLL_CTL_ADD, 4, 0x7ffe70c03e24) = 0
getsockname(4, 0x1b3a080, 0x1b3a100) = 0
socket(AF_INET6, SOCK_STREAM, IPPROTO_IP) = 5
fcntl(5, F_GETFL) = 0x2 (flags O_RDWR)
fcntl(5, F_SETFL, O_RDWR|O_NONBLOCK) = 0
setresuid(-1, 0, -1) = 0
setresgid(-1, 0, -1) = 0
setsockopt(5, SOL_SOCKET, SO_REUSEADDR, 0x7ffe70c03e60, 4) = 0
setsockopt(5, SOL_IPV6, IPV6_V6ONLY, 0x7ffe70c03e80, 4) = 0
bind(5, 0x1b39fe0, 28) = 0
geteuid() = 0
getegid() = 0
getuid() = 0
getgid() = 0
setresuid(-1, 0, -1) = 0
setresgid(-1, 2, -1) = 0
setresuid(-1, 2, -1) = 0
listen(5, 31) = 0
epoll_ctl(3, EPOLL_CTL_ADD, 5, 0x7ffe70c03e24) = 0
getsockname(5, 0x1b3a080, 0x1b3a100) = 0
socket(AF_INET, SOCK_STREAM, IPPROTO_IP) = 6
fcntl(6, F_GETFL) = 0x2 (flags O_RDWR)
fcntl(6, F_SETFL, O_RDWR|O_NONBLOCK) = 0
setresuid(-1, 0, -1) = 0
setresgid(-1, 0, -1) = 0
setsockopt(6, SOL_SOCKET, SO_REUSEADDR, 0x7ffe70c03e20, 4) = 0
bind(6, 0x1b2a5c0, 16) = 0
geteuid() = 0
getegid() = 0
getuid() = 0
getgid() = 0
setresuid(-1, 0, -1) = 0
setresgid(-1, 2, -1) = 0
setresuid(-1, 2, -1) = 0
listen(6, 31) = 0
epoll_ctl(3, EPOLL_CTL_ADD, 6, 0x7ffe70c03de4) = 0
getsockname(6, 0x1b2b4b0, 0x1b2b530) = 0
socket(AF_INET6, SOCK_STREAM, IPPROTO_IP) = 7
fcntl(7, F_GETFL) = 0x2 (flags O_RDWR)
fcntl(7, F_SETFL, O_RDWR|O_NONBLOCK) = 0
setresuid(-1, 0, -1) = 0
setresgid(-1, 0, -1) = 0
setsockopt(7, SOL_SOCKET, SO_REUSEADDR, 0x7ffe70c03e20, 4) = 0
setsockopt(7, SOL_IPV6, IPV6_V6ONLY, 0x7ffe70c03e40, 4) = 0
bind(7, 0x1b3a140, 28) = 0
geteuid() = 0
getegid() = 0
getuid() = 0
getgid() = 0
setresuid(-1, 0, -1) = 0
setresgid(-1, 2, -1) = 0
setresuid(-1, 2, -1) = 0
listen(7, 31) = 0
epoll_ctl(3, EPOLL_CTL_ADD, 7, 0x7ffe70c03de4) = 0
getsockname(7, 0x1b2b4b0, 0x1b2b530) = 0
setresuid(-1, 0, -1) = 0
setresgid(-1, 0, -1) = 0
umask(002) = 077
umask(002) = 002
umask(077) = 002
geteuid() = 0
getegid() = 0
getuid() = 0
getgid() = 0
setresuid(-1, 0, -1) = 0
setresgid(-1, 2, -1) = 0
setresuid(-1, 2, -1) = 0
setresuid(-1, 0, -1) = 0
umask(002) = 077
umask(022) = 002
umask(077) = 022
geteuid() = 0
getegid() = 2
getuid() = 0
getgid() = 0
setresuid(-1, 2, -1) = 0
stat(0x7fdc58949e59, 0x7ffe70c04720) = 0
getsockname(4, 0x1b2b4b0, 0x1b2b530) = 0
getpid() = 22
socket(AF_UNIX, SOCK_DGRAM|SOCK_CLOEXEC, 0) = 8
connect(8, 0x7fdc58b81a20, 110) = -1 ENOENT (No such file or directory)
close(8) = 0
write(2, 0x1b39093, 46emailrelay: info: smtp server on 0.0.0.0:2525
) = 46
getsockname(5, 0x1b2b4b0, 0x1b2b530) = 0
getpid() = 22
socket(AF_UNIX, SOCK_DGRAM|SOCK_CLOEXEC, 0) = 8
connect(8, 0x7fdc58b81a20, 110) = -1 ENOENT (No such file or directory)
close(8) = 0
write(2, 0x1b39093, 41emailrelay: info: smtp server on ::.2525
) = 41
getsockname(6, 0x1b2b4b0, 0x1b2b530) = 0
getpid() = 22
socket(AF_UNIX, SOCK_DGRAM|SOCK_CLOEXEC, 0) = 8
connect(8, 0x7fdc58b81a20, 110) = -1 ENOENT (No such file or directory)
close(8) = 0
write(2, 0x1b39093, 47emailrelay: info: admin server on 0.0.0.0:4321
) = 47
getsockname(7, 0x1b2b4b0, 0x1b2b530) = 0
getpid() = 22
socket(AF_UNIX, SOCK_DGRAM|SOCK_CLOEXEC, 0) = 8
connect(8, 0x7fdc58b81a20, 110) = -1 ENOENT (No such file or directory)
close(8) = 0
write(2, 0x1b39093, 42emailrelay: info: admin server on ::.4321
) = 42
getpid() = 22
socket(AF_UNIX, SOCK_DGRAM|SOCK_CLOEXEC, 0) = 8
connect(8, 0x7fdc58b81a20, 110) = -1 ENOENT (No such file or directory)
close(8) = 0
write(2, 0x1b39092, 53emailrelay: info: forwarding to nfswindsor.tinc:2525
) = 53
epoll_wait(3, 0x1b3d930, 8, -1) = 1
setresuid(-1, 0, -1) = 0
setresgid(-1, 0, -1) = 0
accept(4, 0x1b2b4b0, 0x1b2b530) = 8
fcntl(8, F_GETFL) = 0x2 (flags O_RDWR)
fcntl(8, F_SETFL, O_RDWR|O_NONBLOCK) = 0
geteuid() = 0
getegid() = 0
getuid() = 0
getgid() = 0
setresuid(-1, 0, -1) = 0
setresgid(-1, 2, -1) = 0
setresuid(-1, 2, -1) = 0
getsockname(4, 0x1b2b4b0, 0x1b2b530) = 0
epoll_ctl(3, EPOLL_CTL_ADD, 8, 0x7ffe70c04004) = 0
stat(0x7fdc58949e59, 0x7ffe70c03f30) = 0
getpid() = 22
socket(AF_UNIX, SOCK_DGRAM|SOCK_CLOEXEC, 0) = 9
connect(9, 0x7fdc58b81a20, 110) = -1 ENOENT (No such file or directory)
close(9) = 0
write(2, 0x1b39093, 56emailrelay: info: smtp connection from 172.17.0.1:44336
) = 56
getpid() = 22
socket(AF_UNIX, SOCK_DGRAM|SOCK_CLOEXEC, 0) = 9
connect(9, 0x7fdc58b81a20, 110) = -1 ENOENT (No such file or directory)
close(9) = 0
write(2, 0x1b39093, 85emailrelay: info: tx>>: "220 linuxf:0.localnet -- E-MailRelay V2.6 -- Service ready"
) = 85
sendto(8, 0x1b3d560, 60, MSG_NOSIGNAL, NULL, 0) = 60
epoll_wait(3, [], 9, 1000) = 0
epoll_wait(3, 0x1b3ad20, 9, 1798998) = 1
recvfrom(8, 0x1b2f500, 20000, 0, NULL, NULL) = 9
stat(0x7fdc58949e59, 0x7ffe70c04500) = 0
getpid() = 22
socket(AF_UNIX, SOCK_DGRAM|SOCK_CLOEXEC, 0) = 9
connect(9, 0x7fdc58b81a20, 110) = -1 ENOENT (No such file or directory)
close(9) = 0
write(2, 0x1b39097, 34emailrelay: info: rx<<: "helo ww"
) = 34
getpid() = 22
socket(AF_UNIX, SOCK_DGRAM|SOCK_CLOEXEC, 0) = 9
connect(9, 0x7fdc58b81a20, 110) = -1 ENOENT (No such file or directory)
close(9) = 0
write(2, 0x1b39093, 36emailrelay: info: tx>>: "250 hello"
) = 36
sendto(8, 0x1b3e0d0, 11, MSG_NOSIGNAL, NULL, 0) = 11
epoll_wait(3, 0x1b3ad20, 9, 1800000) = 1
recvfrom(8, 0x1b2f500, 20000, 0, NULL, NULL) = 23
stat(0x7fdc58949e59, 0x7ffe70c04500) = 0
getpid() = 22
socket(AF_UNIX, SOCK_DGRAM|SOCK_CLOEXEC, 0) = 9
connect(9, 0x7fdc58b81a20, 110) = -1 ENOENT (No such file or directory)
close(9) = 0
write(2, 0x1b39097, 48emailrelay: info: rx<<: "mail from: ss@s.com"
) = 48
getpid() = 22
socket(AF_UNIX, SOCK_DGRAM|SOCK_CLOEXEC, 0) = 9
connect(9, 0x7fdc58b81a20, 110) = -1 ENOENT (No such file or directory)
close(9) = 0
write(2, 0x1b39093, 51emailrelay: info: tx>>: "250 sender ss@s.com OK"
) = 51
sendto(8, 0x1b39e20, 26, MSG_NOSIGNAL, NULL, 0) = 26
getpid() = 22
getpid() = 22
socket(AF_UNIX, SOCK_DGRAM|SOCK_CLOEXEC, 0) = 9
connect(9, 0x7fdc58b81a20, 110) = -1 ENOENT (No such file or directory)
close(9) = 0
write(2, 0x1b39091, 72emailrelay: info: new content file [emailrelay.22.1741964141.1.content]
) = 72
setresuid(-1, 0, -1) = 0
umask(002) = 077
umask(007) = 002
openat(AT_FDCWD, 0x1b40530, O_WRONLY|O_CREAT|O_TRUNC, 0666) = 9
umask(077) = 007
geteuid() = 0
getegid() = 2
getuid() = 0
getgid() = 0
setresuid(-1, 2, -1) = 0
epoll_wait(3, 0x1b3ad20, 9, 1799999) = 1
recvfrom(8, 0x1b2f500, 20000, 0, NULL, NULL) = 21
stat(0x7fdc58949e59, 0x7ffe70c04500) = 0
getpid() = 22
socket(AF_UNIX, SOCK_DGRAM|SOCK_CLOEXEC, 0) = 10
connect(10, 0x7fdc58b81a20, 110) = -1 ENOENT (No such file or directory)
close(10) = 0
write(2, 0x1b39097, 46emailrelay: info: rx<<: "rcpt to: ww@q.com"
) = 46
getpid() = 22
socket(AF_UNIX, SOCK_DGRAM|SOCK_CLOEXEC, 0) = 10
connect(10, 0x7fdc58b81a20, 110) = -1 ENOENT (No such file or directory)
close(10) = 0
write(2, 0x1b390a0, 152emailrelay: info: address verifier: executing [/config/app/emailrelay/verify.sh] [ww@q.com] [ss@s.com] [172.17.0.1:44336] [linuxf:0.localnet] [none] []
) = 152
socketpair(AF_UNIX, SOCK_DGRAM, 0, 0x7ffe70c03f68) = 0
fcntl(10, F_GETFL) = 0x2 (flags O_RDWR)
fcntl(10, F_SETFL, O_RDWR|O_NONBLOCK) = 0
fcntl(11, F_GETFL) = 0x2 (flags O_RDWR)
fcntl(11, F_SETFL, O_RDWR|O_NONBLOCK) = 0
epoll_ctl(3, EPOLL_CTL_ADD, 10, 0x7ffe70c03e94) = 0
socketpair(AF_UNIX, SOCK_STREAM, 0, 0x1b3d930) = 0
geteuid() = 2
getegid() = 2
clone(child_stack=NULL, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0x7fdc598f9a10) = 24
close(13) = 0
rt_sigprocmask(SIG_BLOCK, 0x7ffe70c03fc0, NULL, 8) = 0
clone(child_stack=0x7fdc58599fb0, flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SYSVSEM|CLONE_SETTLS|CLONE_PARENT_SETTID|CLONE_CHILD_CLEARTID, parent_tid=0x7fdc5859a9d0, tls=0x7fdc5859a700, child_tidptr=0x7fdc5859a9d0) = 25
rt_sigprocmask(SIG_BLOCK, 0x7ffe70c03f40, 0x7ffe70c03fc0, 8) = 0
rt_sigprocmask(SIG_SETMASK, 0x7ffe70c03fc0, NULL, 8) = 0
epoll_wait(3,
The critical part -- the exec() call -- is missing because I forgot to say "strace -f ...".
I think "strace -b execve" might be useful to avoid tracing into your script, although I have never tried it myself.
Also try "strace -e trace=process" to cut down on the noise.
The trace is showing userid switching to userid 2. You should add "--user=root" to stop all switching while testing.
Please also check the directory permissions for all the directories from "/" to your script (each of /, /config, /config/app and /config/app/emailrelay). The effective userid will need exectute permission on them all.
(I also note that there are a lot of datagram socket connect() calls failing, apparently when writing to the syslog. You might be able to save a few CPU cycles by checking your syslog configuration.)
New strace:
execve("/usr/local/sbin/emailrelay", ["emailrelay", "--syslog", "--log", "-v", "--no-daemon", "--port", "2525", "--admin", "4321", "--user=root", "--remote-clients", "--forward-on-disconnect", "--forward-to", "nfswindsor.tinc:2525", "--spool-dir", "/spool/", "--address-verifier=verify.sh"], 0x7ffee26f1f28 / 7 vars /) = 0
clone(child_stack=0x7f2d3b69efb0, flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SYSVSEM|CLONE_SETTLS|CLONE_PARENT_SETTID|CLONE_CHILD_CLEARTIDstrace: Process 26 attached
, parent_tid=[26], tls=0x7f2d3b69f700, child_tidptr=0x7f2d3b69f9d0) = 26
[pid 26] exit(0) = ?
[pid 26] +++ exited with 0 +++
emailrelay: info: smtp server on 0.0.0.0:2525
emailrelay: info: smtp server on ::.2525
emailrelay: info: admin server on 0.0.0.0:4321
emailrelay: info: admin server on ::.4321
emailrelay: info: forwarding to nfswindsor.tinc:2525
emailrelay: info: smtp connection from 172.17.0.1:49248
emailrelay: info: tx>>: "220 linuxf:0.localnet -- E-MailRelay V2.6 -- Service ready"
emailrelay: info: rx<<: "helo rr"
emailrelay: info: tx>>: "250 hello"
emailrelay: info: rx<<: "mail from: ww@ww.cxom"
emailrelay: info: tx>>: "250 sender ww@ww.cxom OK"
emailrelay: info: new content file [emailrelay.25.1741968900.1.content]
emailrelay: info: rx<<: "rcpt to: ww@qq.com"
emailrelay: info: address verifier: executing [/config/app/emailrelay/verify.sh] [ww@qq.com] [ww@ww.cxom] [172.17.0.1:49248] [linuxf:0.localnet] [none] []
clone(child_stack=NULL, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0x7f2d3c7eba10) = 27
strace: Process 27 attached
[pid 25] clone(child_stack=0x7f2d3b69efb0, flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SYSVSEM|CLONE_SETTLS|CLONE_PARENT_SETTID|CLONE_CHILD_CLEARTIDstrace: Process 28 attached
, parent_tid=[28], tls=0x7f2d3b69f700, child_tidptr=0x7f2d3b69f9d0) = 28
Directories
drwxr-xr-x. 31 root root 4096 Mar 9 15:26 config
drwxr-xr-x. 131 root root 4096 Mar 10 16:11 app
drwxr-xr-x 2 root root 41 Mar 14 16:13 emailrelay
And for /
drwxr-xr-x 1 root root 70 Mar 14 14:55 .
drwxr-xr-x 1 root root 70 Mar 14 14:55 ..
So the verifier execve() is not showing in the trace, even with strace's "-f" option. But I notice your "app" and "config" directories have an extra "." after the permissions, which apparently indicates some sort of SELinux secutity setting. Is SELinux hijacking the exec() system call before strace gets to see it? It's not something I know a lot about. Can you see if there is a SELinux log, or try disabling it temporarily?
selinux is disabled?
getenforce
Disabled
I think I mucked up the -f side with the -e... So without the -e:
write(2, "emailrelay: info: rx<<: \"rcpt to"..., 45emailrelay: info: rx<<: "rcpt to: q@w.com"
) = 45
getpid() = 25
socket(AF_UNIX, SOCK_DGRAM|SOCK_CLOEXEC, 0) = 10
connect(10, {sa_family=AF_UNIX, sun_path="/dev/log"}, 110) = -1 ENOENT (No such file or directory)
close(10) = 0
write(2, "emailrelay: info: address verifi"..., 152emailrelay: info: address verifier: executing [/config/app/emailrelay/verify.sh] [q@w.com] [qq@qq.com] [172.17.0.1:47828] [linuxf:0.localnet] [none] []
) = 152
socketpair(AF_UNIX, SOCK_DGRAM, 0, [10, 11]) = 0
fcntl(10, F_GETFL) = 0x2 (flags O_RDWR)
fcntl(10, F_SETFL, O_RDWR|O_NONBLOCK) = 0
fcntl(11, F_GETFL) = 0x2 (flags O_RDWR)
fcntl(11, F_SETFL, O_RDWR|O_NONBLOCK) = 0
epoll_ctl(3, EPOLL_CTL_ADD, 10, {events=EPOLLIN, data={u32=10, u64=10}}) = 0
socketpair(AF_UNIX, SOCK_STREAM, 0, [12, 13]) = 0
clone(child_stack=NULL, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLDstrace: Process 27 attached
, child_tidptr=0x7fd1f41cea10) = 27
[pid 25] close(13 <unfinished ...="">
[pid 27] set_robust_list(0x7fd1f41cea20, 24 <unfinished ...="">
[pid 25] <... close resumed>) = 0
[pid 27] <... set_robust_list resumed>) = 0
[pid 25] rt_sigprocmask(SIG_BLOCK, [HUP INT QUIT TERM], NULL, 8) = 0
[pid 27] close(12 <unfinished ...="">
[pid 25] clone(child_stack=0x7fd1f3081fb0, flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SYSVSEM|CLONE_SETTLS|CLONE_PARENT_SETTID|CLONE_CHILD_CLEARTID <unfinished ...="">
[pid 27] <... close resumed>) = 0
strace: Process 28 attached
[pid 25] <... clone resumed>, parent_tid=[28], tls=0x7fd1f3082700, child_tidptr=0x7fd1f30829d0) = 28
[pid 27] dup2(13, 1 <unfinished ...="">
[pid 25] rt_sigprocmask(SIG_BLOCK, [], <unfinished ...="">
[pid 28] set_robust_list(0x7fd1f30829e0, 24 <unfinished ...="">
[pid 27] <... dup2 resumed>) = 1
[pid 25] <... rt_sigprocmask resumed>[HUP INT QUIT TERM], 8) = 0
[pid 28] <... set_robust_list resumed>) = 0
[pid 27] close(13 <unfinished ...="">
[pid 25] rt_sigprocmask(SIG_SETMASK, [], <unfinished ...="">
[pid 28] read(12, <unfinished ...="">
[pid 27] <... close resumed>) = 0
[pid 25] <... rt_sigprocmask resumed>NULL, 8) = 0
[pid 25] epoll_wait(3, <unfinished ...="">
[pid 27] openat(AT_FDCWD, "/dev/null", O_WRONLY) = 12
[pid 27] dup2(12, 2) = 2
[pid 27] openat(AT_FDCWD, "/dev/null", O_RDONLY) = 13
[pid 27] dup2(13, 0) = 0
[pid 27] fcntl(0, F_SETFD, 0) = 0
[pid 27] fcntl(1, F_SETFD, 0) = 0
[pid 27] fcntl(2, F_SETFD, 0) = 0
[pid 27] prlimit64(0, RLIMIT_NOFILE, NULL, {rlim_cur=1073741816, rlim_max=1073741816}) = 0
[pid 27] close(3) = 0
[pid 27] close(4) = 0
[pid 27] close(5) = 0
[pid 27] close(6) = 0
[pid 27] close(7) = 0
[pid 27] close(8) = 0
[pid 27] close(9) = 0
[pid 27] close(10) = 0
[pid 27] close(11) = 0
[pid 27] close(12) = 0
[pid 27] close(13) = 0
[pid 27] close(14) = -1 EBADF (Bad file descriptor)
[pid 27] close(15) = -1 EBADF (Bad file descriptor)
[pid 27] close(16) = -1 EBADF (Bad file descriptor)
[pid 27] close(17) = -1 EBADF (Bad file descriptor)
[pid 27] close(18) = -1 EBADF (Bad file descriptor)
[pid 27] close(19) = -1 EBADF (Bad file descriptor)
[pid 27] close(20) = -1 EBADF (Bad file descriptor)
[pid 27] close(21) = -1 EBADF (Bad file descriptor)
[pid 27] close(22) = -1 EBADF (Bad file descriptor)
[pid 27] close(23) = -1 EBADF (Bad file descriptor)
[pid 27] close(24) = -1 EBADF (Bad file descriptor)
[pid 27] close(25) = -1 EBADF (Bad file descriptor)
[pid 27] close(26) = -1 EBADF (Bad file descriptor)
[pid 27] close(27) = -1 EBADF (Bad file descriptor)
[pid 27] close(28) = -1 EBADF (Bad file descriptor)
[pid 27] close(29) = -1 EBADF (Bad file descriptor)
[pid 27] close(30) = -1 EBADF (Bad file descriptor)
[pid 27] close(31) = -1 EBADF (Bad file descriptor)
[pid 27] close(32) = -1 EBADF (Bad file descriptor)
[pid 27] close(33) = -1 EBADF (Bad file descriptor)
[pid 27] close(34) = -1 EBADF (Bad file descriptor)
[pid 27] close(35) = -1 EBADF (Bad file descriptor)
[pid 27] close(36) = -1 EBADF (Bad file descriptor)
[pid 27] close(37) = -1 EBADF (Bad file descriptor)
[pid 27] close(38) = -1 EBADF (Bad file descriptor)
[pid 27] close(39) = -1 EBADF (Bad file descriptor)
[pid 27] close(40) = -1 EBADF (Bad file descriptor)
[pid 27] close(41) = -1 EBADF (Bad file descriptor)
[pid 27] close(42) = -1 EBADF (Bad file descriptor)
[pid 27] close(43) = -1 EBADF (Bad file descriptor)
[pid 27] close(44) = -1 EBADF (Bad file descriptor)
[pid 27] close(45) = -1 EBADF (Bad file descriptor)
[pid 27] close(46) = -1 EBADF (Bad file descriptor)
[pid 27] close(47) = -1 EBADF (Bad file descriptor)
[pid 27] close(48) = -1 EBADF (Bad file descriptor)
[pid 27] close(49) = -1 EBADF (Bad file descriptor)
[pid 27] close(50) = -1 EBADF (Bad file descriptor)
[pid 27] close(51) = -1 EBADF (Bad file descriptor)
[pid 27] close(52) = -1 EBADF (Bad file descriptor)
[pid 27] close(53) = -1 EBADF (Bad file descriptor)
[pid 27] close(54) = -1 EBADF (Bad file descriptor)
[pid 27] close(55) = -1 EBADF (Bad file descriptor)
[pid 27] close(56) = -1 EBADF (Bad file descriptor)
[pid 27] close(57) = -1 EBADF (Bad file descriptor)
[pid 27] close(58) = -1 EBADF (Bad file descriptor)
[pid 27] close(59) = -1 EBADF (Bad file descriptor)
[pid 27] close(60) = -1 EBADF (Bad file descriptor)
[pid 27] close(61) = -1 EBADF (Bad file descriptor)
[pid 27] close(62) = -1 EBADF (Bad file descriptor)
[pid 27] close(63) = -1 EBADF (Bad file descriptor)
[pid 27] close(64) = -1 EBADF (Bad file descriptor)
[pid 27] close(65) = -1 EBADF (Bad file descriptor)</unfinished></unfinished></unfinished></unfinished></unfinished></unfinished></unfinished></unfinished></unfinished></unfinished></unfinished>
The bad file descriptor error repeats thousands of times until I kill the process.
You can ignore the close errors. When running as a detached daemon process it is a good idea to close unused inherited file descriptors so as to not stop file systems from being unmounted. Unfortunately it is not possible to get a list of open file descriptors, so you have to close potentially hundreds of file descriptors that are already closed. You can take off the emailrelay --daemon option to stop it doing that.
I am hoping that you will get an strace output that shows the verifier process being fork()ed (cloned) and then exec()ed, with the exec() showing the path of the script and an error like EPERM.
Please could you also check whether you get the same behaviour when running a "--filter" script.