[CentOS] problems with .forward

Robert Moskowitz
Mon, 04 Mar 2013 15:27:03 -0000

My old Centos 5.5 servers had a /root/.forward to send things like
logwatch to this email account.  It did not take any special
configuration in sendmail for this to work.

Now Centos 6.3 is using postfix (as we well know, and generally I am
happy for this) and I have set up the /root/.forward as always, but it
seems like postfix is ignoring it.  I have restarted postfix with no
difference in behaviour.

/root/.forward contains the single line without ending in <cr> (I have
tested with <cr> at the end as well:

rgm at htt-consult.com

'host htt-consult.com' responses with:

htt-consult.com mail is handled by 10 klovia.htt-consult.com.

For the testing from my regular account I run:

mail -s Test root  < /dev/null

/var/log/maillog shows:

Mar  4 10:16:04 onlo postfix/pickup[30442]: 911731400CE: uid=500
from=<rgm>
Mar  4 10:16:04 onlo postfix/cleanup[30526]: 911731400CE:
message-id=<20130304151604.911731400CE at onlo.htt-consult.com>
Mar  4 10:16:04 onlo postfix/qmgr[30443]: 911731400CE:
from=<rgm at onlo.htt-consult.com>, size=471, nrcpt=1 (queue active)
Mar  4 10:16:04 onlo postfix/local[30528]: 911731400CE:
to=<root at onlo.htt-consult.com>, orig_to=<root>, relay=local,
delay=0.15,
delays=0.08/0.01/0/0.06, dsn=2.0.0, status=sent (delivered to mailbox)
Mar  4 10:16:04 onlo postfix/qmgr[30443]: 911731400CE: removed
You have mail in /var/spool/mail/root

Does anyone else use the .forward file?  This should work.  Of course I
can modify the alias file for postfix, but .forward was always 'easier'
to configure.

If I have to plow through the postfix docs for this, I will, but I would
think this should work.