ソスソスソスソスソスhソスソスソスCソスソスソスソスソスソスソス[ソスソスソスフ集ソスソス(Fetchmail)

ソスナ終ソスXソスVソスソスソスF 2022.12.13

ソスソスソスTソスv

ソスソスソスソスソスhソスソスソスCソスソスソスソスソスフソスソス[ソスソスソスソスソスソスソスソスTソス[ソスoソス[ソスフソスソス[ソスソスソスAソスhソスソスソスXソスソスソスノ集ソスすゑソスB
ソスソスソスソスソスナは、ソスvソスソスソスoソスCソス_ソスAソスJソスEソスソスソスgソスソスソスソスソス[ソスソスソスAGMailソスAソスJソスEソスソスソスgソスソスソスソスソス[ソスソスソスAHotmailソスAソスJソスEソスソスソスgソスソスソスソスソス[ソスソスソスソスFetchmailソスナ趣ソスソスメソス[ソスソスソスTソス[ソスoソス[ソスノ趣ソス闕橸ソズ。

ソスソスソスソスソス[ソスソスソスTソス[ソスoソス[ソス\ソスzソスマでゑソスソス驍アソスソス


ソスソスFetchmailソスCソスソスソスXソスgソス[ソスソス

[root@centos ~]# yum -y install fetchmailソス@ソスソスソス@FetchmailソスCソスソスソスXソスgソス[ソスソス

ソスソスFetchmailソスン抵ソス

ソスiソスPソスjFetchmailソスン抵ソス
Fetchmailソスフ設抵ソスヘ各ソスソスソス[ソスUソス[ソスナ行ソスネゑソスソスB
ソスソスソスソスソスナは、ソスvソスソスソスoソスCソス_ソスAソスJソスEソスソスソスgソスソスソスソスソス[ソスソスソスAGMailソスAソスJソスEソスソスソスgソスソスソスソスソス[ソスソスソスAHotmailソスAソスJソスEソスソスソスgソスソスソスソスソス[ソスソスソスソスcentosソスソスソス[ソスUソス[ソスソスソスソス闕橸ソズゑソスソスフとゑソスソスソスB
[centos@centos ~]$ vi .fetchmailrcソス@ソスソスソス@Fetchmailソスン抵ソスtソス@ソスCソスソスソス成
# ソスソスソスハ設抵ソス
set daemon 300 # 300ソスbソスヤ隔ソスナソスソス[ソスソスソス`ソスFソスbソスNソスソスソスsソスネゑソス
set postmaster root # ソスナ終ソスIソスネソスソス[ソスソスソスフ托ソスソスMソスソス
set no bouncemail # ソスGソスソスソス[ソスソスソス[ソスソスソスソスpostmasterソスノ托ソスソスソス
set invisible # Receivedソスwソスbソス_ソスソスfetchmailソスソスソスソスソスソスソスソスソスワなゑソス
set syslog # ソスソスソスOソスソス/var/log/maillogソスノ記ソス^ソスソスソスソス

# ソスSソスTソス[ソスoソス[ソスソスソスハデソスtソスHソスソスソスgソスン抵ソス
defaults
  bad-header accept # ソスwソスbソス_ソスル擾ソスフゑソスソス驛ソス[ソスソスソスソスソスソス闕橸ソスソス
  protocol auto
  no mimedecode
  no fetchall # ソスソスソスヌソスソス[ソスソスソスフみ趣ソス闕橸ソズ場合
  #fetchall # ソスソスソスヌ・ソスソスソスヌにゑソスソスソスソスソス轤クソスSソストのソスソス[ソスソスソスソスソスソス闕橸ソズ場合
  no keep # ソスソス闕橸ソスだソスソス[ソスソスソスソスソスTソス[ソスoソス[ソス繧ゥソスソス除ソスソスソスソス鼾
  #keep # ソスソス闕橸ソスだソスソス[ソスソスソスソスソスTソス[ソスoソス[ソスソスノ残ソスソスソストゑソスソスソスソス鼾

# ソスvソスソスソスoソスCソス_ソスAソスJソスEソスソスソスgソスソスソスソスソス[ソスソスソスソス闕橸ソスン設抵ソスソスソスPOP3Sソスソスソス供ゑソスソスソストゑソスソスソス鼾
poll xxxxxxxx # ソスvソスソスソスoソスCソス_ソスソスMソスソスソス[ソスソスソスTソス[ソスoソス[ソスソス
  protocol pop3
  port 995
  username "xxxxxxxx" # ソスvソスソスソスoソスCソス_ソスソスソス[ソスUソス[ソスソス
  password "xxxxxxxx" # ソスvソスソスソスoソスCソス_ソスpソスXソスソスソス[ソスh
  ssl
  is centos here  # ソス]ソスソスソス諠ソス[ソスUソス[ソスソス

# ソスvソスソスソスoソスCソス_ソスAソスJソスEソスソスソスgソスソスソスソスソス[ソスソスソスソス闕橸ソスン設抵ソスソスソスPOP3ソスフみゑソスPOP3Sソスソスソス供ゑソスソスソストゑソスソスネゑソスソス鼾
poll xxxxxxxx # ソスvソスソスソスoソスCソス_ソスソスMソスソスソス[ソスソスソスTソス[ソスoソス[ソスソス
  username "xxxxxxxx" # ソスvソスソスソスoソスCソス_ソスソスソス[ソスUソス[ソスソス
  password "xxxxxxxx" # ソスvソスソスソスoソスCソス_ソスpソスXソスソスソス[ソスh
  is centos here  # ソス]ソスソスソス諠ソス[ソスUソス[ソスソス

# GMailソスAソスJソスEソスソスソスgソスソスソスソスソス[ソスソスソスソス闕橸ソスン設抵ソス
poll pop.gmail.com
  protocol pop3
  port 995
  user "xxxxxxxx" # GMailソスソスソス[ソスUソス[ソスソス
  pass "xxxxxxxx" # GMailソスpソスXソスソスソス[ソスh
  ssl
  is centos here  # ソス]ソスソスソス諠ソス[ソスUソス[ソスソス

# HotmailソスAソスJソスEソスソスソスgソスソスソスソスソス[ソスソスソスソス闕橸ソスン設抵ソス
poll imap-mail.outlook.com # ソスvソスソスソスoソスCソス_ソスソスMソスソスソス[ソスソスソスTソス[ソスoソス[ソスソス
  protocol imap
  port 993
  username "[email protected]" # Hotmailソスソスソス[ソスUソス[ソスソス
  password "xxxxxxxx" # HotmailソスpソスXソスソスソス[ソスh
  is centos here  # ソス]ソスソスソス諠ソス[ソスUソス[ソスソス

# HotmailソスAソスJソスEソスソスソスgソスソスソスソスソス[ソスソスソスiソスソスソスfソスソスソス[ソスソスソスjソスソス闕橸ソスン設抵ソス
poll imap-mail.outlook.com # ソスvソスソスソスoソスCソス_ソスソスMソスソスソス[ソスソスソスTソス[ソスoソス[ソスソス
  protocol imap
  port 993
  username "[email protected]" # Hotmailソスソスソス[ソスUソス[ソスソス
  password "xxxxxxxx" # HotmailソスpソスXソスソスソス[ソスh
  ssl
  folder Junk
  is centos here  # ソス]ソスソスソス諠ソス[ソスUソス[ソスソス

[centos@centos ~]$ chmod 600 .fetchmailrcソス@ソスソスソス@Fetchmailソスン抵ソスtソス@ソスCソスソスソスフパソス[ソス~ソスbソスVソスソスソスソスソスソスソスソスソスLソスメ以外ソスQソスニでゑソスソスネゑソスソス謔、ソスノゑソスソスソス

ソスiソスQソスjGMailソスン抵ソス(GMailソスAソスJソスEソスソスソスgソスソスソスソスソス[ソスソスソスソスソスソス闕橸ソズ場合ソスフゑソス)
2ソスiソスKソスFソスリプソスソスソスZソスXソスソスLソスソスソスノゑソスソスソスソスAソスAソスvソスソスソスpソスXソスソスソス[ソスhソスナソスソスOソスCソスソスソスソスソスソスソスソスソスソスソス{ソスソスソスト作成ソスソスソスソスソスuソスAソスvソスソスソスpソスXソスソスソス[ソスhソスvソスソスGMailソスpソスXソスソスソス[ソスhソスノ指ソス閧キソスソス
GMailソスフ設抵ソスソスPOPソスAソスNソスZソスXソスソスLソスソスソスノゑソスソスソス
ソスワゑソスソスAFetchmailソスン抵ソスソスno keepソスiソスソス闕橸ソスだソスソス[ソスソスソスソスソスTソス[ソスoソス[ソス繧ゥソスソス除ソスソスソスソスjソスン抵ソスソスソスsソスソスソス鼾ソスAソスuPOP ソスナソスソス[ソスソスソスノアソスNソスZソスXソスソスソスソス鼾ソスvソスナ「Gmailソスフソスソス[ソスソスソスソスソス除ソスソスソスソスvソスソスIソスソスソスAkeepソスiソスソス闕橸ソスだソスソス[ソスソスソスソスソスTソス[ソスoソス[ソスソスノ残ソスソスソストゑソスソスソスソスjソスン抵ソスソスソスsソスソスソス鼾ソスAソスuPOP ソスナソスソス[ソスソスソスノアソスNソスZソスXソスソスソスソス鼾ソスvソスナ「Gmailソスフソスソス[ソスソスソスソスソスソスソスヌにゑソスソスソスvソスソスIソスソスソスソスソスソスB

ソスiソスRソスjHotmilソスン抵ソス(HotmailソスAソスJソスEソスソスソスgソスソスソスソスソス[ソスソスソスソスソスソス闕橸ソズ場合ソスフゑソス)
Outlook.comソスフソスソス[ソスソスソスAソスhソスソスソスXソスソスソスAソスソスソス[ソスソスソスNソスソスソスCソスAソスソスソスgソスナ使ソスpソスソスソスソス@POPソスTソス[ソスoソス[ソスメ⇒【ソスソスソスOソスノ必ソスvソスネ設抵ソスz

ソスソスFetchmailソスNソスソス

ソスVソスXソスeソスソスソスNソスソスソスソスソスソスfetchmailソスン定ユソス[ソスUソス[(ソスzソス[ソスソスソスfソスBソスソスソスNソスgソスソスソスソス.fetchmailrcソスソスソスソスソス驛ソス[ソスUソス[)ソスソスfetchmailソスソスソスソスソスソスソスNソスソスソスナゑソスソスソス謔、ソスノゑソスソスソスB
[root@centos ~]# vi /lib/systemd/system/[email protected]ソス@ソスソスソス@FetchmailソスNソスソスソスpsystemdソスeソスソスソスvソスソスソス[ソスgソス成
[Unit]
Description=A remote-mail retrieval utility
After=network.target postfix.service

[Service]
User=%I
ExecStart=/usr/bin/fetchmail
RestartSec=1

[Install]
WantedBy=multi-user.target

[root@centos ~]# vi fetchmail-start.shソス@ソスソスソス@ソスSソスソスソス[ソスUソス[FetchmailソスNソスソスソスXソスNソスソスソスvソスgソス成
#!/bin/bash

for user in `ls /home/`
do
    if [ -f /home/$user/.fetchmailrc ]; then
        echo "fetchmail for $user starting..."
        systemctl start fetchmail@$user
    fi
done

[root@centos ~]# vi /lib/systemd/system/fetchmail-start.serviceソス@ソスソスソス@ソスSソスソスソス[ソスUソス[FetchmailソスNソスソスソスpsystemdソスン抵ソスtソス@ソスCソスソスソス成
[Unit]
Description=Fetchmail Auto Start
After=network.target postfix.service

[Service]
Type=oneshot
ExecStart=/bin/sh /root/fetchmail-start.sh
RestartSec=1

[Install]
WantedBy=multi-user.target

[root@centos ~]# systemctl start fetchmail-startソス@ソスソスソス@ソスSソスソスソス[ソスUソス[FetchmailソスNソスソス

[root@centos ~]# systemctl enable fetchmail-startソス@ソスソスソス@ソスSソスソスソス[ソスUソス[FetchmailソスソスソスソスソスNソスソスソスン抵ソス

ソスソスFetchmailソスmソスF

ソスソス闕橸ソスン対象ソスソス[ソスソスソスAソスhソスソスソスXソスソスソスノテソスXソスgソスソスソス[ソスソスソス送信ソスソスソストみて、ソスソスソス[ソスソスソス`ソスFソスbソスNソスヤ隔ソスソスソスヤ経ソス゚鯉ソスAソスソスソスMソスソスソスソスソスeソスXソスgソスソスソス[ソスソスソスソスfetchmailソスNソスソスソスソスソス[ソスUソス[ソスソスソスノ届ゑソスソストゑソスソス驍アソスニゑソスソスmソスF


ソスソスソスヨ連ソスRソスソスソスeソスソスソスc

<!ソス\ソスeソスLソスXソスgソスフみゑソス4ソスsソス\ソスソスソスノ追会ソスソスソスCソスソスソスソスソスソス\>



ソスソスソスソスソスフペソス[ソスWソスフトソスbソスvソスヨ戻ゑソス

ソスvソスソスソスCソスoソスVソス[ソス|ソスソスソスVソス[
centossrv.com