On Sunday 11 December 2011 07:21:13 lupin...@gmx.net wrote: > i´m not quite sure if the problem is directly the > virtual_alias_maps or something it interacts with, so to say. in > main.cf i set > virtual_alias_maps = mysql:/etc/postfix/mysql-virtual.cf
'postmap -q virtual@alias mysql:/etc/postfix/mysql-virtual.cf' lets you test how your lookups work. http://www.postfix.org/DATABASE_README.html#preparing > unverified_recipient_reject_code = 550 > unknown_local_recipient_reject_code = 550 Those do not appear to be relevant to this post nor issue. > and in mysql-virtual.cf > # the user name and password to log into the mysql server > hosts = 127.0.0.1 > user = mailcheck > password = secretpassword > dbname = mails > table = virtual > select_field = dest > where_field = alias This is deprecated query syntax. http://www.postfix.org/mysql_table.5.html http://www.postfix.org/MYSQL_README.html > now, if i try to send to an address on the server that does not > exist, it should refuse, right? unfortunately it, postfix just > hands it over to dovecot, as if everything was fine =( If you had showed us the logs of this along with the 'postconf -n' output, we could have explained why this happened. As it is, we can only guess. My guess from the problem description is that you are using a flawed testing method, perhaps sending from a client in mynetworks, thus being accepted and bounced. That's the way it is supposed to work for a client in mynetworks. > I´m currently not completely sure, if the problem lies with the > postfix-configuration or with the mysql-query (e.g. if it always > returns "ok", even if the entry wasn´t found). But I´m currently That would be wrong, see aforementioned DATABASE_README. > not sure, how to test this. When i directly make the query in sql, > it works fine (aka, it returns an empty result, if the mailaddress > is not equal to one of the aliases). This sounds right. > i also tried to change the mysql-virtual.cf so that it uses a query > (query = SELECT dest FROM virtual WHERE alias = "%s";), but the > behavior did not change. mind you, when there´s an error in this > file, i can´t send any mails, so it seems to be used in some way > or other. -_-; Possibly so! Impossible to guess, from here. > any hints would be appreciated =) http://www.postfix.org/DEBUG_README.html#mail * * * On Sunday 11 December 2011 08:04:15 James Day wrote: > First make sure that the domain you are sending to is set > as a virtual mailbox domain. This is possibly relevant, but misleading advice. > It sounds like you've already set the > virtual transport to dovecot which is right. No, the "right" thing is usually to set up virtual(8) to deliver properly before venturing out into any third-party software. > If you think mysql is the issue try making a > virtual alias maps hash file. This is good advice, essentially the same message as from the aforementioned DATABASE_README. -- Offlist mail to this address is discarded unless "/dev/rob0" or "not-spam" is in Subject: header