Debianからメールを送信できるようにexim4の設定(gmail経由)
Debianからperlからsendmailでメールを送ろうとしたら送れませんでした。
原因を調べたところ
というわけで、exim4のスマートホストの設定をして、
Gmail経由でメールを送信するように設定しました。
参考:
http://d.hatena.ne.jp/jitsu102/20081223/1230038448
Debian Wiki
![スパム340g SPAM ポークランチョンミート 【沖縄特価】](http://a248.e.akamai.net/f/248/37952/1h/image.shopping.yahoo.co.jp/i/g/ok1_12)
![](http://atq.ad.valuecommerce.com/servlet/atq/gifbanner?sid=2219441&pid=877935733&vcptn=shpg%2Fp%2FNqNP7flCUN49xU3KOQg-)
mailコマンドで動作確認
無事に日本語メールも送信できていることも確認。
完璧っす。
Debianかわゆす
原因を調べたところ
satoshi@debian:~$ /usr/sbin/sendmailとなっていました。
Exim is a Mail Transfer Agent. It is normally called by Mail User Agents,
not directly from a shell command line. Options and/or arguments control
what it does when called. For a list of options, see the Exim documentation.
satoshi@debian:~$ ll /usr/sbin/sendmail
lrwxrwxrwx 1 root root 5 2009-07-15 00:00 /usr/sbin/sendmail -> exim4
というわけで、exim4のスマートホストの設定をして、
Gmail経由でメールを送信するように設定しました。
参考:
http://d.hatena.ne.jp/jitsu102/20081223/1230038448
Debian Wiki
mailコマンドで動作確認
satoshi@debian:~$ mail tanarky@yahoo.co.jp前回のPerlスクリプトを実行して、
Subject: Test
Hello!
.
Cc:
satoshi@debian:~$
無事に日本語メールも送信できていることも確認。
完璧っす。
Debianかわゆす