postfix + cyrus +saslauthd2 pam postgresql 紧急求助!!!

由 unicorncn 在 05-30-2004 23:27 发表:

postfix + cyrus +saslauthd2 pam postgresql 紧急求助!!!

小弟在freebsd 4.10下 port安装 postfix (选 cyrus-sasl2 postgresql-7.4 bdb 41) cyrus-sasl2-saslauthd cyrus-imapd2 pam_pgsql

配置:

pam.conf

> quote: > > * * * > >
>
> #imap auth required pam_unix.so try_first_pass
>
> #pop3 auth required pam_unix.so try_first_pass
>
> smtp auth required pam_pgsql.so debug
>
> smtp password required pam_pgsql.so debug
>
> smtp account required pam_pgsql.so debug
>
>
>
> imap auth required pam_pgsql.so debug
>
> imap password required pam_pgsql.so debug
>
> imap account required pam_pgsql.so debug
>
> > > * * *

pam_pgsql.conf

> quote: > > * * * > >
>
> host=127.0.0.1
>
> database=mail
>
> user=mail
>
> password=mail
>
> table=mailuser
>
> usr_column=usr
>
> pwd_column=pass
>
> expired_column=expired
>
> network_column=newtok
>
> debug
>
> > > * * *

postfix/main.cf

> quote: > > * * * > >
>
> mydomain = zsufivehos.com
>
> alias_maps = hash:/usr/local/etc/postfix/aliases
>
> alias_database = hash:/usr/local/etc/postfix/aliases
>
> virtual_transport = cyrus
>
> virtual_mailbox_maps = pgsql:/usr/local/etc/postfix/pgsql-mailbox.cf
>
> virtual_minimum_uid = 100
>
> virtual_uid_maps = static:5000
>
> virtual_gid_maps = static:5000
>
> smtpd_sasl_auth_enable = yes
>
> broken_sasl_auth_clients = yes
>
> > > * * *

master.cf

> quote: > > * * * > >
>
> cyrus unix - n n - - pipe
>
> user=cyrus argv=/usr/bin/cyrus/bin/deliver -e -r ${sender} -m ${extension} ${user}
>
> > > * * *

pgsql-mailbox.cf

> quote: > > * * * > >
>
> hosts = 127.0.0.1
>
> user = mail
>
> password = mail
>
> dbname = mail
>
> table = mailuser
>
> select_field = box
>
> where_field = addr
>
> > > * * *

netstat -an|grep LISTEN

22 25 110 443 5432 等端口均打开

psql -U mail -h 127.0.0.1 mail

能正常登陆查询

测试

telnet 127.0.0.1 25

maillog

> quote: > > * * * > >
>
> May 30 22:41:58 s02 postfix/smtpd[216]: mynetworks: 172.16.92.0/24 127.0.0.0/8
>
> May 30 22:41:58 s02 postfix/smtpd[216]: match_string: mynetworks ~? debug_peer_list
>
> May 30 22:41:58 s02 postfix/smtpd[216]: match_string: mynetworks ~? fast_flush_domains
>
> May 30 22:41:58 s02 postfix/smtpd[216]: match_string: mynetworks ~? mynetworks
>
> May 30 22:41:58 s02 postfix/smtpd[216]: match_string: relay_domains ~? debug_peer_list
>
> May 30 22:41:58 s02 postfix/smtpd[216]: match_string: relay_domains ~? fast_flush_domains
>
> May 30 22:41:58 s02 postfix/smtpd[216]: match_string: relay_domains ~? mynetworks
>
> May 30 22:41:58 s02 postfix/smtpd[216]: match_string: relay_domains ~? permit_mx_backup_networks
>
> May 30 22:41:58 s02 postfix/smtpd[216]: match_string: relay_domains ~? qmqpd_authorized_clients
>
> May 30 22:41:58 s02 postfix/smtpd[216]: match_string: relay_domains ~? relay_domains
>
> May 30 22:41:58 s02 postfix/smtpd[216]: match_string: permit_mx_backup_networks ~? debug_peer_list
>
> May 30 22:41:58 s02 postfix/smtpd[216]: match_string: permit_mx_backup_networks ~? fast_flush_domains
>
> May 30 22:41:58 s02 postfix/smtpd[216]: match_string: permit_mx_backup_networks ~? mynetworks
>
> May 30 22:41:58 s02 postfix/smtpd[216]: match_string: permit_mx_backup_networks ~? permit_mx_backup_networks
>
> May 30 22:41:58 s02 postfix/smtpd[216]: connect to subsystem private/proxymap
>
> May 30 22:41:58 s02 postfix/smtpd[216]: send attr request = open
>
> May 30 22:41:58 s02 postfix/smtpd[216]: send attr table = unix:passwd.byname
>
> May 30 22:41:58 s02 postfix/smtpd[216]: send attr flags = 64
>
> May 30 22:41:58 s02 postfix/smtpd[216]: private/proxymap socket: wanted attribute: status
>
> May 30 22:41:58 s02 postfix/smtpd[216]: input attribute name: status
>
> May 30 22:41:58 s02 postfix/smtpd[216]: input attribute value: 0
>
> May 30 22:41:58 s02 postfix/smtpd[216]: private/proxymap socket: wanted attribute: flags
>
> May 30 22:41:58 s02 postfix/smtpd[216]: input attribute name: flags
>
> May 30 22:41:58 s02 postfix/smtpd[216]: input attribute value: 80
>
> May 30 22:41:58 s02 postfix/smtpd[216]: private/proxymap socket: wanted attribute: (list terminator)
>
> May 30 22:41:58 s02 postfix/smtpd[216]: input attribute name: (end)
>
> May 30 22:41:58 s02 postfix/smtpd[216]: dict_proxy_open: connect to map=unix:passwd.byname status=0 server_flags=0120
>
> May 30 22:41:58 s02 postfix/smtpd[216]: dict_open: proxy:unix:passwd.byname
>
> May 30 22:41:58 s02 postfix/smtpd[216]: dict_open: hash:/usr/local/etc/postfix/aliases
>
> May 30 22:41:58 s02 postfix/smtpd[216]: cfg_get_str: /usr/local/etc/postfix/pgsql-mailbox.cf: user = mail
>
> May 30 22:41:58 s02 postfix/smtpd[216]: cfg_get_str: /usr/local/etc/postfix/pgsql-mailbox.cf: password = mail
>
> May 30 22:41:58 s02 postfix/smtpd[216]: cfg_get_str: /usr/local/etc/postfix/pgsql-mailbox.cf: dbname = mail
>
> May 30 22:41:58 s02 postfix/smtpd[216]: cfg_get_str: /usr/local/etc/postfix/pgsql-mailbox.cf: select_function =

 1<null>   
 2&gt;    
 3&gt;  May 30 22:41:58 s02 postfix/smtpd[216]: cfg_get_str: /usr/local/etc/postfix/pgsql-mailbox.cf: query = <null>   
 4&gt;    
 5&gt;  May 30 22:41:58 s02 postfix/smtpd[216]: cfg_get_str: /usr/local/etc/postfix/pgsql-mailbox.cf: table = mailuser   
 6&gt;    
 7&gt;  May 30 22:41:58 s02 postfix/smtpd[216]: cfg_get_str: /usr/local/etc/postfix/pgsql-mailbox.cf: select_field = box   
 8&gt;    
 9&gt;  May 30 22:41:58 s02 postfix/smtpd[216]: cfg_get_str: /usr/local/etc/postfix/pgsql-mailbox.cf: where_field = addr   
10&gt;    
11&gt;  May 30 22:41:58 s02 postfix/smtpd[216]: cfg_get_str: /usr/local/etc/postfix/pgsql-mailbox.cf: additional_conditions =   
12&gt;    
13&gt;  May 30 22:41:58 s02 postfix/smtpd[216]: cfg_get_str: /usr/local/etc/postfix/pgsql-mailbox.cf: hosts = 127.0.0.1   
14&gt;    
15&gt;  May 30 22:41:58 s02 postfix/smtpd[216]: pgsqlname_parse: /usr/local/etc/postfix/pgsql-mailbox.cf: adding host '127.0.0.1' to list of pgsql server hosts   
16&gt;    
17&gt;  May 30 22:41:58 s02 postfix/smtpd[216]: dict_open: pgsql:/usr/local/etc/postfix/pgsql-mailbox.cf   
18&gt;    
19&gt;  May 30 22:41:58 s02 postfix/smtpd[216]: match_string: smtpd_access_maps ~? debug_peer_list   
20&gt;    
21&gt;  May 30 22:41:58 s02 postfix/smtpd[216]: match_string: smtpd_access_maps ~? fast_flush_domains   
22&gt;    
23&gt;  May 30 22:41:58 s02 postfix/smtpd[216]: match_string: smtpd_access_maps ~? mynetworks   
24&gt;    
25&gt;  May 30 22:41:58 s02 postfix/smtpd[216]: match_string: smtpd_access_maps ~? permit_mx_backup_networks   
26&gt;    
27&gt;  May 30 22:41:58 s02 postfix/smtpd[216]: match_string: smtpd_access_maps ~? qmqpd_authorized_clients   
28&gt;    
29&gt;  May 30 22:41:58 s02 postfix/smtpd[216]: match_string: smtpd_access_maps ~? relay_domains   
30&gt;    
31&gt;  May 30 22:41:58 s02 postfix/smtpd[216]: match_string: smtpd_access_maps ~? smtpd_access_maps   
32&gt;    
33&gt;  May 30 22:41:58 s02 postfix/smtpd[216]: smtpd_sasl_initialize: SASL config file is smtpd.conf   
34&gt;    
35&gt;  May 30 22:41:58 s02 postfix/smtpd[216]: match_string: fast_flush_domains ~? debug_peer_list   
36&gt;    
37&gt;  May 30 22:41:58 s02 postfix/smtpd[216]: match_string: fast_flush_domains ~? fast_flush_domains   
38&gt;    
39&gt;  May 30 22:41:58 s02 postfix/smtpd[216]: watchdog_create: 0x8099088 18000   
40&gt;    
41&gt;  May 30 22:41:58 s02 postfix/smtpd[216]: watchdog_stop: 0x8099088   
42&gt;    
43&gt;  May 30 22:41:58 s02 postfix/smtpd[216]: watchdog_start: 0x8099088   
44&gt;    
45&gt;  May 30 22:41:58 s02 postfix/smtpd[216]: connection established   
46&gt;    
47&gt;  May 30 22:41:58 s02 postfix/smtpd[216]: master_notify: status 0   
48&gt;    
49&gt;  May 30 22:41:58 s02 postfix/smtpd[216]: name_mask: resource   
50&gt;    
51&gt;  May 30 22:41:58 s02 postfix/smtpd[216]: name_mask: software   
52&gt;    
53&gt;  May 30 22:41:58 s02 postfix/smtpd[216]: name_mask: noanonymous   
54&gt;    
55&gt;  May 30 22:41:58 s02 postfix/smtpd[216]: connect from localhost[127.0.0.1]   
56&gt;    
57&gt;  May 30 22:41:58 s02 postfix/smtpd[216]: match_list_match: localhost: no match   
58&gt;    
59&gt;  May 30 22:41:58 s02 postfix/smtpd[216]: match_list_match: 127.0.0.1: no match   
60&gt;    
61&gt;  May 30 22:41:58 s02 postfix/smtpd[216]: match_list_match: localhost: no match   
62&gt;    
63&gt;  May 30 22:41:58 s02 postfix/smtpd[216]: match_list_match: 127.0.0.1: no match   
64&gt;    
65&gt;  May 30 22:41:58 s02 postfix/smtpd[216]: &gt; localhost[127.0.0.1]: 220 localhost ESMTP Postfix   
66&gt;    
67&gt;  May 30 22:41:58 s02 postfix/smtpd[216]: watchdog_pat: 0x8099088   
68&gt;    
69&gt;  May 30 22:42:07 s02 postfix/smtpd[216]: &lt; localhost[127.0.0.1]: ehlo localhost   
70&gt;    
71&gt;  May 30 22:42:07 s02 postfix/smtpd[216]: &gt; localho</null></null>
Published At
Categories with 服务器类
Tagged with
comments powered by Disqus