BlogもどきのWeblog

備忘録と日々の呟きとメモとCGIの実験場とされる何か。
プロフィール

GLANSHE
絵描き担当らしい

Total: 15787
Today: 122
Yesterday: 225
最新の記事

コンテンツ

最新のコメント

最新のトラックバック

カテゴリー

リンク

ニコ動MyListLink

Ubuntuメモ postfix
# aptitude install postfix
↓を見てほぼそのまま設定
http://www.geocities.jp/gokuraccoon/smtp.html

ハードリンクできないので
# cp -a /etc/sasldb2 /var/spool/postfix/etc/
で誤魔化す。

telnetでlocalhost:25に接続してsmtpしゃべったら
gmailにメールが届かないので調査

http://blog.fkoji.com/2008/12291614.html
を発見

設定箇所
/etc/postfix/main.cf

myhostname = xxxx.ocn.ne.jp
relay_domains = $mydestination
relayhost = [smtp.xxxx.ocn.ne.jp]

のみでpostfix再起動→gmailにメール届きました。

thunderbirdで認証通らないので試行錯誤
やったこと
# chgrp postfix /var/spool/postfix/etc/sasldb2
# vi /etc/default/saslauthd

START=no

START=yes

# /etc/init.d/saslauthd restart

上記の何してもメールのログが変わらなかった。
解決した方法

# vi /etc/postfix/main.cf

mydomain = xxxxx.jp
myhostname = xxxx.ocn.ne.jp

smtpd_sasl_auth_enable = yes
smtpd_sasl_local_domain = $myhostname
smtpd_recipient_restrictions =
permit_sasl_authenticated,
reject_unauth_destination
smtpd_sasl_security_options = noanonymous, noplaintext

smtpd_sasl_local_domainが、$myhostnameになってたのを
smtpd_sasl_local_domain = $myhostname

smtpd_sasl_local_domain = $mydomain
に変更。
gmailにメール飛ばす設定でmyhostnameを変えていたので、これが多分
認証用のsasldb2の設定で間違ってたんだと思う。

調べた先がService Temporarily Unavailableで見れなくてキャッシュから見た情報なので
一応こっちにもメモしておく

以下引用
>sendmail + sasl とかで CRAM-MD5 で SMTPAUTH してたときは、-u につけるドメイン(realm?)はたいした意味を持っていなかった (たとえば saslpasswd -u hoge ryuta とかやったときは user を "ryuta@hoge" とやれば良かった) ような気がするんですが、 Postfix + SASL の場合は /etc/postfix/main.cf の smtpd_sasl_local_domain と同じにしないと
>
>warning: SASL authentication failure: no secret in database
>
>と怒られました.

■引用元
つながらない…

メールが配送されるディレクトリを/home/[username]/Maildirに変更する。
デフォルト設定だと、メールが届くと/var/mail/[username]にファイルが作られて、
そこに全部受信メールが詰められる。(mailbox形式)
それによって/varが圧迫されるのが嫌なので、各ユーザの個人ディレクトリに置くようにする。

# vi /etc/postfix/main.cf

home_mailbox = Maildir/

を追加する。

再起動
# /etc/init.d/postfix restart


time stamp:2010/03/22 14:14:01
トラックバック(0)|コメント(0)
この記事のトラックバックURL:

コメントを書く
名前:
タイトル:
MAIL:
URL:
コメント:
PASS:
何かしら