HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   Server Operation (http://www.howtoforge.com/forums/forumdisplay.php?f=5)
-   -   Postfix Virtual Users (http://www.howtoforge.com/forums/showthread.php?t=52171)

drezard 6th April 2011 09:58

Postfix Virtual Users
 
Basically, I want a "catch-all" user. (Not a domain catch-all, a user catch-all).

So when mail is sent to user@* (as long as the * is a domain listed in vhosts) then the mail gets dropped in this users mailbox.

My configuration looks like the below...

The only problem is when I send emails here is the responses I'm getting:
Code:

Send an email to:
test@example1.com - example1.com/test/ - works perfectly :)
test@example2.com - example2.com/test/ - works perfectly :)
test01@example1.com - NDR - no user recognized - fails
test01@example2.com - NDR - no user recognized - fails

How I would like it to work:
Code:

Send an email to:
test@example1.com - example1.com/test/
test@example2.com - example2.com/test/
test01@example1.com - test/
test01@example2.com - test/

vmaps (It is being postmap'ed):
Code:

test01    test/
test@example1.com    example1.com/test/
test@example2.com    example2.com/test/

vhosts:
Code:

example1.com
example2.com

main.cf:
Code:

smtpd_banner = Mail Relay
biff = no

append_dot_mydomain = no

myhostname = localhost
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
mynetworks = 127.0.0.0/8
mailbox_command =
mailbox_size_limit = 0
home_mailbox = Maildir/
virtual_mailbox_domains = /etc/postfix/vhosts
virtual_mailbox_base = /home/vmail
virtual_mailbox_maps = hash:/etc/postfix/vmaps
virtual_minimum_uid = 1000
virtual_uid_maps = static:1000
virtual_gid_maps = static:1000
recipient_delimiter = +
inet_interfaces = all
inet_protocols = ipv4
mydestination = $myhostname
relayhost =

mail.log:
Code:

Apr  6 10:28:15 mail-relay postfix/qmgr[6106]: D3FDC62B819F: from=<root@localhost>, size=354, nrcpt=1 (queue active)
Apr  6 10:28:15 mail-relay postfix/virtual[6117]: D3FDC62B819F: to=<test01@example1.com>, relay=virtual, delay=11, delays=11/0.02/0/0.02, dsn=5.1.1, status=bounced (unknown user: "test01@example1.com")

How do I go about setting this up?

Drez

falko 7th April 2011 16:05

Can you try
Code:

test01@    test/
or
Code:

test01@*    test/
in vmaps?


All times are GMT +2. The time now is 13:45.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.