0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

[Linux] メール管理_転送_/etc/aliases, newaliases, .forward

Last updated at Posted at 2025-06-21

/etc/aliasesを利用

  • ローカル配送におけるメールの振り分けや転送に利用されsendmailpostfixなどのMTA(Mail Transfer Agent)で使われる

/etc/aliases の記載例

/etc/aliases
# 元の宛先: 実際のユーザーまたはアドレス

postmaster: root
root: admin
admin: suzuki@example.com, yamada@example.com
sales: sales-team@example.com
webmaster: webmaster@external-domain.com

各行の説明

説明
postmaster: root postmaster 宛のメールを root に転送
root: admin root 宛のメールを admin に転送
admin: kaneko@example.com, yamada@example.com admin 宛のメールを複数アドレスに配信
sales: sales-team@example.com ローカルユーザー sales 宛メールを外部のメールアドレスへ転送
webmaster: webmaster@external-domain.com webmaster 宛メールを外部の別ドメインへ転送

newaliasesコマンド

エイリアスを変更・追加したあとは、newaliasesコマンドを実行して反映させる

$ newaliases

.forwardファイルを利用

  • 一時的または個別の転送時に利用され、ホームディレクトリ直下に配置し、sendmailpostfixなどのMTA(Mail Transfer Agent)で使用される

.forwardファイルの記載例

.forward
# 転送先メールアドレス

suzuki@example.com

Ping-t

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?