postfix a amavis

Jaroslav Votruba jaroslav.votruba at keytec.cz
Fri Aug 17 12:34:10 CEST 2007


tak jsem se dostal zase kus s postfixem,ale zase další chyby .
testoval jsem telnetem postfixe-prijima
v mysql DB a tabulky jsou,a jsou i pristupny z uctu vmail s danym heslem 
a jsou i vyplneny daty

Nicmene pokud chci otestovat courieara pres telnet ,prestane mi 
odpovidat pri zadani hesla.pokud se pokusim pripojit veverkou ,vyhodi to 
chybu "ERROR: Connection dropped by IMAP server." a v logu je 


Aug 17 11:12:40 www postfix/qmgr[588]: D042B73F0F: from=<>, size=2075, 
nrcpt=1 (queue active)
Aug 17 11:12:40 www postfix/qmgr[588]: 066B274558: from=<>, size=2092, 
nrcpt=1 (queue active)
Aug 17 11:12:40 www postfix/virtual[1615]: warning: recipient 
spravce at dvorec.eu: not found in virtual_gid_maps
Aug 17 11:12:40 www postfix/virtual[1615]: D042B73F0F: 
to=<spravce at dvorec.eu>, relay=virtual, delay=160066, dsn=4.3.5, 
status=deferred (mail system configuration error)
Aug 17 11:12:40 www postfix/virtual[1616]: warning: recipient 
spravce at dvorec.eu: not found in virtual_gid_maps
Aug 17 11:12:40 www postfix/virtual[1616]: 066B274558: 
to=<spravce at dvorec.eu>, relay=virtual, delay=160065, dsn=4.3.5, 
status=deferred (mail system configuration error)
Aug 17 11:31:19 www couriertcpd: chdir spravce at dvorec.eu/: No such file 
or directory
Aug 17 11:43:14 www postfix/postfix-script: refreshing the Postfix mail 
system
Aug 17 11:43:14 www postfix/postsuper[1678]: fatal: scan_dir_push: open 
directory active: Permission denied
Aug 17 11:43:36 www postfix/postfix-script: stopping the Postfix mail system
Aug 17 11:43:36 www postfix/master[586]: terminating on signal 15
Aug 17 11:43:44 www postfix/postsuper[1703]: fatal: scan_dir_push: open 
directory defer: Permission denied
Aug 17 11:43:45 www postfix/postfix-script: fatal: Postfix integrity 
check failed!
Aug 17 11:45:54 www postfix/postfix-script: starting the Postfix mail system
Aug 17 11:45:54 www postfix/master[1769]: daemon started -- version 
2.3-20050726, configuration /usr/local/etc/postfix


v postfixadminu jde normálně zadávat domény,jména vše, ale v adresáři 
/var/mail/virtual (uživatel vmail ,práva  755)se žádný podadresář 
nevytvoří.Trochu me zarazi že pokud nedám v main.cz "mail_owner = 
postfix",tak se postfix nerozbehne,ale jak muže zapisovat do 
/var/mail/virtual když nemá práva?

připojuji konfigy,jestli by jste mi na to mohli kouknout,protože fakt už 
nevím

main.cf


######sekce nastaveni domen a odkud budu prijimat postu####
myhostname = mujkomp.dvorec.eu
mydomain = dvorec.eu
myorigin = $myhostname
mydestination = localhost, dvorec.eu
mynetworks =  127.0.0.0/8, 192.168.0.0/24
#strict_rfc821_envelopes = yes



#####Security Options#######################################
disable_vrfy_command = yes
smtpd_etrn_restrictions = permit_mynetworks, reject
smtpd_helo_required = yes
spf_explanation = "%{h} [%{i}] is not allowed to send mail for %{s}"

##### SASL Configuration####################################
#smtpd_sasl_auth_enable = yes
#broken_sasl_auth_clients = yes
#smtpd_sasl_local_domain = $myhostname
#smtpd_sasl_application_name = smtpd
#smtpd_sasl_security_options = noanonymous

#####Antispamoviny##########################################

smtpd_recipient_restrictions =

        reject_non_fqdn_recipient
        reject_non_fqdn_sender
        reject_unknown_sender_domain
        reject_unknown_recipient_domain
        permit_mynetworks
        reject_unauth_destination
        reject_non_fqdn_hostname
        reject_invalid_hostname
        #permit_sasl_authenticated
        reject_unauth_destination
        reject_unknown_sender_domain
        #reject_spf_invalid_sender
        reject_rbl_client bl.spamcop.net
        reject_rbl_client sbl-xbl.spamhaus.org
        reject_rbl_client relays.ordb.org
        reject_rbl_client opm.blitzed.org
        reject_rbl_client list.dsbl.org
        reject_rbl_client sbl.spamhaus.org
        reject_rbl_client cbl.abuseat.org
        permit

home_mailbox = Maildir/

#####virtualni mapy#######################################
# tabulka aliasu - nastaveni k DB v souboru cf
virtual_alias_maps = mysql:/usr/local/etc/postfix/cnf/virtual_alias_maps.cnf
# Kde se budou vytvaret mailboxy
virtual_mailbox_base = /var/mail/virtual/
# tabulka mailboxu
virtual_mailbox_maps = 
mysql:/usr/local/etc/postfix/cnf/virtual_mailbox_maps.cnf
#transportni mapy
transport_maps = mysql:/usr/local/etc/postfix/cnf/virtual_transport_maps.cnf
local_transport = virtual
local_recipient_maps = $virtual_mailbox_maps
virtual_mailbox_domains = 
mysql:/usr/local/etc/postfix/virtual_domains_maps.cf
virtual_alias_domains =

####virtual_uid_maps = mysql:/usr/local/etc/postfix/cnf/virtual_uid_maps.cnf
####virtual_gid_maps =  
mysql:/usr/local/etc/postfix/cnf/virtual_gid_maps.cnf
# minimalni id usera, ktery muze sahat do mailboxu
virtual_minimum_uid = 1002
# id usera, pod kterym se budou zakladat schranky
virtual_uid_maps = static:1002





#####limity###############################################
virtual_mailbox_limit_inbox = no
virtual_mailbox_limit_maps= 
mysql:/usr/local/etc/postfix/cnf/virtual_mailbox_limit_maps.cnf
virtual_mailbox_limit_override = yes
virtual_maildir_extended = yes
virtual_create_maildirsize = yes
#max velikost zpravy
message_size_limit = 143360000
#max velikost schranky
virtual_mailbox_limit = 2048000000
#oznameni o naplneni schranky
virtual_maildir_limit_message = Prekrocen limit schranky-vymazte prosim 
nepotrebne e-maily
virtual_overquota_bounce = yes

# TLS
smtp_use_tls = yes
smtpd_use_tls = yes
smtp_tls_note_starttls_offer = yes
smtpd_tls_key_file = /etc/_ssl_cert/smtpd.pem
smtpd_tls_cert_file = /etc/_ssl_cert/smtpd.pem
smtpd_tls_CAfile = /etc/_ssl_cert/smtpd.pem
smtpd_tls_loglevel = 1
smtpd_tls_received_header = yes
smtpd_tls_session_cache_timeout = 3600s
tls_random_source = dev:/dev/urandom

# obsahovy filtr Amavis via SMTP
content_filter = smtp-amavis:[127.0.0.1]:10024

#Pridano kvuli vacation
#transport_maps = hash:/usr/local/etc/postfix/transport
vacation_destination_recipient_limit = 1


readme_directory = no
sample_directory = /usr/local/etc/postfix
sendmail_path = /usr/local/sbin/sendmail
html_directory = no
setgid_group = maildrop
command_directory = /usr/local/sbin
manpage_directory = /usr/local/man
daemon_directory = /usr/local/libexec/postfix
newaliases_path = /usr/local/bin/newaliases
mailq_path = /usr/local/bin/mailq
queue_directory = /var/spool/postfix
mail_owner = postfix




nastaveni konfigurace autentizace vuci  MySQL
 /usr/local/etc/authlib/authmysqlrc


MYSQL_SERVER        localhost
#nasledujici polozky nastavit dle toho,co jste vlozili do DB
MYSQL_USERNAME        vmail
MYSQL_PASSWORD        fixpost
MYSQL_SOCKET /tmp/mysql.sock
MYSQL_PORT        0
MYSQL_OPT        0
MYSQL_DATABASE        postfix
MYSQL_USER_TABLE    mailbox
#MYSQL_CLEAR_PWFIELD password
MYSQL_CRYPT_PWFIELD  password
#cislo zmenit dle virtual_uid_maps = static:1002
MYSQL_UID_FIELD        '1002'
MYSQL_GID_FIELD        '1002'
MYSQL_LOGIN_FIELD    username
#cestu zmenit dle virtual_mailbox_base = /var/mail/virtual/ v main.cf
MYSQL_HOME_FIELD    '/var/mail/virtual/'
MYSQL_MAILDIR_FIELD    maildir
MYSQL_NAME_FIELD     name
MYSQL_QUOTA_FIELD    quota
MYSQL_WHERE_CLAUSE active='1'


cyrus-sasl2

/usr/local/lib/sasl2/smtpd.conf
pwcheck_method: auxprop
mech_list: plain login
sql_engine: mysql
auxprop_plugin: sql
srp_mda: md5
password_format: crypt
sql_hostnames: localhost
# upravit dle DB-INSERT INTO user (Host, User, Password) VALUES 
('localhost','vmail',password('fixpost'));
sql_user: vmail
sql_passwd: fixpost
sql_database: postfix
sql_select: select password from mailbox where username = '%u@%r'

pripadá mi to pospojovaný dobře, ale evidentně někde něco hapruje.

-- 
s pozdravem
Votruba Jaroslav
tel: 389002504
mailto:jaroslav.votruba at keytec.cz  



More information about the Users-l mailing list