• ベストアンサー

postfixのmailboxのパスを変更するには?

こんにちは。 smtp/popのmailboxのパスを変更したいのですが、 postfixのmain.cfの mail_spool_directory = /usr/local/app に変更し、再起動したのですが、変更されません。。。 ご存知の方、教えてください。

  • hige7
  • お礼率22% (6/27)

質問者が選んだベストアンサー

  • ベストアンサー
  • Lean
  • ベストアンサー率72% (435/603)
回答No.1

「mail_spool_directory」の変更でいいはずです。 ログになにもエラーらしきものは表示されていませんよね? また「postfix check」を実行して何もエラーは出力されない状態でしょうか? ちなみにmain.cfで「home_mailbox」が設定されている事はないですよね? もし、設定されているならコメントアウトして下さい。

関連するQ&A

  • Postfixのinstall_rootについて

    smtpサーバを構築しようとしています。 MTAはPostfixを採用するものとして、 インストールしたファイルの管理を一元化したいと考えてます。 任意のマウント領域内(/bob)の任意のフォルダ(/bob/mail)にインストールを行おうと考えました。 インストール環境は、 OS:linux ディストリ:Fedora8 です。 ソースからコンパイルします。 postfix-2.5.5.tar.gzを解凍し、root権限で、 # make # make install を行いました。 インストール時には、インストールパスを指定しようと考え、それぞれ以下の設定でインストールを行いました。 install_root:[/] /bob tempdir:[/root/postfix-2.5.5] config_directory:[/etc/postfix] /mail/etc/postfix command_directory:[/usr/sbin] /mail/usr/sbin daemon_directory:[/usr/libexec/postfix] /mail/usr/libexec/postfix data_directory:[/var/lib/postfix] /mail/var/lib/postfix html_directory:[no] mail_owner:[postfix] mailq_path:[/usr/bin/mailq] /mail/usr/bin/mailq manpage_directory:[/usr/local/man] /mail/usr/local/man newaliases_path:[/usr/bin/newaliases] /mail/usr/bin/newaliases queue_directory:[/var/spool/postfix] /mail/var/spool/postfix readme_directory:[no] sendmail_path:[/usr/sbin/sendmail] /mail/usr/sbin/sendmail setgid_group:[postdrop] ・・・インストールが完了したので、設定を確認しようとしました。 # /bob/mail/usr/sbin/postconf -n を行いましたが、エラーが出ました。 ■エラー文章: /bob/mail/usr/sbin/postconf: fatal: open /etc/postfix/main.cf: No such file or directory というメッセージが出ました。 読んだ通り、main.cfがありませんよ、見つかりませんよ、ということだと思いますが、 main.cfは存在しており、そのパスは /bob/mail/etc/postfix/main.cf なので、/etc/postfix/main.cfにはないです。 ですので、 # /bob/mail/usr/sbin/postconf -n の実行時に読み込みを /bob/mail/etc/postfix/main.cf に変更してしまいたいのですが、可能でしょうか。 過去の記事には同じような内容がなかったことと、 ネットや書籍を検索しましたが、install_rootはデフォルト値でのインストールの場合の設定しか発見できませんでしたので、今回投稿させていただきました。 設定を変更できる箇所などございましたら、ご教授お願いできませんでしょうか。 尚、語意不明な点などございましたら、ご指摘くださいますよう、よろしくお願いします。

  • Postfixで送信ができない

    /var/log/syslog 10:33 solaris postfix/smtp[18719]: [ID 947731 mail.crit] fatal: open database /etc/postfix/saslpasswd.db: No such file or directory 10:34 solaris postfix/master[18715]: [ID 947731 mail.warning] warning: process /usr/libexec/postfix/smtp pid 18719 exit status 1 10:34 solaris postfix/master[18715]: [ID 947731 mail.warning] warning: /usr/libexec/postfix/smtp: bad command startup -- throttling となっているのですがsaslpasswdはあります。saslpasswd.dbにするために何かコマンドを打つ必要があるのでしょうか? また、後に出ているsmtpのエラーがよくわかりません、参考になるサイトなどご紹介いただけると幸いです /etc/postfix/main.cf alias_maps = dbm:/etc/mail/aliases command_directory = /usr/sbin config_directory = /etc/postfix daemon_directory = /usr/libexec/postfix debug_peer_level = 2 inet_interfaces = all mail_owner = postfix mail_spool_directory = /var/spool/mail mailq_path = /usr/bin/mailq manpage_directory = /usr/local/man mydestination = $myhostname, localhost myhostname = solaris mynetworks = 192.168.1.2, 127.0.0.0/8 myorigin = $myhostname newaliases_path = /usr/bin/newaliases queue_directory = /var/spool/postfix relayhost = [192.168.1.3]:587 sample_directory = /etc/postfix sendmail_path = /usr/lib/sendmail setgid_group = postdrop smtp_sasl_auth_enable = yes smtp_sasl_password_maps = hash:/etc/postfix/saslpasswd smtp_sasl_security_options = noanonymous smtpd_banner = $myhostname ESMTP $mail_name unknown_local_recipient_reject_code = 550 /etc/postfix/saslpasswd [192.168.1.3]:587 username:password

  • PostfixによるSMTP AUTHについて

    OSはvmwareにてVineを使っています。 postfixはpostfix-2.9.4 cyrus-saslはcyrus-sasl-2.1.25です。 こちらのページ http://www.postfix-jp.info/origdocs/install-report-sasl.html を参考にSMTPAUTHを導入しようと思いましたがどうもうまくいきません。期待としてはtelnet localhost 25 でEHLO localhostを入力した時に250-AUTH NTLM LOGIN PLAIN DIGEST-MD5 CRAM-MD5等と表示されればSMTPAUTHがきちんと導入されたという事らしいのでその動作を期待しています。上から順にコマンドを打ってきたつもりですがどこがいけないのでしょうか。 一応/etc/rc.d/init.d/postfix restartでpostfixは立ち上がります。telnetで接続しても上記のメッセージが出ない状況です。 何かどこが悪いのか確認する方法がありますでしょうか。現在のmain.cfの中身は以下のようです。 queue_directory = /var/spool/postfix command_directory = /usr/local/sbin daemon_directory = /usr/lib64/postfix data_directory = /var/lib/postfix mail_owner = postfix default_privs = nobody myhostname = test.domain.domain inet_interfaces = all mydestination = $myhostname, localhost.$mydomain, localhost unknown_local_recipient_reject_code = 550 alias_maps = hash:/etc/postfix/aliases alias_database = hash:/etc/postfix/aliases home_mailbox = Maildir/ mail_spool_directory = /var/spool/mail debug_peer_level = 2 debugger_command = PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin ddd $daemon_directory/$process_name $process_id & sleep 5 allow_percent_hack = no readme_directory = no sample_directory = /etc/postfix sendmail_path = /usr/sbin/sendmail html_directory = no setgid_group = postdrop manpage_directory = /usr/local/man newaliases_path = /usr/bin/newaliases mailq_path = /usr/bin/mailq inet_protocols = ipv4 relayhost = [smtp.domain]:587 smtp_sasl_auth_enable = yes smtp_sasl_password_maps = hash:/etc/postfix/isp_auth smtp_sasl_security_options = noanonymous 不足している情報がありましたら補足いたしますのでご指摘いただければ幸いです。よろしくお願いいたします。

  • Postfix + Courier-IMAP + SquirrelMailでログインできません

    Webメールサーバーを作りたく、SquirrelMailの設定をしています。 mailコマンドでユーザー間のメール送信はできるようです。 2点わからないことがあるためご質問させてください。 1.home_mailboxの設定について   Mailbox形式にするとmailコマンドで受け取ったメールの確認ができるのですが、   Maildir形式にするとmailコマンドでは「No mail for ユーザー」と出力され、   メールの確認ができません。   これは一般的な動作なのでしょうか?(初歩的な質問ですみません) 2.Webで調べつつSquirrelMailの設定をしたのですが、   どうしてもログインできません。   BSDのユーザーとSquirrelMailは別物なのでしょうか? ■postconf -n command_directory = /usr/sbin config_directory = /etc/postfix daemon_directory = /usr/libexec/postfix debug_peer_level = 2 home_mailbox = Maildir/ html_directory = no inet_interfaces = localhost mail_owner = postfix mailq_path = /usr/bin/mailq manpage_directory = /usr/share/man mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain mydomain = example.ddo.jp mydomain_fallback = localhost myhostname = example.ddo.jp mynetworks = 192.168.1.0/24, 127.0.0.0/8 mynetworks_style = host myorigin = $mydomain newaliases_path = /usr/bin/newaliases queue_directory = /private/var/spool/postfix readme_directory = /usr/share/doc/postfix sample_directory = /usr/share/doc/postfix/examples sendmail_path = /usr/sbin/sendmail setgid_group = postdrop unknown_local_recipient_reject_code = 550 ■SquirrelMail Server Settings IMAP Settings -------------- IMAP Server : localhost IMAP Port : 143 Authentication type : login Secure IMAP (TLS) : false Server software : courier Delimiter : . SMTP Settings ------------- SMTP Server : localhost SMTP Port : 25 POP before SMTP : true SMTP Authentication : none Secure SMTP (TLS) : false

  • Postfixでmailコマンドを使用したい

    お世話になります。 Cent OSにて、Postfixをソースからインストールしコマンドから送信テストを行おうとしましたが、 /usr/sbin/sendmail No such file or directoryというエラーがでて送信できません。 Postfixのsendmailは/usr/local/postfix/sbin/sendmail なのですが、どうやら既存のsendmailを見にいっているようです。 ちなみに、sendmail、newaliases、mailqはすべて末尾に「.OFF」を付けファイル名を変更してバックアップしてあります。 下記にpostconf -n で表示したmain.cfの構成を掲載させていただきます ============================================ broken_sasl_auth_clients = yes command_directory = /usr/local/postfix/sbin config_directory = /etc/postfix daemon_directory = /usr/local/postfix/libexec data_directory = /usr/local/postfix/var/lib debug_peer_level = 2 home_mailbox = Maildir/ html_directory = no inet_interfaces = all mail_owner = postfix mailq_path = /usr/local/postfix/bin/mailq manpage_directory = /usr/local/postfix/man mydomain = 自分のドメイン myhostname = 自分のホスト myorigin = $mydomain newaliases_path = /usr/local/postfix/bin/newaliases queue_directory = /usr/local/postfix/var/spool readme_directory = no sample_directory = /etc/postfix sendmail_path = /usr/local/postfix/sbin/sendmail setgid_group = postdrop smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination smtpd_sasl_auth_enable = yes smtpd_sasl_local_domain = $myhostname smtpd_sasl_security_options = noanonymous unknown_local_recipient_reject_code = 550 ============================================ make installでは「config_directory」以外のパスはすべて、/usr/local/postfix 配下に指定してあります。 説明不足だとは思いますが、お分かりになる方がいらっしゃいましたらご教授願います。 よろしくお願い致します。

  • Postfixの自動起動について

    こんにちは。 現在以下の環境でPostfixをインストールしたのですが、Postfixの自動起動が判りません。 こちらの過去の質問やインターネットで色々検索してみましたが、納得の行く回答が得られませんでした。 FreeBSDが立ち上がる時、一緒にPostfixも立ち上がるように設定する方法を教えて下さい。 宜しくお願い致します。 ・OS及びソフト FreeBSD4.8-STABLE Postfix-2.0.10 ・Postfixをインストールした場所 temp_directory:[/usr/local/postfix-2.0.10] config_directory:[/etc/postfix] daemon_directory:[/usr/local/libexec/postfix] command_directory:[/usr/local/sbin] queve_directory:[/var/spool/postfix] sendmail_path:[/usr/local/src/postfix-2.0.10/sendmail] newaliases_path:[/usr/bin/newaliases] mailq_path:[/usr/bin/mailq] ※ sendmailは停止させています。 (/etc/rc.confでsendmail_enable="NONE"しています。) 宜しくお願い致します。

  • 自宅mailサーバからPHSにメールが送信されない

    最近、自宅でMailサーバを立ち上げました。WBEL3にPOSTFIXを導入し、SquirrelMailでweb上からmailを送受信していますが、ウィルコムのPHSにmailが届かない(多分携帯にも)ので、postfixのmain.cfに下記の設定を追加し、  transport_maps = hash:/etc/postfix/transport postmapで下記の記載のtransportをtransport.dbにした上でPOSTFIXを再起動してみました。  pdx.ne.jp :[smtp.pdx.ne.jp] .pdx.ne.jp :[smtp.pdx.ne.jp] それでも、mailが届きません。設定の仕方がおかしいのでしょうか?ご教示下さい。 main.cfの上記以外の設定は下記の通りです。 queue_directory = /var/spool/postfix command_directory = /usr/sbin daemon_directory = /usr/libexec/postfix mail_owner = postfix myhostname =****** mydomain = ****** myorigin = $mydomain inet_interfaces = all mydestination = $myorigin, $myhostname, mail.$myorigin unknown_local_recipient_reject_code = 550 mynetworks = ***.***.***.***/24, 127.0.0.0/8 alias_maps = hash:/etc/aliases debug_peer_level = 2 debugger_command = PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin  xxgdb $daemon_directory/$process_name $process_id & sleep 5 sendmail_path = /usr/sbin/sendmail.postfix newaliases_path = /usr/bin/newaliases.postfix mailq_path = /usr/bin/mailq.postfix setgid_group = postdrop manpage_directory = /usr/share/man sample_directory = /usr/share/doc/postfix-2.0.16/samples readme_directory = /usr/share/doc/postfix-2.0.16/README_FILES smtpd_client_restrictions = permit_mynetworks, reject_unknown_client, permit mailbox_size_limit = 1000000000 message_size_limit = 20000000 smtpd_recipient_limit = 50 smtpd_recipient_restrictions = permit_mynetworks, check_client_access hash:/etc/postfix/pop-before-smtp, reject_unauth_destination transport_maps = hash:/etc/postfix/transport

  • postfixでstatus=sentですがローカルに保存されません

    postfixで外部へメール配送できているのですが、 内部のメールが受け取れない状態です。maillogには status=sentとあるのですが・・ 何が原因でしょうか? ■現象 1./rootは、Mailboxファイルはありますが、 mailコマンドを叩いてもメールが表示されない。 2./home/ippanUserは、Mailboxファイルすらできない。 ■/etc/postfix/main.cf home_mailbox = Mailbox mail_spool_directory = /var/spool/mail ■ps -aux root ~ /usr/libexec/postfix/master postfix ~ pickup -l -t fifo -u postfix ~ qmgr -l -t fifo -u # mail root@xxx.com とした時の/var/log/maillog Aug 23 15:18:02 dev1 postfix/cleanup[3816]: 51FC6554181: message-id=<20050823061802.51FC6554181@mail.xxx.com> Aug 23 15:18:02 dev1 postfix/qmgr[3723]: 51FC6554181: from=<root@xxx.com>, size=299, nrcpt=1 (queue active) Aug 23 15:18:02 dev1 postfix/local[3818]: 51FC6554181: to=<root@xxx.com>, relay=local, delay=0, status=sent (delivered to mailbox) Aug 23 15:18:02 dev1 postfix/qmgr[3723]: 51FC6554181: removed

  • postfixでメールの受信ができません

    メールの受信ができない、といいますか、サーバー上にはメールが来ているのですが、POP3で受信ができなくて困ってしまっています。 どなたかアドバイスをお願いしますm(_ _)m 環境は fedora code 8 postfix 2.4.5 dovecot 1.0.13 ~MailDir/を受信ボックスにしており、 outlookからメールを送ってやると、~MailDir/new/にファイルが たまっていくのですが、これをPOP3で受信することができない状態です。 outlookで受信処理をしたときのmaillogは Jun 12 14:37:40 mail1 dovecot: pop3-login: Login: user=<user>, method=PLAIN, rip=::ffff:192.168.24.52, lip=::ffff:192.168.24.110 Jun 12 14:37:40 mail1 dovecot: POP3(user): Disconnected: Logged out top=0/0, retr=0/0, del=0/0, size=0 のようになっております。 telnetで受信してみた場合、 list +OK 0 messages: となり、メッセージが無いと判断されているようです。 postconf -nの内容は以下のようになっています。 alias_database = hash:/etc/aliases alias_maps = hash:/etc/aliases allow_percent_hack = yes command_directory = /usr/sbin config_directory = /etc/postfix daemon_directory = /usr/libexec/postfix debug_peer_level = 2 home_mailbox = MailDir/ html_directory = no inet_interfaces = all mail_owner = postfix mail_spool_directory = /var/spool/mail mailq_path = /usr/bin/mailq.postfix manpage_directory = /usr/share/man mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain mydomain = xxxxx.net myhostname = mail1.ln mynetworks = 192.168.24.0/24, 127.0.0.0/8, 192.0.0.0/8 mynetworks_style = subnet myorigin = $mydomain newaliases_path = /usr/bin/newaliases.postfix queue_directory = /var/spool/postfix readme_directory = /usr/share/doc/postfix-2.4.5/README_FILES sample_directory = /usr/share/doc/postfix-2.4.5/samples sendmail_path = /usr/sbin/sendmail.postfix setgid_group = postdrop smtpd_recipient_restrictions = permit_mynetworks, check_relay_domains,reject unknown_local_recipient_reject_code = 550 dovecot.confのmail_location設定内容は以下のようになっています。 mail_location = maildir:~/MailDir (これはもともとコメントアウトで未設定状態でしたのでこのようにしてみましたが、変わりませんでした。) 検索して調べたりしていましたが、 何をしていいのかわからなくなってきてしまいました。 助けてください。 よろしくお願いします。。

  • CentOSにてpostfixの設定

    CentOSにpostfixを導入し、メール受信をトリガーにシェルスクリプトを起動させたいと考えています。 レンタルサーバの為postfixが無かったのでyum install postfixでinstallしました。 その後の設定ですがイマイチ分からずとりあえず他のサイトを色々みてやったのですが、うまく動きません。 /etc/aliases にviエディタにて hoge.hoge.hoge: | "/usr/local/hoge/bin /usr/local/hoge/bin/sh restart.sh" を記述しました。 /etc/postfix/main.cf 上記設定ファイルには下記を有効にしています。 ・queue_directory = /var/spool/postfix ・command_directory = /usr/sbin ・daemon_directory = /usr/libexec/postfix ・mail_owner = postfix ・myhostname = hogehoge.com ---->同じでOK? ・mydomain = hogehoge.com ---->同じでOK? ・myorigin = $mydomain ・inet_interfaces = all ・mydestination = $mydomain, $myhostname ・unknown_local_recipient_reject_code = 550 ・alias_maps = hash:/etc/aliases ・alias_database = hash:/etc/aliases ・recipient_delimiter = - ・debug_peer_level = 2 ・debugger_command = PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin xxgdb $daemon_directory/$process_name $process_id & sleep 5 ・sendmail_path = /usr/sbin/sendmail.postfix ・newaliases_path = /usr/bin/newaliases.postfix ・mailq_path = /usr/bin/mailq.postfix ・setgid_group = postdrop ・html_directory = no ・manpage_directory = /usr/share/man ・sample_directory = /usr/share/doc/postfix-2.3.3/samples ・readme_directory = /usr/share/doc/postfix-2.3.3/README_FILES /var/log/maillog には何も記載されていませんでした。 MTAもpostfixに設定しました。(system-switch-mailにて) /var/log/messages にも何も記載されていませんでした。 /etc/aliaesも変更しました hoge.hoge.hoge: | "/usr/bin /usr/local/hoge/bin/restart.sh" と一行追加しています。追加後 newaliaesも実行しDBも更新しています。 goge.hoge.hoge@example.comに携帯からメールを送信すると宛先不明等のメールは返ってきません なのでメールは受信できているのかとも思ったのですが /var/mail/hoge.hoge.hoge は0バイトになっているので受信していないようです。 レンタルサーバーのVPSを使っています。 そこでgoge.hoge.hoge@example.comのメールアドレスは作成済みです。 基本的な事は確認したつもりです。 postfixは起動しています。 MTAもpostfixに設定しました。 気になるのが、main.cfの設定です。 myhostname と mydomain が同じであることです。 どうぞ、ご教授の程宜しくお願い致します。