Here is a very simple question that I wasn't able to find an easy answer for being entirely new to postfix:
I want all mail coming in from SMTP (or through local delivery for that matter) to drop in a single (special purpose) user's Maildir, for later pick-up by a web app through IMAP (Dovecot).
I already have it configured to find the destination through
local_recipient_maps = unix:passwd.byname
and created a user for that single purpose, but I'd rather have Postfix not even try to look up the user named in the incoming mail, just take the one user I specify in the config.
What's the simplest and most secure way to do this?
Addendum: this shows how to use virtual_alias_map, but I don't want virtual domains, I want all emails coming in, regardless of the (multiple) domains I've set up to go into the catch-all.
Check the very bottom of this page for information on the luser_relay variable:
http://www.postfix.org/rewrite.html
Perhaps that will get you the functionality you desire.
take a look at the
always_bcc
option. All Mail which gets in or out will be delivered to defined mailbox/user/whatever.If you only want incoming Mails use
or for outgoing mail
In the maps you can define * to match all domains, or filter domain specific with
(atsign)foobar.com mailbox
If you have your mapfile, build it with postmap hash:/etc/postfix/yourhashmap