Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[Virtual mail] Postfix - Postgres ... bbdd connect problems
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
KOwen
n00b
n00b


Joined: 14 May 2014
Posts: 1

PostPosted: Wed May 14, 2014 4:42 pm    Post subject: [Virtual mail] Postfix - Postgres ... bbdd connect problems Reply with quote

Hi,

i´m following this guide: http://wiki.gentoo.org/wiki/Complete_Virtual_Mail_Server to install a virtual mail server with postfix and postgres...

I´m in the end of this step http://wiki.gentoo.org/wiki/Complete_Virtual_Mail_Server/Postfix_to_Database trying to send a mail to check the postfix connection with bbdd postgres.

All seems ok, but in the logs, i can see this:

Quote:

May 14 18:05:51 [postfix/trivial-rewrite] warning: table "pgsql:/etc/postfix/pgsql/virtual_mailbox_domains.cf": empty lookup result for: "domain.com" -- ignored
May 14 18:05:51 [postfix/smtp] 06C192E05569: to=<testuser@domain.com>, relay=none, delay=17, delays=17/0/0/0, dsn=5.4.6, status=bounced (mail for domain.com loops back to myself)


for any reason postfix can't find the domain... :( but when i check the query over psql.. it exists! :S

Quote:
postfix=> SELECT description FROM domain WHERE domain = 'domain.com' AND backupmx = '0' AND active = '1';
description
-------------

(1 row)



some configurations can help to find the error:

Quote:
#cat /etc/postfix/pgsql/virtual_mailbox_domains.cf
user = postfixadmin
password = XXXXXXXXX
dbname = postfix
hosts = localhost
query = SELECT description FROM domain WHERE domain = '%s' AND backupmx = '0' AND active = '1';


Quote:
# postconf -n
command_directory = /usr/sbin
config_directory = /etc/postfix
daemon_directory = /usr/libexec/postfix
data_directory = /var/lib/postfix
debug_peer_level = 2
debugger_command = PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin ddd $daemon_directory/$process_name $process_id & sleep 5
home_mailbox = .maildir/
html_directory = no
inet_protocols = ipv4
mail_owner = postfix
mailq_path = /usr/bin/mailq
manpage_directory = /usr/share/man
newaliases_path = /usr/bin/newaliases
queue_directory = /var/spool/postfix
readme_directory = no
sample_directory = /etc/postfix
sendmail_path = /usr/sbin/sendmail
setgid_group = postdrop
unknown_local_recipient_reject_code = 550
virtual_alias_maps = pgsql:/etc/postfix/pgsql/virtual_alias_maps.cf
virtual_gid_maps = static:5000
virtual_mailbox_base = /var/vmail
virtual_mailbox_domains = pgsql:/etc/postfix/pgsql/virtual_mailbox_domains.cf
virtual_mailbox_maps = pgsql:/etc/postfix/pgsql/virtual_mailbox_maps.cf
virtual_uid_maps = static:5000


Quote:
postfix=> \l
List of databases
Name | Owner | Encoding | Collate | Ctype | Access privileges
-----------+--------------+----------+-------------+-------------+-------------------------------
postfix | postfixadmin | UTF8 | en_US.UTF-8 | en_US.UTF-8 | =Tc/postfixadmin postfixadmin=CTc/postfixadmin



What i should check now? any ideas?
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum