0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

postfix でバーチャルメールボックスから任意のアドレスへ転送する

Posted at

virtual_alias_maps というものがあるので、そちらに map 情報を書いたファイルへの参照と追記し転送できるようにする

(参考) Postfix でバーチャルドメインで受けたメールを指定アドレスに転送するには
http://tilfin.hatenablog.com/entry/20120205/1328501873

# /etc/postfix/main.cf

virtual_alias_maps = hash:/etc/aliases, regexp:/etc/postfix/virtual-aliases.regexp
# /etc/postfix/virtual-aliases.regexp

/^test([^@]+)(@test.domain)?$/    test$1@new.domain

作成した map 情報が正しいかをチェックするには、postmap を使うと良い

$ postmap -q test1234@test.domain regexp:virtual-aliases.regexp
test1234@new.domain

設定を書いたら postmap して reload (必要なら sudo つけて)

$ service postfix reload
0
1
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
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?