0

I want to direct all mails received via smtp from the local server to a given local address stock@domain.com.

In main.cf

virtual_alias_maps = regexp:/etc/postfix/virtual

I tried first to use virtualmap

/.*/   stock@domain.com

followed with postmap virtual and /etc/init.d/postfix restart

But it doesn't work - the mail is still routed as normally, and no special message in /var/log/maillog.

The Postfix configuration is scattered over many files, not always updated, sometimes ambiguous (try to find out the command to simply get the version of postfix), and I don't see what can be the problem. Any idea of what could be wrong?

Déjà vu
  • 5,546
  • 9
  • 36
  • 55

1 Answers1

0

So it seems the correct working syntax is

/.+@.+/   stock@domain.com

that fixed it, and virtual is not recursive...

Déjà vu
  • 5,546
  • 9
  • 36
  • 55