banner

[Rule] Rules  [Home] Main Forum  [Portal] Portal  
[Members] Member Listing  [Statistics] Statistics  [Search] Search  [Reading Room] Reading Room 
[Register] Register  
[Login] Loginhttp  | https  ]
 
Messages posted by: traunui  XML
Profile for traunui Messages posted by traunui [ number of posts not being displayed on this page: 0 ]
 
Số lượng VPS thì tất nhiên phụ thuộc vào phần cứng rồi, bác hỏi thế thánh cũng ko trả lời đc smilie
Em đang thử lab Postfix + Procmail + SpamAssassin + ClamAV.
Khi thử Procmail + SpamAssassin thì đã lọc được spam. Thử thêm cái ClamAV thì send mail thử thấy ko nhận được, vào Postfix thấy mail lưu trong queue.

Những phần thay đổi trong config của Postfix
File main.cf

## ad them dong
content_filter = scan:127.0.0.1:10025
 


File master.cf


scan unix - - n - 16 smtp
-o smtp_data_done_timeout=1200
-o smtp_send_xforward_command=yes
-o disable_dns_lookups=yes
127.0.0.1:10026 inet n - n - 16 smtpd
-o content_filter=
-o receive_override_options=no_unknown_recipient_checks,no_header_body_checks
-o local_recipient_maps=
-o relay_recipient_maps=
-o smtpd_restriction_classes=
-o smtpd_client_restrictions=
-o smtpd_helo_restrictions=
-o smtpd_sender_restrictions=
-o smtpd_recipient_restrictions=permit_mynetworks,reject
-o mynetworks_style=host
-o smtpd_authorized_xforward_hosts=127.0.0.0/8
 


Những phần thay đổi trong cấu hình của ClamSMTP
File clamsmtpd.conf


# The address clamd is listening on
ClamAddress: /var/run/clamd.clamsmtp/clamd.sock

# A header to add to all scanned email
Header: X-Virus-Scanned: ClamAV using ClamSMTP

# Directory for temporary files
TempDirectory: /var/lib/clamd.clamsmtp

# What to do when we see a virus (use 'bounce' or 'pass' or 'drop'
Action: bounce
 


Log sau khi gửi mail

Feb 28 22:18:30 mail postfix/smtpd[4681]: connect from unknown[10.30.5.83]
Feb 28 22:18:30 mail postfix/smtpd[4681]: 1EBEB158139: client=unknown[10.30.5.83]
Feb 28 22:18:30 mail postfix/cleanup[4651]: 1EBEB158139: message-id=<4F4D9907.2020908@domain.local>
Feb 28 22:18:30 mail postfix/qmgr[4256]: 1EBEB158139: from=<u1@domain.local>, size=533, nrcpt=1 (queue active)
Feb 28 22:18:30 mail postfix/smtpd[4681]: disconnect from unknown[10.30.5.83]
Feb 28 22:18:30 mail spamd[1966]: spamd: connection from mail.domain.local [127.0.0.1] at port 54472
Feb 28 22:18:30 mail spamd[1966]: spamd: setuid to mail succeeded
Feb 28 22:18:30 mail spamd[1966]: spamd: processing message <4F4D9907.2020908@domain.local> for mail:8
Feb 28 22:18:30 mail spamd[1966]: spamd: clean message (-1.0/5.0) for mail:8 in 0.2 seconds, 519 bytes.
Feb 28 22:18:30 mail spamd[1966]: spamd: result: . -1 - ALL_TRUSTED scantime=0.2,size=519,user=mail,uid=8,required_score=5.0,rhost=mail.domain.local,raddr=127.0.0.1,rport=54472,mid=<4F4D9907.2020908@domain.local>,autolearn=ham
Feb 28 22:18:30 mail spamd[1961]: prefork: child states: II
Feb 28 22:18:30 mail postfix/pipe[4683]: 1EBEB158139: to=<u2@domain.local>, relay=spamassassin, delay=0.46, delays=0.05/0.02/0/0.39, dsn=2.0.0, status=sent (delivered via spamassassin service)
Feb 28 22:18:30 mail postfix/qmgr[4256]: 1EBEB158139: removed
Feb 28 22:18:30 mail postfix/pickup[4255]: 8961C158139: uid=8 from=<u1@domain.local>
Feb 28 22:18:30 mail postfix/cleanup[4650]: 8961C158139: message-id=<4F4D9907.2020908@domain.local>
Feb 28 22:18:30 mail postfix/qmgr[4256]: 8961C158139: from=<u1@domain.local>, size=832, nrcpt=1 (queue active)
Feb 28 22:18:30 mail clamsmtpd: 100042: accepted connection from: 127.0.0.1
Feb 28 22:18:30 mail postfix/smtpd[4652]: connect from mail.domain.local[127.0.0.1]
Feb 28 22:18:30 mail postfix/smtpd[4652]: 9A9AC158185: client=mail.domain.local[127.0.0.1]
Feb 28 22:18:30 mail clamsmtpd: 100042: CLAMAV: couldn't connect to: /var/run/clamd.clamsmtp/clamd.sock: Connection refused
Feb 28 22:18:30 mail clamsmtpd: 100042: from=u1@domain.local, to=u2@domain.local
Feb 28 22:18:30 mail postfix/smtp[4633]: 8961C158139: to=<u2@domain.local>, relay=127.0.0.1[127.0.0.1]:10025, delay=0.1, delays=0.03/0/0.05/0.01, dsn=4.0.0, status=deferred (host 127.0.0.1[127.0.0.1] said: 451 Local Error (in reply to end of DATA command))
Feb 28 22:18:30 mail postfix/smtpd[4652]: disconnect from mail.domain.local[127.0.0.1]
 


Em đã search thử cái lỗi CLAMAV: couldn't connect to: /var/run/clamd.clamsmtp/clamd.sock: Connection refused nhưng chưa tìm ra được giải pháp.

Hiện chỉ biết là do cái dòng content_filter = scan:127.0.0.1:10025, nó forward mail vào port 10025, ko hiểu sao mail nó ko gửi đi được.

Cảm ơn
 
Go to Page:  First Page Page 2

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