Hi,
I'm trying to make a full virtual configuration with PostgreSQL and OpenSMTPD.
My configuration is this one :
-- Server : CubieBoard (ARM)
-- OS : Debian 7
-- Opensmtpd : 5.4.1 (compile by myself to include PostgreSQL support)

I'm doing a migration from Postfix on guruplug to OpenSMTPD on cubieboard, but i have an error and i suppose it's my fault with a bad configuration file. I seen the exemples in tar.gz distribution but without sucess

$ cat postgresql.conf
#
# Sample PostgreSQL configuration file
#
# This is an example configuration file for using OpenSMTPD with the PostgreSQL # backend for lookups. OpenSMTPD does not have hardcoded tables and you may
#
#

url             postgres://127.0.0.1
username        vmailr
password        XXXXX (comporte des caractC(re spC)ciaux tel que @ et &)


# Alias lookup query
#
# rows   >= 0
# fields == 1 (user varchar)
#
query_alias                select goto from alias where address=?;


# Domain lookup query
#
# rows   == 1
# fields == 1 (domain varchar)
#
query_domain                select domain from domain where domain=?;


# User lookup query
#
# rows   == 1
# fields == 3 (uid int, gid int, directory varchar)
#
query_userinfo select 500,500,maildir from mailbox where user=?;


# Credentials lookup query
#
# rows   == 1
# fields == 2 (username varchar, password varchar)
#
query_credentials select username, password from mailbox where key=?;


# Netaddr lookup query
#
# rows   == 1
# fields == 1 (netaddr varchar)
#
#query_netaddr        select value from netaddr where value=?;




-----------------------------------------------------------------------------
My smtpd.conf is simple but enough for the moment :

$ cat smtpd.conf
# This is the smtpd server system-wide configuration file.
# See smtpd.conf(5) for more information.

# To accept external mail, replace with: listen on all
listen on localhost

# If you edit the file, you have to run "smtpctl update table aliases"
#table aliases file:/etc/mail/aliases

# Fichier contenant les requC(tes C  utiliser
table mytbl postgres:/etc/mail/postgresql.conf

# Uncomment the following to accept external mail for domain "example.org" #accept from any for domain "example.org" alias <aliases> deliver to mbox

#accept for local alias <aliases> deliver to mbox
accept for any relay

-------------------------------------------------------------------------------

And finally the result when i try to start the server :

# smtpd -dv -T table -T lookup
debug: init ssl-tree
info: OpenSMTPD 5.4.1p1 starting
debug: bounce warning after 4h
debug: using "fs" queue backend
debug: using "ramqueue" scheduler backend
debug: using "ram" stat backend
info: startup [debug mode]
mfa: building simple chains...
mfa: building complex chains...
mfa: done building complex chains
mfa: done building default chain
libevent 2.0.19-stable (epoll)
debug: parent_send_config_ruleset: reloading
debug: parent_send_config_mfa: reloading
debug: parent_send_config: configuring smtp
debug: mfa ready
TABLE "<anydestination>" type=LIST config=""
debug: smtp: listen on 127.0.0.1 port 25 flags 0x0 pki ""
        "*"
debug: smtp: listen on IPv6:::1 port 25 flags 0x0 pki ""
debug: smtp: will accept at most 2022 clients
TABLE "<anyhost>" type= config=""
        "0.0.0.0/0"
        "::/0"
        "local"
TABLE "<getpwnam>" type=DYNAMIC config=""
TABLE "<localhost>" type= config=""
        "127.0.0.1"
        "192.168.0.44"
        "ipv6:2a01:e34:ec20:28e0:c2b0:4cff:fe18:4795"
        "ipv6:::1"
        "ipv6:fe80::c2b0:4cff:fe18:4795"
        "local"
TABLE "<localnames>" type=LIST config=""
        "localhost"
        "venabulis"
TABLE "mytbl" type=DYNAMIC config="/usr/lib/arm-linux-gnueabihf/opensmtpd/table-postgres /etc/mail/postgresql.conf"
debug: queue: done loading queue into scheduler
debug: table-postgres: (re)connecting
Segmentation fault
warn: table-proc: pipe closed
fatal: table-proc: exiting
warn: parent -> lka: pipe closed
warn: queue -> lka: pipe closed
warn: smtp -> lka: pipe closed
warn: mda -> queue: pipe closed
warn: control -> queue: pipe closed
warn: mta -> queue: pipe closed
warn: mfa -> control: pipe closed
warn: scheduler -> queue: pipe closed


Thanks for any help

(Response language accept in : Fr,Es,En)


PS : It will be good to include db configuration file exemple in /examples/config for next release.



--
You received this mail because you are subscribed to [email protected]
To unsubscribe, send a mail to: [email protected]

Reply via email to