Linode Forum
https://forum.linode.com/

Postfix Installing with dovecot
https://forum.linode.com/viewtopic.php?f=11&t=9243
Page 1 of 1

Author:  William20111 [ Thu Aug 09, 2012 8:06 am ]
Post subject:  Postfix Installing with dovecot

I have installed postfix with dovecot for my mail server. Both dovecot and Postfix seem to be operational when I Telnet to them.

But when I try to send a mail from the command line suing mailx I get this error in the mail.log

Code:
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:
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.

http://library.linode.com/email/postfix/dovecot-mysql-ubuntu-10.04-lucid

Thanks
William

Author:  Vance [ Thu Aug 09, 2012 7:37 pm ]
Post subject:  Re: Postfix Installing with dovecot

What does running
Code:
echo "SELECT destination FROM forwardings WHERE source='sales@XXXXXXX.co.uk'" | mysql -u xxxxx --password=xxxxx mail

get you?

Author:  William20111 [ Fri Aug 10, 2012 4:46 am ]
Post subject:  Re: Postfix Installing with dovecot

Vance wrote:
What does running
Code:
echo "SELECT destination FROM forwardings WHERE source='sales@XXXXXXX.co.uk'" | mysql -u xxxxx --password=xxxxx mail

get 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

Author:  Vance [ Sat Aug 11, 2012 12:05 am ]
Post subject:  Re: Postfix Installing with dovecot

OK, sorry, I wasn't all that familiar with the library article.

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 virtual_alias_maps in your Postfix main.cf:
Code:
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-virtual_forwardings.cf but not via mysql-virtual_email2email.cf.

Page 1 of 1 All times are UTC-04:00
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/