Nie jesteś zalogowany.
Jeśli nie posiadasz konta, zarejestruj je już teraz! Pozwoli Ci ono w pełni korzystać z naszego serwisu. Spamerom dziękujemy!

Ogłoszenie

Prosimy o pomoc dla małej Julki — przekaż 1% podatku na Fundacji Dzieciom zdazyć z Pomocą.
Więcej informacji na dug.net.pl/pomagamy/.

#1  2007-12-29 10:18:11

  Gryzon - Użytkownik

Gryzon
Użytkownik
Skąd: Trójmiasto
Zarejestrowany: 2007-06-23

[Problem] Postfix, dovecot, dspam - Wysyłanie

Witam serdecznie, mam problem z konfiguracją serwera pocztowego na postfix`ie z wykorzystaniem dovecot oraz dspam.

Mianowicie chodzi głównie o wysyłanie maili, odbieranie działa prawie bez problemu, ale o tym później.

Przy próbie wysłanie poprzez SquirrelMail w logach otrzymuję komunikat:

Kod:

Dec 29 10:05:17 gateway dspam[19831]: Delivery agent returned exit code 67: /usr/lib/dovecot/deliver -d xxxxx@gmail.com
Dec 29 10:05:17 gateway postfix/lmtp[19836]: 3E747218C132: to=<xxxxx@gmail.com>, relay=127.0.0.1[127.0.0.1]:2424, delay=0.18, delays=0.06/0.01/0.04/0.06, dsn=4.3.0, status=deferred (host 127.0.0.1[127.0.0.1] said: 421 4.3.0 <xxxxx@gmail.com> Auto-Whitelisted (in reply to end of DATA command))
Dec 29 10:05:17 gateway dovecot: imap-login: Login: user=<admin@mojadomena.pl>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, secured
Dec 29 10:05:17 gateway dovecot: IMAP(admin@mojadomena.pl): Disconnected: Logged out

Nasomiast podczas wysyłania poprzez Outlock Expres w systemie Windows komunikat wygląda następująco:

Kod:

Dec 29 10:08:54 gateway postfix/smtpd[19848]: warning: dict_nis_init: NIS domain name not set - NIS lookups disabled
Dec 29 10:08:54 gateway postfix/smtpd[19848]: warning: 1.2.3.4: hostname innadomena.pl verification failed: Name or service not known
Dec 29 10:08:54 gateway postfix/smtpd[19848]: connect from unknown[1.2.3.4]
Dec 29 10:08:54 gateway postfix/smtpd[19848]: NOQUEUE: reject: RCPT from unknown[1.2.3.4]: 554 5.7.1 <xxxxx@gmail.com>: Recipient address rejected: Access denied; from=<admin@mojadomena.pl> to=<xxxxx@gmail.com> proto=ESMTP helo=<gryzon>
Dec 29 10:08:54 gateway postfix/smtpd[19848]: warning: restriction `check_relay_domains' after `reject' is ignored
Dec 29 10:08:55 gateway postfix/smtpd[19848]: disconnect from unknown[1.2.3.4]

Poniżej przedstawiam pliki koniguracyjne:

Dovecot

Kod:

base_dir = /var/run/dovecot/
protocols = imap pop3
protocol imap {
listen = *:143
}
protocol pop3 {
listen = *:110
}
log_timestamp = "%Y-%m-%d %H:%M:%S "
syslog_facility = mail
mail_location = maildir:/vmail/%d/%u
mail_extra_groups = mail
mail_debug = no
first_valid_uid = 150
last_valid_uid = 150
maildir_copy_with_hardlinks = yes
protocol imap {
login_executable = /usr/lib/dovecot/imap-login
mail_executable = /usr/lib/dovecot/imap
imap_max_line_length = 65536
}
protocol pop3 {
login_executable = /usr/lib/dovecot/pop3-login
mail_executable = /usr/lib/dovecot/pop3
pop3_uidl_format = %08Xu%08Xv
disable_plaintext_auth = no
}
protocol lda {
postmaster_address = postmaster@mojadomena.pl
sendmail_path = /usr/lib/sendmail
auth_socket_path = /var/run/dovecot/auth-master
}
auth_verbose = no
auth_debug = no
auth_debug_passwords = no
auth default {
mechanisms = plain
passdb sql {
args = /etc/dovecot/dovecot-sql.conf
}
userdb sql {
args = /etc/dovecot/dovecot-sql.conf
}
user = nobody
socket listen {
master {
path = /var/run/dovecot/auth-master
mode = 0660
user = vmail
group = mail
}
client {
path = /var/spool/postfix/private/auth
mode = 0660
user = postfix
group = postfix
}
}
}

DSPAM

Kod:

Home /var/spool/dspam
StorageDriver /usr/lib/dspam/libhash_drv.so
TrustedDeliveryAgent "/usr/lib/dovecot/deliver -d %u"
UntrustedDeliveryAgent "/usr/lib/dovecot/deliver -d %u"
QuarantineAgent "/usr/lib/dovecot/deliver -d %u -m SPAM"
OnFail error
Trust root
Trust dspam
Trust mail
Trust mailnull
Trust smmsp
Trust daemon
Debug *
TrainingMode teft
TestConditionalTraining on
Feature chained
Feature whitelist
Algorithm graham burton
PValue graham
Preference "spamAction=tag"
Preference "signatureLocation=message"  # 'message' or 'headers'
Preference "showFactors=on"
Preference "spamSubject=[SPAM]"
AllowOverride trainingMode
AllowOverride spamAction spamSubject
AllowOverride statisticalSedation
AllowOverride enableBNR
AllowOverride enableWhitelist
AllowOverride signatureLocation
AllowOverride showFactors
AllowOverride optIn optOut
AllowOverride whitelistThreshold
HashRecMax              98317
HashAutoExtend          on
HashMaxExtents          0
HashExtentSize          49157
HashMaxSeek             100
HashConnectionCache     10
Notifications   off
PurgeSignatures 14          # Stale signatures
PurgeNeutral    90          # Tokens with neutralish probabilities
PurgeUnused     90          # Unused tokens
PurgeHapaxes    30          # Tokens with less than 5 hits (hapaxes)
PurgeHits1S     15          # Tokens with only 1 spam hit
PurgeHits1I     15          # Tokens with only 1 innocent hit
LocalMX 127.0.0.1
SystemLog on
UserLog   on
Opt out
TrackSources spam virus
ParseToHeaders on
ChangeModeOnParse on
ChangeUserOnParse full
ServerPort              2424
ServerPID /var/run/dspam.pid
ServerMode standard
ServerPass.Relay1       "secret"
ServerParameters        "--deliver=innocent"
ClientIdent     "secret@Relay1"
ClamAVPort 3310
ClamAVHost 127.0.0.1
ClamAVResponse reject
ProcessorBias on
Include /etc/dspam/dspam.d/

Postfix - main.cf

Kod:

myhostname = nazwa_hosta
smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
biff = no
append_dot_mydomain = no
myorigin = mojadomena.pl
mydestination = $myhostname, localhost, locahost.localdomain
mynetworks = 127.0.0.0/8

smtpd_sasl_auth_enable = yes
broken_sasl_auth_clients = yes
smtpd_sasl_security_options = noanonymous
smtpd_sasl_type = dovecot
smtpd_sasl_path = private/auth

recipient_delimiter = +
inet_interfaces = all
proxy_read_maps = $local_recipient_maps $mydestination $virtual_alias_maps $virtual_alias_domains $virtual_mailbox_maps $virtual_mailbox_domains $relay_recipient_maps $relay_domains $canonical_maps $sender_c
virtual_alias_domains =
virtual_alias_maps = proxy:mysql:$config_directory/mysql_virtual_alias_maps.cf
virtual_mailbox_domains = proxy:mysql:$config_directory/mysql_virtual_domains_maps.cf
virtual_mailbox_maps = proxy:mysql:$config_directory/mysql_virtual_mailbox_maps.cf
virtual_mailbox_base = /vmail
virtual_minimum_uid = 150
virtual_uid_maps = static:150
virtual_gid_maps = static:8
virtual_create_maildirsize = yes
virtual_mailbox_extended = yes
virtual_mailbox_limit_maps = proxy:mysql:/etc/postfix/mysql_virtual_mailbox_limit_maps.cf
virtual_mailbox_limit_override = yes
virtual_maildir_limit_message = "The user you are trying to reach has exceeded their quota."
virtual_overquota_bounce = yes
transport_maps = proxy:mysql:/etc/postfix/mysql_virtual_transports.cf
smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated , reject, check_relay_domains, reject_non_fqdn_hostname, reject_non_fqdn_sender,reject_non_fqdn_recipient, reject_unauth_destinatio
smtpd_data_restrictions = reject_unauth_pipelining, reject_multi_recipient_bounce, permit

Postfix - master.cf

Kod:

smtp      inet  n       -       -       -       -       smtpd
            -o content_filter=lmtp:127.0.0.1:2424

Jedyna zmiana jaka została wprowadzona w tym pliku to dodanie drugiej linijki.

Wracając do odbierania mail`i to wszystko jest dobrze poza faktem że wiadomośći którę są spamem są bez problemu przepuszczane, testowane na wiadomościach testowych Eicar.

Testowa wiadomość zawierająca Wirusa Eicar jest odrzucana przez serwer, natomiast wiadomość Eicar która zawiera Spam jest przepuszczana i nawet nie jest oznaczana że jest ona spamem.

Z góry bardzo dziękuję za pomoc.


"Nie ma rzeczy niemożliwych, są tylko takie, których człowiek nie nauczył się jeszcze robić"
A. Einstein

Offline

 

#2  2007-12-29 16:20:03

  bobycob - Członek z Ramienia

bobycob
Członek z Ramienia
Skąd: Wrocław
Zarejestrowany: 2007-08-15

Re: [Problem] Postfix, dovecot, dspam - Wysyłanie

nigdy nie używałem dspam
tylko spamassassin

jeżeli chodzi o wysyłanie wydaje mi się, żę problem jest tak jak odpowiada postftix

Dec 29 10:08:54 gateway postfix/smtpd[19848]: NOQUEUE: reject: RCPT from unknown[1.2.3.4]: 554 5.7.1 <xxxxx@gmail.com>: Recipient address rejected: Access denied; from=<admin@mojadomena.pl> to=<xxxxx@gmail.com> proto=ESMTP helo=<gryzon>
Dec 29 10:08:54 gateway postfix/smtpd[19848]: warning: restriction `check_relay_domains' after `reject' is ignored

gdzieś tutaj

smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated , reject, check_relay_domains, reject_non_fqdn_hostname, reject_non_fqdn_sender,reject_non_fqdn_recipient, reject_unauth_destinatio
smtpd_data_restrictions = reject_unauth_pipelining, reject_multi_recipient_bounce, permit

zmiennej

Kod:

content_filter =

nie musisz przypadkiem w main.cf zdefiniować?

Ostatnio edytowany przez bobycob (2007-12-29 16:24:13)

Offline

 

#3  2007-12-29 16:47:18

  Gryzon - Użytkownik

Gryzon
Użytkownik
Skąd: Trójmiasto
Zarejestrowany: 2007-06-23

Re: [Problem] Postfix, dovecot, dspam - Wysyłanie

Zdefiniowałem w main.cf coś takiego i zakomentowałem to w master.cf:

Kod:

content_filter = lmtp:127.0.0.1:2424

niestety komunikat w logach nie uległ zmianie.

Co do wysyłania z Outlock`a to problemem napewno jest błędnie ustawiony revDNS u mojego dostawcy internetu, niestety nie wiem które parametry są odpowiedzialne za sprawdzanie revDNS.


PROBLEM ZOSTAŁ ROZWIĄZANY
Zmieniłem Dspam na Spamassassin, oraz wprowadziłem kilka poprawek w konfiguracji Dovecot oraz w main.cf Postfix`a. Po tych operacjach wszystko zaczeło działać poprawnie.

Ostatnio edytowany przez Gryzon (2007-12-30 11:12:40)


"Nie ma rzeczy niemożliwych, są tylko takie, których człowiek nie nauczył się jeszcze robić"
A. Einstein

Offline

 

Stopka forum

Powered by PunBB
© Copyright 2002–2005 Rickard Andersson
Nas ludzie lubią po prostu, a nie klikając w przyciski ;-)