sendmail 可設定將伺服器上「查無此人」的郵件改由特定的用戶接收 http://www.vixual.net/wikka/wikka.php?wakka=Archive2005100801
而 postfix 有此功能的參數是
luser_relay=cross2
測試了一下
從 [email protected] 寄信給 [email protected],[email protected] 帳號是不存在的
maillog 顯示
Jul 3 20:02:38 ssorc postfix/pickup[16408]: BACA03B00061: uid=48 from=<[email protected]>
Jul 3 20:02:38 ssorc dovecot: IMAP(cross): Disconnected: Logged out
Jul 3 20:02:38 ssorc postfix/cleanup[17213]: BACA03B00061: message-id=<djjbfzsh.1215086558.5838920.cross@localhost>
Jul 3 20:02:38 ssorc postfix/qmgr[16407]: BACA03B00061: from=<[email protected]>, size=803, nrcpt=1 (queue active)
Jul 3 20:02:38 ssorc postfix/local[17215]: BACA03B00061: to=<[email protected]>, orig_to=<[email protected]>, relay=local, delay=0.14, delays=0.09/0. 03/0/0.03, dsn=2.0.0, status=sent (delivered to command: /usr/bin/procmail -a “$EXTENSION” DEFAULT=/var/spool/mail/maildir/$USER/ MAILDIR=/var/spo ol/mail/maildir/$USER)
Jul 3 20:02:38 ssorc postfix/qmgr[16407]: BACA03B00061: removed
就在 [email protected] 的信箱收到了原本給 [email protected] 的信
留言
呃,根據小弟實做過的經驗,那是可行的;或是你另建一relay的文字清單也可以。 不過,小心,垃圾信收不完~