(resending to list)
El 29/04/15 a las 19:34, Robert Chalmers escribió:
Ok, my /etc/postfix/mysql-virtual-mailbox-maps.cf
has:
user = mailman
password = xxxxxxxxxxx
hosts = 127.0.0.1
dbname = mailserver
query = SELECT 1 FROM virtual_users WHERE email='%s'
[...]
Using your syntax, I’m a little closer
postmap -q station.mana...@quantum-radio.net
<mailto:station.mana...@quantum-radio.net>
mysql:/etc/postfix/mysql-virtual-mailbox-maps.cf
postmap: warning: mysql query failed: You have an error in your SQL
syntax; check the manual that corresponds to your MySQL server version
for the right syntax to use near ''station.mana...@quantum-radio.net
<mailto:station.mana...@quantum-radio.net>???' at line 1
postmap: fatal: table
mysql:/etc/postfix/mysql-virtual-mailbox-maps.cf: query error:
Undefined error: 0
Double check for syntax, quotation marks, ... in the query, it's likely
you missed copying the sentence correctly.
[...]
I did have this
virtual_mailbox_base = /var/mail/vhosts
[...]
Also check that this directory (and subdirectories) has the right
permissions so Postfix and your e-mail server can access them. Otherwise
you'll get errors.
Regards,
Nicolás
On 29 Apr 2015, at 16:51, Nicolás <nico...@devels.es
<mailto:nico...@devels.es>> wrote:
El 29/04/15 a las 16:25, Robert Chalmers escribió:
I have the following error when trying to send mail to a virtual
domain on the server.
I’m afraid I can not find the source of this error.
postfix/smtpd[901]: NOQUEUE: reject: RCPT from
mail-yk0-f175.google.com
<http://mail-yk0-f175.google.com/>[209.85.160.175]: 550 5.1.1
<station.mana...@quantum-radio.net
<mailto:station.mana...@quantum-radio.net>>: Recipient address
rejected: User unknown in virtual mailbox table;
from=<racu...@gmail.com <mailto:racu...@gmail.com>>
to=<station.mana...@quantum-radio.net
<mailto:station.mana...@quantum-radio.net>> proto=ESMTP
helo=<mail-yk0-f175.google.com <http://mail-yk0-f175.google.com/>>
If this is not the appropriate mailing list for this type of
question, can someone please point me at a list that is?
thanks
Robert
*robert$ postconf -n*
[...]
virtual_mailbox_maps = mysql:/etc/postfix/mysql-virtual-mailbox-maps.cf
[...]
What's the content of /etc/postfix/mysql-virtual-mailbox-maps.cf? For
a given e-mail address, it should return the path where the virtual
user's inbox is. For example:
user = db_username
password = db_password
dbname = db_name
query = SELECT CONCAT(SUBSTRING_INDEX(email, '@', -1), '/',
SUBSTRING_INDEX(email, '@', 1), '/') FROM users WHERE email = '%s'
hosts = 127.0.0.1
The query field assumes that an e-mail address like
station.mana...@quantum-radio.net will be passed as %s. In the case
above, it's assumed that paths are always domain/username/ like, so
following the example, quantum-radio.net/station.manager/
<http://quantum-radio.net/station.manager/> would be returned.
This path is relative to the virtual_mailbox_base parameter, which by
the way you don't seem to have defined. If your virtual mailboxes are
located under /home/virtual, set virtual_mailbox_base to this value
so the user mailbox's path would be returned as
/home/virtual/quantum-radio.net/station.manager/
<http://quantum-radio.net/station.manager/>.
Regards,
Nicolás