Hi,
I have recently configured a postfix mail server to use mysql for aliases. It seems to be most, but not all, of what I want.
using the above, I can have mail sent to webmaster@mydomain.com forwarded to me@gmail.com. Which is nifty.
However, I am hosting a number of domains on the server, and I want to be able to set up a different alias for webmaster@otherdomain.com be sent to a different address.
So far, it seems that the input key '%s' only contains "webmaster", and so I am unable to distinguish between them. I need to be able to map my aliases depending on the full mail address, including domain.
The manual offers the following advice:
%s This is replaced by the input key. SQL
quoting is used to make sure that the input
key does not add unexpected metacharacters.
%u When the input key is an address of the form
user@domain, %u is replaced by the SQL
quoted local part of the address. Other-
wise, %u is replaced by the entire search
string. If the localpart is empty, the
query is suppressed and returns no results.
%d When the input key is an address of the form
user@domain, %d is replaced by the SQL
quoted domain part of the address. Other-
wise, the query is suppressed and returns no
results.
My problem appears to be that the input key used is not of the form "user@domain.com", but rather is of the form "user". How can I set the format of the input key to be "user@domain.com"? I couldn't see that anywhere.
Thanks in advance.
I have recently configured a postfix mail server to use mysql for aliases. It seems to be most, but not all, of what I want.
using the above, I can have mail sent to webmaster@mydomain.com forwarded to me@gmail.com. Which is nifty.
However, I am hosting a number of domains on the server, and I want to be able to set up a different alias for webmaster@otherdomain.com be sent to a different address.
So far, it seems that the input key '%s' only contains "webmaster", and so I am unable to distinguish between them. I need to be able to map my aliases depending on the full mail address, including domain.
The manual offers the following advice:
%s This is replaced by the input key. SQL
quoting is used to make sure that the input
key does not add unexpected metacharacters.
%u When the input key is an address of the form
user@domain, %u is replaced by the SQL
quoted local part of the address. Other-
wise, %u is replaced by the entire search
string. If the localpart is empty, the
query is suppressed and returns no results.
%d When the input key is an address of the form
user@domain, %d is replaced by the SQL
quoted domain part of the address. Other-
wise, the query is suppressed and returns no
results.
My problem appears to be that the input key used is not of the form "user@domain.com", but rather is of the form "user". How can I set the format of the input key to be "user@domain.com"? I couldn't see that anywhere.
Thanks in advance.