2020/11/20

sendmail - 送不出..

phabricator 用 sendmail 寄公司內部信。
然後錢一陣子轉 vm 後,有人收不到 phabricator 的通知了。(據說是所有人都收步道..)

先看一下 /var/log/syslog...
...
Nov 20 11:20:01 franxx sm-msp-queue[9753]: My unqualified host name (franxx) unknown; sleeping for retry
Nov 20 11:21:01 franxx sm-msp-queue[9753]: unable to qualify my own domain name (franxx) -- using short name
Nov 20 11:24:34 franxx systemd[1]: Started Session 3645 of user darling.
Nov 20 11:39:01 franxx CRON[11008]: (root) CMD (  [ -x /usr/lib/php/sessionclean ] && if [ ! -d /run/systemd/system ]; then /usr/lib/php/sessionclean; fi)
Nov 20 11:39:01 franxx systemd[1]: Starting Clean php session files...
Nov 20 11:39:01 franxx systemd[1]: Started Clean php session files.
Nov 20 11:39:23 franxx sendmail[11087]: My unqualified host name (franxx) unknown; sleeping for retry
...
但是這個好像不影響,只是會慢一點。..

看一下sensmail 狀況..
$ sudo systemctl status sendmail
● sendmail.service - LSB: powerful, efficient, and scalable Mail Transport Agent
   Loaded: loaded (/etc/init.d/sendmail; bad; vendor preset: enabled)
   Active: active (running) since Mon 2020-10-26 14:14:32 CST; 3 weeks 3 days ago
     Docs: man:systemd-sysv-generator(8)
  Process: 1223 ExecStart=/etc/init.d/sendmail start (code=exited, status=0/SUCCESS)
    Tasks: 1
   Memory: 4.4M
      CPU: 53.028s
   CGroup: /system.slice/sendmail.service
           └─1615 sendmail: MTA: accepting connections 
           ov 18 15:24:34 franxx sm-mta[2047]: 0AD7L1bD018430: 0AI7OYgC002047: postmaster notify: User unknown
Nov 18 15:24:34 franxx sm-mta[2047]: 0AI7OYgC002047: to=MAILER-DAEMON, delay=00:00:00, mailer=local, pri=0, dsn=5.1.1, stat=User unknown
Nov 18 15:24:34 franxx sm-mta[2047]: 0AI7OYgC002047: to=postmaster, delay=00:00:00, mailer=local, pri=0, dsn=5.1.1, stat=User unknown
Nov 18 15:24:34 franxx sm-mta[2047]: 0AI7OYgC002047: 0AI7OYgD002047: return to sender: User unknown
Nov 18 15:24:34 franxx sm-mta[2047]: 0AI7OYgD002047: to=MAILER-DAEMON, delay=00:00:00, mailer=local, pri=0, dsn=5.1.1, stat=User unknown
Nov 18 15:24:34 franxx sm-mta[2047]: 0AI7OYgC002047: Saved message in /var/lib/sendmail/dead.letter
Nov 18 16:21:01 franxx sm-mta[3039]: 0AI8L1XF003039: from=<>, size=2253, class=0, nrcpts=1, msgid=<202011180821.0AI8L1I1003037@franxx>, pr
Nov 18 16:21:01 franxx sm-mta[3039]: 0AI8L1XF003039: to=, delay=00:00:00, mailer=local, pri=32253, dsn=4.4.3, stat=queued
Nov 18 16:21:01 franxx sm-mta[3039]: 0AI8L1XH003039: from=<>, size=2259, class=0, nrcpts=1, msgid=<202011180821.0AI8L1I2003037@franxx>, pr
Nov 18 16:21:01 franxx sm-mta[3039]: 0AI8L1XH003039: to=, delay=00:00:00, mailer=local, pri=32259, dsn=4.4.3, stat=queued
狀態正常,但是都記不出去。

看一下 phabricator: ref:testing outbound:
phabricator/ $ ./bin/mail list-outbound   # List outbound mail.
phabricator/ $ ./bin/mail show-outbound   # Show details about messages.
phabricator/ $ ./bin/mail send-test       # Send test messages.
看一下out-bound...
XXX:/opt/phabricator$ ./bin/mail list-outbound
263 Sent   D163: Fix: If low battery, the alert sound keep ringing in security screen after PND resume.
264 Sent   D162: Fix 2 issues.
265 Sent   D162: Fix 2 issues.
266 Sent   D164: Fix: If low battery, the alert sound keep ringing in security screen after PND resume.
267 Sent   D164: Fix: If low battery, the alert sound keep ringing in security screen after PND resume.
268 Sent   D164: Fix: If low battery, the alert sound keep ringing in security screen after PND resume.
269 Sent   D164: Fix: If low battery, the alert sound keep ringing in security screen after PND resume.
270 Sent   D164: Fix: If low battery, the alert sound keep ringing in security screen after PND resume.
271 Sent   D164: Fix: If low battery, the alert sound keep ringing in security screen after PND resume.
...
284 Sent   D167: Fix 3 suspend/wakeup issues.
285 Sent   D167: Fix 3 suspend/wakeup issues.
286 Sent   D168: Fix 3 suspend/wakeup issues.
287 Sent   D168: Fix 3 suspend/wakeup issues.
288 Sent   D167: Fix 3 suspend/wakeup issues.
289 Sent   D167: Fix 3 suspend/wakeup issues.
290 Sent   D168: Fix 3 suspend/wakeup issues.
291 Sent   D168: Fix 3 suspend/wakeup issues.
292 Sent   D168: Fix 3 suspend/wakeup issues.
293 Sent   D168: Fix 3 suspend/wakeup issues.
294 Sent   D167: Fix 3 suspend/wakeup issues.
295 Sent   D167: Fix 3 suspend/wakeup issues.
果然queue住一堆..


測試一下 sendmail 吧。(ref:how to test sendmail)
$ echo "from franzz" | sendmail -v charles.chang@localtek.com
WARNING: local host name (franxx) is not qualified; see cf/README: WHO AM I?
localtek.com: Name server timeout
charles.chang@localtek.com... Transient parse error -- message queued for future delivery
charles.chang@localtek.com... queued
果然,是 dns 的問題。

轉到 vm 時,dns 沒設定,所以沒動作,test ping google 也 fail
所以把 dns 設好後用 sendmail 測試 OK

沒有留言:

張貼留言