シスメモ

Linux(CentOS)、Windows(サーバー/クライアント)、Yamaha RTX、その他の技術メモ

CentOS6 Linux Postfix

【Postfix】gmail経由でメールを送信する

投稿日:

photo credit: liwyatan via photopin cc

photo credit: liwyatan via photopin cc

プロバイダのOPB25対策として、gmail経由でメールを送信できるように
Postfixを設定します。

1. /etc/postfix/main.cfに以下を追記します。

relayhost = [smtp.gmail.com]:587

smtp_use_tls = yes
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
smtp_sasl_tls_security_options = noanonymous
smtp_sasl_mechanism_filter = plain
smtp_sasl_security_options = noanonymous
smtp_tls_CApath = /etc/pki/tls/certs/ca-bundle.crt

2. sasl_passwdファイルを作成し、保有しているgmailのメールアドレスと
パスワードを入力します。

コマンド:vi /etc/postfix/sasl_passwd

入力内容:[smtp.gmail.com]:587 <メールアドレス>:<パスワード>

3. sasl_passwdファイルをデータベース化します。

コマンド:postmap /etc/postfix/sasl_passwd

※cyrus-sasl-plainがインストールされている必要があります

4. Postfixを再起動し、外部にメールを送信できることを確認します。



-CentOS6, Linux, Postfix
-, , , ,

執筆者:


comment

メールアドレスが公開されることはありません。 が付いている欄は必須項目です

関連記事

Postfix で「inet_protocols: IPv6 support is disabled」の警告が表示される

photo credit: liwyatan via photopin cc ■Postfix で「inet_protocols: IPv6 support is disabled」の警告が表示される …

no image

samba4.0でkinit実行時に「KDC reply did not match expectations~」と表示される

■kinit実行時に「KDC reply did not match expectations~」と表示される。 kinit [email protected] kinit: K …

/etc/passwd,/etc/groupだけでなく、LDAPのユーザー、グループも表示させる場合のコマンド

photo credit: *n3wjack’s world in pixels via photopin cc ■/etc/passwd,/etc/groupだけでなく、LDAPのユーザ …

CentOS6のcrontab

photo credit: hetaru via photopin cc ■CentOS6のcrontabについて centos6でcentos5以前のようにジョブを定時に実行するには、「cronie …

postfixで特定のトップレベルドメインからのメールを拒否する

photo credit: Alex.W IMG_0466 via photopin (license)   〜.topドメインからのスパムが増えてきたため、topドメインからのメールは問答 …