シスメモ

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

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

関連記事

no image

Postfixのメールキューを全て削除する

■Postfixのメールキューを全て削除する postsuper -d ALL を実行する。

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ドメインからのメールは問答 …

CentOS6.4にZabbix 2.0.6をインストール

photo credit: cdamian via photopin cc CentOS6.4にzabbix 2.0.6 をYUMからインストールします。 ※Apache/PHP/MySQLがインスト …

PLESKが動作するVPS上でopen_basedirを無効に設定する

photo credit: Scott Beale via photopin cc PLESKでドメイン設定の変更を行ったところ、以下のWarningが記録されるようになった。 PHP Warning …