前提・実現したいこと
無線ルータで接続されたLAN内のPC同士で、
mailコマンドによるメールの送受信を行いたいのですが、
なにぶん知識がなく困っております。
PCのOSは macOS X 10.14.3,
ルータは WHR-G300N を使用しています。
試したこと
ルータの初期設定では、ネットワークアドレスが192.168.11.0/24、
ルータのIPアドレスは192.168.11.1 となっています。
ひとまず使用するPCのホスト名を、machine01, machine02 として、
IPアドレスをそれぞれ 192.168.11.2, 192.168.11.3 としました。
次に、machine01の /etc/hosts に
192.168.11.3 machine02
と追記、 machine02の方でも同様に、machine01のIPアドレスを追記しました。
ルータ側の設定ですが、「DHCPリース」という項目があったのでそこに
上2つのIPアドレスとMACアドレスの登録を行いました。
ここまで設定をして、
ping machine02
などを試してみると、しっかり反応が返ってきます。
ただ
echo "test" | mail -s "Test" user@machine02
とメールを送ろうとしても、相手側に届きません。
また自分自身にも、エラー通知のメール等は返ってきませんでした。
postfixの再起動も試しましたが、ダメでした。
念のため、/etc/postfix/main.cf の内容を質問文の後に貼り付けておきます。
(文字数制限のためコメントの部分を削りましたが、実際は初期状態から変更はしていません)
私の知識では、他にどこの設定を変更すれば良いのかわかりません。
どうかよろしくお願いします。
maincf
1 2 3compatibility_level = 2 4 5#soft_bounce = no 6 7 8queue_directory = /private/var/spool/postfix 9 10command_directory = /usr/sbin 11 12daemon_directory = /usr/libexec/postfix 13 14data_directory = /var/lib/postfix 15 16 17mail_owner = _postfix 18 19 20#default_privs = nobody 21 22 23#myhostname = host.domain.tld 24#myhostname = virtual.domain.tld 25 26 27#mydomain = domain.tld 28 29#myorigin = $myhostname 30#myorigin = $mydomain 31 32 33#inet_interfaces = all 34#inet_interfaces = $myhostname 35#inet_interfaces = $myhostname, localhost 36 37 38#proxy_interfaces = 39#proxy_interfaces = 1.2.3.4 40 41 42#mydestination = $myhostname, localhost.$mydomain, localhost 43#mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain 44#mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain, 45# mail.$mydomain, www.$mydomain, ftp.$mydomain 46 47 48#local_recipient_maps = unix:passwd.byname $alias_maps 49#local_recipient_maps = proxy:unix:passwd.byname $alias_maps 50#local_recipient_maps = 51 52 53unknown_local_recipient_reject_code = 550 54 55 56#mynetworks_style = class 57#mynetworks_style = subnet 58#mynetworks_style = host 59 60 61#mynetworks = 168.100.189.0/28, 127.0.0.0/8 62#mynetworks = $config_directory/mynetworks 63#mynetworks = hash:/etc/postfix/network_table 64 65 66#relay_domains = $mydestination 67 68 69#relayhost = $mydomain 70#relayhost = [gateway.my.domain] 71#relayhost = [mailserver.isp.tld] 72#relayhost = uucphost 73#relayhost = [an.ip.add.ress] 74 75#relay_recipient_maps = hash:/etc/postfix/relay_recipients 76 77 78#in_flow_delay = 1s 79 80 81#alias_maps = dbm:/etc/aliases 82#alias_maps = hash:/etc/aliases 83#alias_maps = hash:/etc/aliases, nis:mail.aliases 84#alias_maps = netinfo:/aliases 85 86#alias_database = dbm:/etc/aliases 87#alias_database = dbm:/etc/mail/aliases 88#alias_database = hash:/etc/aliases 89#alias_database = hash:/etc/aliases, hash:/opt/majordomo/aliases 90 91 92#recipient_delimiter = + 93 94 95#home_mailbox = Mailbox 96#home_mailbox = Maildir/ 97 98#mail_spool_directory = /var/mail 99#mail_spool_directory = /var/spool/mail 100 101 102#mailbox_command = /some/where/procmail 103#mailbox_command = /some/where/procmail -a "$EXTENSION" 104 105#mailbox_transport = lmtp:unix:/var/imap/socket/lmtp 106 107#mailbox_transport = cyrus 108 109 110#fallback_transport = lmtp:unix:/file/name 111#fallback_transport = cyrus 112#fallback_transport = 113 114#luser_relay = $user@other.host 115#luser_relay = $local@other.host 116#luser_relay = admin+$local 117 118#header_checks = regexp:/etc/postfix/header_checks 119 120 121#fast_flush_domains = $relay_domains 122 123 124#smtpd_banner = $myhostname ESMTP $mail_name 125#smtpd_banner = $myhostname ESMTP $mail_name ($mail_version) 126 127 128#local_destination_concurrency_limit = 2 129#default_destination_concurrency_limit = 20 130 131 132debug_peer_level = 2 133 134#debug_peer_list = 127.0.0.1 135#debug_peer_list = some.domain 136 137 138debugger_command = 139 PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin 140 ddd $daemon_directory/$process_name $process_id & sleep 5 141 142 143sendmail_path = /usr/sbin/sendmail 144 145# newaliases_path: The full pathname of the Postfix newaliases command. 146# This is the Sendmail-compatible command to build alias databases. 147# 148newaliases_path = /usr/bin/newaliases 149 150# mailq_path: The full pathname of the Postfix mailq command. This 151# is the Sendmail-compatible mail queue listing command. 152# 153mailq_path = /usr/bin/mailq 154 155# setgid_group: The group for mail submission and queue management 156# commands. This must be a group name with a numerical group ID that 157# is not shared with other accounts, not even with the Postfix account. 158# 159setgid_group = _postdrop 160 161# html_directory: The location of the Postfix HTML documentation. 162# 163html_directory = /usr/share/doc/postfix/html 164 165# manpage_directory: The location of the Postfix on-line manual pages. 166# 167manpage_directory = /usr/share/man 168 169# sample_directory: The location of the Postfix sample configuration files. 170# This parameter is obsolete as of Postfix 2.1. 171# 172sample_directory = /usr/share/doc/postfix/examples 173 174# readme_directory: The location of the Postfix README files. 175# 176readme_directory = /usr/share/doc/postfix 177inet_protocols = all 178 179# Apple Defaults 180# 181message_size_limit = 10485760 182mailbox_size_limit = 0 183biff = no 184mynetworks = 127.0.0.0/8, [::1]/128 185smtpd_client_restrictions = permit_mynetworks permit_sasl_authenticated permit 186recipient_delimiter = + 187tls_random_source = dev:/dev/urandom 188smtpd_tls_ciphers = medium 189 190