PostfixでのSMTPサーバーの立ち上げに成功し、ローカルでのメールのやり取りと外部(gmail)から送られてくるメールの受信に成功しました。しかし外部(gmail)への送信がうまく行きません。telnetでアクセスしメール送信を試みると
554 5.7.1 <送信先アドレス>: Relay access denied
というエラーが出ます。
自力で調べたところSMTP認証たるものをしなくてはならないとありましたが、手順がどうも要領を得ず(書いてあることがばらばらで何を信じるべきかよくわからない状態です)質問させていただいた次第です。この問題の解決のため、手順の方向性をご教示いただきたいです。
main.cf
compatibility_level = 2 queue_directory = /var/spool/postfix command_directory = /usr/bin daemon_directory = /usr/lib/postfix/bin data_directory = /var/lib/postfix mail_owner = postfix #default_privs = nobody myhostname = mail.mydomain.com #myhostname = virtual.domain.tld mydomain = mydomain.com #myorigin = $myhostname myorigin = $mydomain inet_interfaces = all #inet_interfaces = $myhostname #inet_interfaces = $myhostname, localhost #proxy_interfaces = #proxy_interfaces = 1.2.3.4 #mydestination = $myhostname, localhost.$mydomain, localhost mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain #mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain, # mail.$mydomain, www.$mydomain, ftp.$mydomain #local_recipient_maps = unix:passwd.byname $alias_maps #local_recipient_maps = proxy:unix:passwd.byname $alias_maps #local_recipient_maps = unknown_local_recipient_reject_code = 550 #mynetworks_style = class #mynetworks_style = 192.168.0.1/24 mynetworks_style = 127.0.0.0/24 mynetworks = 168.100.189.0/28, 127.0.0.0/8 #mynetworks = $config_directory/mynetworks #mynetworks = hash:/etc/postfix/network_table relay_domains = $mydestination # INTERNET OR INTRANET #relayhost = $mydomain #relayhost = [gateway.my.domain] #relayhost = [mailserver.isp.tld] #relayhost = uucphost #relayhost = [an.ip.add.ress] #relay_recipient_maps = hash:/etc/postfix/relay_recipients #in_flow_delay = 1s #alias_maps = dbm:/etc/aliases #alias_maps = hash:/etc/aliases #alias_maps = hash:/etc/aliases, nis:mail.aliases #alias_maps = netinfo:/aliases alias_maps = hash:/etc/postfix/aliases #alias_database = dbm:/etc/aliases #alias_database = dbm:/etc/mail/aliases #alias_database = hash:/etc/aliases #alias_database = hash:/etc/aliases, hash:/opt/majordomo/aliases alias_database = $alias_maps #recipient_delimiter = + #home_mailbox = Mailbox #home_mailbox = Maildir/ mail_spool_directory = /srv/mail #mail_spool_directory = /var/spool/mail #mailbox_command = /some/where/procmail #mailbox_command = /some/where/procmail -a "$EXTENSION" #mailbox_transport = cyrus #fallback_transport = lmtp:unix:/file/name #fallback_transport = cyrus #fallback_transport = #luser_relay = $user@other.host #luser_relay = $local@other.host #luser_relay = admin+$local header_checks = regexp:/etc/postfix/header_checks #fast_flush_domains = $relay_domains smtpd_banner = $myhostname ESMTP #smtpd_banner = $myhostname ESMTP $mail_name ($mail_version) #local_destination_concurrency_limit = 2 #default_destination_concurrency_limit = 20 debug_peer_level = 2 #debug_peer_list = 127.0.0.1 #debug_peer_list = some.domain debugger_command = PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin ddd $daemon_directory/$process_name $process_id & sleep 5 # debugger_command = # PATH=/bin:/usr/bin:/sbin:/usr/sbin; export PATH; screen # -dmS $process_name gdb $daemon_directory/$process_name # $process_id & sleep 1 # INSTALL-TIME CONFIGURATION INFORMATION # # The following parameters are used when installing a new Postfix version. # # sendmail_path: The full pathname of the Postfix sendmail command. # This is the Sendmail-compatible mail posting interface. # sendmail_path = /usr/bin/sendmail # newaliases_path: The full pathname of the Postfix newaliases command. # This is the Sendmail-compatible command to build alias databases. # newaliases_path = /usr/bin/newaliases # mailq_path: The full pathname of the Postfix mailq command. This # is the Sendmail-compatible mail queue listing command. # mailq_path = /usr/bin/mailq # setgid_group: The group for mail submission and queue management # commands. This must be a group name with a numerical group ID that # is not shared with other accounts, not even with the Postfix account. # setgid_group = postdrop # html_directory: The location of the Postfix HTML documentation. # html_directory = no # manpage_directory: The location of the Postfix on-line manual pages. # manpage_directory = /usr/share/man # sample_directory: The location of the Postfix sample configuration files. # This parameter is obsolete as of Postfix 2.1. # sample_directory = /etc/postfix # readme_directory: The location of the Postfix README files. # readme_directory = /usr/share/doc/postfix inet_protocols = ipv4 meta_directory = /etc/postfix shlib_directory = /usr/lib/postfix message_size_limit = 5242880 disable_vrfy_command = yes smtpd_helo_required = yes strict_rfc821_envelopes = yes allow_percent_hack = yes swap_bangpath = yes allow_untrusted_routing = no smtpd_client_restrictions = permit_mynetworks, reject_unknown_client, permit smtpd_data_restrictions = reject_unauth_pipelining, reject_multi_recipient_bounce smtpd_helo_restrictions = permit_mynetworks, reject_invalid_hostname, reject_non_fqdn_hostname, reject_unknown_hostname, permit smtpd_sender_restrictions = permit_mynetworks, reject_unknown_sender_domain, reject_non_fqdn_sender, permit smtpd_recipient_restrictions = permit_mynetworks, reject_non_fqdn_recipient, reject_unknown_recipient_domain, reject_unauth_destination, permit smtpd_etrn_restrictions = permit_mynetworks, reject_invalid_hostname, permit
不足の情報などあればお手数をおかけし大変恐縮でありますが、ご指摘いただけると幸いです。よろしくお願いいたします。
回答2件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2018/07/06 13:01