メールを受信するユーザーを作るメモ
とある、サイトのテスト用のサーバーがあるのだけれど、そのサーバーで新しいメールアドレス(つまり新しいユーザー)を作る手順のメモ。
※ほんとメモなので、これを参考にしても他の環境で同じように再現するとは限りませんので、ご了承ください。
※例は、hogehoge.com というサーバーで、test1@hogehoge.com というメールアドレスを作成しています。
1.ユーザーの作成
# /usr/sbin/useradd test1 # passwd test1 New UNIX password: BAD PASSWORD: it is based on a dictionary word Retype new UNIX password: passwd: all authentication tokens updated successfully.
2.sendmailの設定
/etc/mail/virtusertable を編集します。
# emacs /etc/mail/virtusertable
で
test1@hogehoge.com test1
↑を追加
3.sendmail再起動
# /etc/init.d/sendmail restart
4.送信できるかどうかテスト
# /usr/sbin/sendmail -bt -C /etc/mail/sendmail.cf /parse test@hogehoge.com
mailer local, user test1 と最終行にでれば成功です。
http://www.fmmc.or.jp/~fm/nwts/rh_linux/ch3/3_2_2_3.html
↑送信テストの参考
メモでした。
※試した環境
OS : CentOS 4.4