Postfix Installing with dovecot
But when I try to send a mail from the command line suing mailx I get this error in the mail.log
proxy:mysql:/etc/postfix/mysql-virtual_forwardings.cf lookup error for "sales@XXXXXXX.co.uk"
virtual_alias_maps map lookup problem for sales@XXXXXXX.co.uk -- deferring delivery
I looked into this file and its all correct. That is it below
Code:
user = xxxxx
password = xxxxx
dbname = mail
query = SELECT destination FROM forwardings WHERE source='%s'
hosts = 127.0.0.1
Not sure where I stand with this? Any help would be great. Can provide any information if needed. I set this up following the guide on linode. Any help would be great.
Thanks
William
3 Replies
echo "SELECT destination FROM forwardings WHERE source='sales@XXXXXXX.co.uk'" | mysql -u xxxxx --password=xxxxx mail
get you?
@Vance:
What does running
echo "SELECT destination FROM forwardings WHERE source='sales@XXXXXXX.co.uk'" | mysql -u xxxxx --password=xxxxx mailget you?
Nothing mate. Doesn't echo anything. Both the forwarding's and destinations tables are empty. I have just created one users email address in the users table like the guide said..
Should the other tables be populated when I try to send a mail to the address to create the virtual mail box.
Thanks
It indeed does not specify any entries to be added to the forwardings table (and I'm pretty sure one won't be created automatically).
You should look at both the domains and users tables and make sure they have appropriate entries. Check using the username and password you redacted to ensure that this user has the rights to perform lookups.
Also double-check the value of virtualaliasmaps in your Postfix main.cf:
virtual_alias_maps = proxy:mysql:/etc/postfix/mysql-virtual_forwardings.cf, mysql:/etc/postfix/mysql-virtual_email2email.cf
There may be a typo in /etc/postfix/mysql-virtual_email2email.cf, or the file itself may be misnamed.
The error message suggests to me that Postfix is searching for the destination e-mail address via mysql-virtualforwardings.cf but not via mysql-virtualemail2email.cf.