Ubuntu14.04でローカルネットワーク内だけで動くメールサーバーを作りたいのですが、うまくいきません。
postfixとdovecotをインストールて、localhostでのメール送受信はうまくいくのですが、
ネットワークの他のPCからポート143などにアクセスできません。
postfix/main.cfの設定は以下のとおり
main.cf
1 smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu) 2 biff = yes 3 4 # appending .domain is the MUA's job. 5 #append_dot_mydomain = no 6 mydomain = example.local 7 8 # Uncomment the next line to generate "delayed mail" warnings 9 #delay_warning_time = 4h 10 11 readme_directory = no 12 13 # TLS parameters 14 smtpd_tls_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem 15 smtpd_tls_key_file=/etc/ssl/private/ssl-cert-snakeoil.key 16 smtpd_use_tls=yes 17 smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache 18 smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache 19 20 # See /usr/share/doc/postfix/TLS_README.gz in the postfix-doc package for 21 # information on enabling SSL in the smtp client. 22 23 smtpd_relay_restrictions = permit_mynetworks permit_sasl_authenticated defer_unauth_destination 24 myhostname = Notice 25 alias_maps = hash:/etc/aliases 26 alias_database = hash:/etc/aliases 27 mydestination = Notice, localhost.localdomain, localhost, example.local 28 relayhost = 29 mynetworks = localhost, 192.168.11.0/24 30 mailbox_size_limit = 0 31 recipient_delimiter = + 32 inet_interfaces = all 33 default_transport = error 34 relay_transport = error 35 home_mailbox = Maildir/
/etc/dovecot/dovecot.conf
dovecot.conf
1 !include_try /usr/share/dovecot/protocols.d/*.protocol 2 listen = * 3 login_trusted_networks = 192.168.0.0/24 4 dict { 5 } 6 !include conf.d/*.conf 7 !include_try local.conf
このサイトを参考にしましたが、
telnet localhost 143はうまくいくのですが、
他のPCから telnet <IPADDRESS> 143は動きませんでした。
netstat では以下の様子が見られます。
netstat
1tcp 0 0 0.0.0.0:25 0.0.0.0:* LISTEN 2tcp 0 0 0.0.0.0:110 0.0.0.0:* LISTEN 3tcp 0 0 0.0.0.0:143 0.0.0.0:* LISTEN
お助けください。
-----追記-----
皆様ありがとうございます。
IPアドレスは固定されています。
メールサーバにしたいマシンへの
sshやping, Webサーバ, ntpのアクセスはできています。
iptablesの結果は長すぎて追記できないので一部だけですが。
iptables
1Chain ufw-after-input (1 references) 2target prot opt source destination 3ufw-skip-to-policy-input udp -- anywhere anywhere udp dpt:netbios-ns 4ufw-skip-to-policy-input udp -- anywhere anywhere udp dpt:netbios-dgm 5ufw-skip-to-policy-input tcp -- anywhere anywhere tcp dpt:netbios-ssn 6ufw-skip-to-policy-input tcp -- anywhere anywhere tcp dpt:microsoft-ds 7ufw-skip-to-policy-input udp -- anywhere anywhere udp dpt:bootps 8ufw-skip-to-policy-input udp -- anywhere anywhere udp dpt:bootpc 9ufw-skip-to-policy-input all -- anywhere anywhere ADDRTYPE match dst-type BROADCAST 10 11Chain ufw-before-forward (1 references) 12target prot opt source destination 13ACCEPT all -- anywhere anywhere ctstate RELATED,ESTABLISHED 14ACCEPT icmp -- anywhere anywhere icmp destination-unreachable 15ACCEPT icmp -- anywhere anywhere icmp source-quench 16ACCEPT icmp -- anywhere anywhere icmp time-exceeded 17ACCEPT icmp -- anywhere anywhere icmp parameter-problem 18ACCEPT icmp -- anywhere anywhere icmp echo-request 19ufw-user-forward all -- anywhere anywhere 20 21Chain ufw-before-input (1 references) 22target prot opt source destination 23ACCEPT all -- anywhere anywhere 24ACCEPT all -- anywhere anywhere ctstate RELATED,ESTABLISHED 25ufw-logging-deny all -- anywhere anywhere ctstate INVALID 26DROP all -- anywhere anywhere ctstate INVALID 27ACCEPT icmp -- anywhere anywhere icmp destination-unreachable 28ACCEPT icmp -- anywhere anywhere icmp source-quench 29ACCEPT icmp -- anywhere anywhere icmp time-exceeded 30ACCEPT icmp -- anywhere anywhere icmp parameter-problem 31ACCEPT icmp -- anywhere anywhere icmp echo-request 32ACCEPT udp -- anywhere anywhere udp spt:bootps dpt:bootpc 33ufw-not-local all -- anywhere anywhere 34ACCEPT udp -- anywhere 224.0.0.251 udp dpt:mdns 35ACCEPT udp -- anywhere 239.255.255.250 udp dpt:1900 36ufw-user-input all -- anywhere anywhere 37 38Chain ufw-user-input (1 references) 39target prot opt source destination 40ACCEPT tcp -- anywhere anywhere tcp dpt:ntp 41ACCEPT udp -- anywhere anywhere udp dpt:ntp 42ACCEPT tcp -- anywhere anywhere tcp dpt:http 43ACCEPT udp -- anywhere anywhere udp dpt:http 44ACCEPT tcp -- anywhere anywhere tcp dpt:domain 45ACCEPT udp -- anywhere anywhere udp dpt:domain 46ACCEPT tcp -- anywhere anywhere tcp dpt:domain 47ACCEPT udp -- anywhere anywhere udp dpt:domain 48ACCEPT tcp -- anywhere anywhere tcp dpt:ssh 49ACCEPT udp -- anywhere anywhere udp dpt:ssh 50ACCEPT tcp -- anywhere anywhere tcp dpt:ssh 51ACCEPT udp -- anywhere anywhere udp dpt:ntp 52 53Chain ufw-user-output (1 references) 54target prot opt source destination 55ACCEPT tcp -- anywhere anywhere tcp dpt:domain 56ACCEPT udp -- anywhere anywhere udp dpt:domain 57ACCEPT tcp -- anywhere anywhere tcp dpt:ntp 58ACCEPT udp -- anywhere anywhere udp dpt:ntp
回答1件