banner

[Rule] Rules  [Home] Main Forum  [Portal] Portal  
[Members] Member Listing  [Statistics] Statistics  [Search] Search  [Reading Room] Reading Room 
[Register] Register  
[Login] Loginhttp  | https  ]
 
Forum Index Thảo luận hệ điều hành *nix Lỗi khi nhận mail (Postfix / Dovecot / MySQL )  XML
  [Discussion]   Lỗi khi nhận mail (Postfix / Dovecot / MySQL ) 28/06/2012 14:22:39 (+0700) | #1 | 265702
zero0_0
Member

[Minus]    0    [Plus]
Joined: 13/10/2011 12:21:49
Messages: 15
Offline
[Profile] [PM]
Chào cả nhà,

Mình đang cài hệ thống mail : Postfix + Dovecot + My SQL (Virtual User) trên Centos. Nhưng bị tình trạng là từ hệ thống mail mới xây gửi ra bình thường. Còn chiều ngược lại thì bị lỗi .

#tail -f /var/log/maillog

deliver(test02@domainxxx.vn): 2012-06-28 15:07:21 Error: Can't connect to auth server at /var/run/dovecot/auth-master: Connection refused
deliver(test02@domainxxx.vn): 2012-06-28 15:07:21 Error: Can't connect to auth server at /var/run/dovecot/auth-master: Connection refused
Jun 28 15:07:21 localhost postfix/pipe[20511]: 670D369F8840: to=<test02@domainxxx.vn>, relay=dovecot, delay=392, delays=392/0.01/0/0.45, dsn=4.3.0, status=deferred (temporary failure)
Jun 28 15:07:21 localhost postfix/pipe[20512]: 53DAC69F8829: to=<test02@domainxxx.vn>, relay=dovecot, delay=4782, delays=4782/0.01/0/0.45, dsn=4.3.0, status=deferred (temporary failure)
Jun 28 15:07:21 localhost postfix/smtpd[20424]: warning: unknown[113.172.3.210]: SASL LOGIN authentication failed: UGFzc3dvcmQ6
deliver(test02@sdomainxxx.vn): 2012-06-28 15:07:21 Error: Can't connect to auth server at /var/run/dovecot/auth-master: Connection refused
Jun 28 15:07:21 localhost postfix/pipe[20521]: 6C13269F882B: to=<test02@domainxxx.vn>, relay=dovecot, delay=0.46, delays=0.01/0/0/0.44, dsn=4.3.0, status=deferred (temporary failure) 


với :

Code:
root@localhost libexec]# ls -ls /var/run/dovecot/
total 12
0 srwxrwxrwx 1 vmail vmail      0 Jun 27 23:20 auth-master
0 srw------- 1 vmail mail       0 Jun 28 14:54 auth-worker.20362
0 srwxrwxrwx 1 root  root       0 Jun 28 14:54 dict-server
8 drwxr-x--- 2 root  dovecot 4096 Jun 28 14:54 login
4 -rw------- 1 root  root       6 Jun 28 14:54 master.pid


File : /etc/postfix/main.cf

postconf -n
alias_database = hash:/etc/postfix/aliases
alias_maps = $alias_database
append_dot_mydomain = no
biff = no
broken_sasl_auth_clients = yes
command_directory = /usr/sbin
config_directory = /etc/postfix
daemon_directory = /usr/libexec/postfix
debug_peer_level = 2
disable_vrfy_command = no
html_directory = no
inet_interfaces = all
mail_owner = postfix
mail_spool_directory = /var/spool/mail
mailbox_size_limit = 0
mailq_path = /usr/bin/mailq
manpage_directory = /usr/share/man
mydestination = $myhostname, localhost.$mydomain, $transport_maps
mydomain = sale.domainxxx.vn
myhostname = mail.sale.domainxxx.vn
mynetworks = 127.0.0.0/8
myorigin = $myhostname
newaliases_path = /usr/bin/newaliases
queue_directory = /var/spool/postfix
readme_directory = /usr/share/doc/postfix-2.2.10/README_FILES
recipient_delimiter = +
sample_directory = /usr/share/doc/postfix-2.2.10/samples
sendmail_path = /usr/sbin/sendmail.postfix
setgid_group = postdrop
smtp_tls_note_starttls_offer = yes
smtp_use_tls = yes
smtpd_banner = $myhostname
smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination
smtpd_sasl_auth_enable = yes
smtpd_sasl_authenticated_header = yes
smtpd_sasl_local_domain =
smtpd_sasl_path = ./dovecot-auth
smtpd_sasl_security_options = noanonymous
smtpd_sasl_type = dovecot
smtpd_tls_CAfile = /etc/postfix/ssl/mailserver/cacert.pem
smtpd_tls_key_file = /etc/postfix/ssl/mailserver/smtpd.key
smtpd_tls_loglevel = 1
smtpd_tls_received_header = no
smtpd_tls_session_cache_timeout = 3600s
smtpd_use_tls = yes
tls_random_source = dev:/dev/urandom
unknown_local_recipient_reject_code = 450
virtual_alias_maps = mysql:/etc/postfix/mysql_virtual_alias_maps.cf
virtual_gid_maps = static:12
virtual_mailbox_base = /var/vmail
virtual_mailbox_domains = mysql:/etc/postfix/mysql_virtual_domains_maps.cf
virtual_mailbox_limit_maps = mysql:/etc/postfix/mysql_virtual_mailbox_limit_maps.cf
virtual_mailbox_maps = mysql:/etc/postfix/mysql_virtual_mailbox_maps.cf
virtual_minimum_uid = 150
virtual_transport = dovecot
virtual_uid_maps = static:150 


và File : /etc/dovecot.conf

Code:
# 1.0.7: /etc/dovecot.conf
base_dir: /var/run/dovecot/
log_path: /var/log/maillog
log_timestamp: %Y-%m-%d %H:%M:%S
protocols: imap pop3 imaps pop3s
login_dir: /var/run/dovecot/login
login_executable(default): /usr/libexec/dovecot/imap-login
login_executable(imap): /usr/libexec/dovecot/imap-login
login_executable(pop3): /usr/libexec/dovecot/pop3-login
first_valid_uid: 150
last_valid_uid: 150
mail_location: maildir:/var/vmail/%d/%n/Maildir
maildir_copy_with_hardlinks: yes
mail_executable(default): /usr/libexec/dovecot/imap
mail_executable(imap): /usr/libexec/dovecot/imap
mail_executable(pop3): /usr/libexec/dovecot/pop3
mail_plugins(default):
mail_plugins(imap):
mail_plugins(pop3): quota
mail_plugin_dir(default): /usr/lib/dovecot/imap
mail_plugin_dir(imap): /usr/lib/dovecot/imap
mail_plugin_dir(pop3): /usr/lib/dovecot/pop3
pop3_client_workarounds(default):
pop3_client_workarounds(imap):
pop3_client_workarounds(pop3): outlook-no-nuls oe-ns-eoh
namespace:
  type: private
  separator: /
  inbox: yes
auth default:
  mechanisms: plain login
  default_realm: sale.domainxxx.vn
  user: vmail
  passdb:
    driver: sql
    args: /etc/dovecot-mysql.conf
  userdb:
    driver: sql
    args: /etc/dovecot-mysql.conf
  socket:
    type: listen
    client:
      path: /var/spool/postfix/dovecot-auth
      mode: 3
      user: vmail
      group: vmail



Nhờ anh em hỗ trợ giúp với. Tks.

---
Nên đọc cái này: /hvaonline/posts/list/23321.html để biết khi nào dùng [ quote ], khi nào dùng [ code ].
[Up] [Print Copy]
  [Discussion]   Lỗi khi nhận mail (Postfix / Dovecot / MySQL ) 28/06/2012 14:41:38 (+0700) | #2 | 265703
zero0_0
Member

[Minus]    0    [Plus]
Joined: 13/10/2011 12:21:49
Messages: 15
Offline
[Profile] [PM]
Jun 28 15:32:33 localhost postfix/smtpd[20648]: connect from mail-ob0-f171.google.com[209.85.214.171]
Jun 28 15:32:34 localhost postfix/cleanup[20752]: 33E0169F8846: message-id=<20120628083234.33E0169F8846@mail.sale.domainxxx.vn>
Jun 28 15:32:34 localhost postfix/qmgr[19120]: 33E0169F8846: from=<double-bounce@mail.sale.domainxxx.vn>, size=923, nrcpt=1 (queue active)
Jun 28 15:32:34 localhost postfix/smtpd[20648]: disconnect from mail-ob0-f171.google.com[209.85.214.171]
Jun 28 15:32:34 localhost postfix/local[20757]: 33E0169F8846: to=<postfix@mail.sale.domainxxx.vn>, orig_to=<postmaster>, relay=local, delay=0.03, delays=0.02/0.01/0/0, dsn=2.0.0, status=sent (delivered to mailbox) 


Đây là log khi gửi từ gmail vào user@sale.domainxxx.vn
[Up] [Print Copy]
  [Discussion]   Lỗi khi nhận mail (Postfix / Dovecot / MySQL ) 28/06/2012 14:57:03 (+0700) | #3 | 265706
[Avatar]
nhattruongadm
Member

[Minus]    0    [Plus]
Joined: 07/12/2009 05:35:23
Messages: 12
Offline
[Profile] [PM]
Bạn thử kiểm tra file: /etc/postfix/aliases và thêm # trước dòng:
postfix: root
Sau đó check lại mail thử.
[Up] [Print Copy]
  [Discussion]   Lỗi khi nhận mail (Postfix / Dovecot / MySQL ) 28/06/2012 15:15:24 (+0700) | #4 | 265707
zero0_0
Member

[Minus]    0    [Plus]
Joined: 13/10/2011 12:21:49
Messages: 15
Offline
[Profile] [PM]

nhattruongadm wrote:
Bạn thử kiểm tra file: /etc/postfix/aliases và thêm # trước dòng:
postfix: root
Sau đó check lại mail thử. 


#root: postfix

Vẫn vậy bạn ah.
[Up] [Print Copy]
  [Discussion]   Lỗi khi nhận mail (Postfix / Dovecot / MySQL ) 28/06/2012 15:31:53 (+0700) | #5 | 265708
[Avatar]
quanta
Moderator

Joined: 28/07/2006 14:44:21
Messages: 7265
Location: $ locate `whoami`
Offline
[Profile] [PM]
Bạn có thể bắt đầu từ đây:

zero0_0 wrote:

#tail -f /var/log/maillog

Jun 28 15:07:21 localhost postfix/smtpd[20424]: warning: unknown[113.172.3.210]: SASL LOGIN authentication failed: UGFzc3dvcmQ6
deliver(test02@sdomainxxx.vn): 2012-06-28 15:07:21 Error: Can't connect to auth server at /var/run/dovecot/auth-master: Connection refused
 

Let's build on a great foundation!
[Up] [Print Copy]
  [Discussion]   Lỗi khi nhận mail (Postfix / Dovecot / MySQL ) 02/07/2012 13:18:49 (+0700) | #6 | 265945
centos
Member

[Minus]    0    [Plus]
Joined: 28/03/2008 17:13:12
Messages: 219
Offline
[Profile] [PM]
Bạn xem lại:

smtpd_sasl_path



socket:
type: listen
client:
path: /var/spool/postfix/dovecot-auth
mode: 3
user: vmail
group: vmail

[Up] [Print Copy]
[digg] [delicious] [google] [yahoo] [technorati] [reddit] [stumbleupon]
Go to: 
 Users currently in here 
1 Anonymous

Powered by JForum - Extended by HVAOnline
 hvaonline.net  |  hvaforum.net  |  hvazone.net  |  hvanews.net  |  vnhacker.org
1999 - 2013 © v2012|0504|218|