GNU social JP
  • FAQ
  • Login
GNU social JPは日本のGNU socialサーバーです。
Usage/ToS/admin/test/Pleroma FE
  • Public

    • Public
    • Network
    • Groups
    • Featured
    • Popular
    • People

Embed Notice

HTML Code

Corresponding Notice

  1. Embed this notice
    zunda (zundan@mastodon.zunda.ninja)'s status on Friday, 22-Dec-2023 10:46:53 JSTzundazunda
    in reply to
    • かき@GNUsocialJP

    僕の使っているコマンドラインツールの #ひかえめなアドベントカレンダー2023 12月21日分はmailです。postfixとlogwatchも入れてメールを送ってもらいます…コマンドラインツールじゃないな…。

    Ubuntuなどではpostfix bsd-mailxを入れてメールを送るコマンドmailとメールを配送するサービスpostfixを利用します。

    Googleでアカウントを作って(常用のものを使うと乗っ取りを疑われてかスパムとして扱われる確率が増えました)、MFAを有効にしてアプリケーションパスワードを作って /etc/postfix/sasl/passwd に記録します。chmod og-rwxするのを忘れない。sudo postmap /etc/postfix/sasl/passwd しておきます。

    [smtp.gmail.com]:587 ユーザーID@gmail.com:****

    postfixはInternet siteとして設定して、/etc/postfix/main.cf の対応する行を編集して sudo service postfix restart します。

    relayhost = [smtp.gmail.com]:587
    smtp_sasl_auth_enable = yes
    smtp_sasl_password_maps = hash:/etc/postfix/sasl/passwd
    smtp_sasl_security_options = noanonymous
    smtp_use_tls = yes
    inet_interfaces = localhost

    これでメールを送れるようになります。

    $ echo "Hi!" | mail -s Test 自分のメールアドレス

    rootへのメールをローカルユーザー経由で自分に転送します。/etc/aliases に下記のような行を追記して、sudo newaliasesします。

    root: ローカルユーザーID

    ローカルユーザーの~/.forwardに自分のメールアドレスを書いておきます。

    sudo visudoしてDefaultsをmail_badpassからmail_alwaysにするとsudoするたびにメールをもらえます。logwatchパッケージを入れると毎日syslogなどのまとめを送ってもらえます。文字数

    In conversationFriday, 22-Dec-2023 10:46:53 JST from mastodon.zunda.ninjapermalink

    Attachments


    1. No result found on File_thumbnail lookup.
      Gmail
      Gmail is email that’s intuitive, efficient, and useful. 15 GB of storage, less spam, and mobile access.
  • Help
  • About
  • FAQ
  • TOS
  • Privacy
  • Source
  • Version
  • Contact

GNU social JP is a social network, courtesy of GNU social JP管理人. It runs on GNU social, version 2.0.2-dev, available under the GNU Affero General Public License.

Creative Commons Attribution 3.0 All GNU social JP content and data are available under the Creative Commons Attribution 3.0 license.