Portál AbcLinuxu, 11. května 2025 07:16

Dotaz: mail server postfix chyba

25.3.2010 17:41 Koza newton
mail server postfix chyba
Přečteno: 1316×
Odpovědět | Admin
Zdravím, mám problém..Nainstaloval jsem mail server, ale když si pošlu na ten server z nějakého mailu email, tak se v logu vypíše toto.

Mar 25 16:31:11 crazyhost postfix/smtpd[28542]: connect from mxh.seznam.cz[77.75.72.26]

Mar 25 16:31:11 crazyhost postfix/smtpd[28542]: 75FFF4463: client=mxh.seznam.cz[77.75.72.26]

Mar 25 16:31:11 crazyhost postfix/cleanup[27928]: 75FFF4463: message-id=<6696.5113.5400-13978-1472855567-1269534670@seznam.cz>

Mar 25 16:31:11 crazyhost postfix/qmgr[27786]: 75FFF4463: from=super@seznam.cz, size=1100, nrcpt=1 (queue active)

Mar 25 16:31:11 crazyhost postfix/qmgr[27786]: warning: connect to transport dovecot: Connection refused

Mar 25 16:31:11 crazyhost postfix/smtpd[28542]: disconnect from mxh.seznam.cz[77.75.72.26]

Mar 25 16:31:11 crazyhost postfix/error[28547]: 75FFF4463: to=super@dfse.cz, relay=none, delay=0.07, delays=0.04/0/0/0.03, dsn=4.3.0, status=deferred (mail transport unavailable)

nesetkal se s tím někdo ? dík moc.
Nástroje: Začni sledovat (1) ?Zašle upozornění na váš email při vložení nového komentáře.

Odpovědi

Jakub Lucký avatar 25.3.2010 18:05 Jakub Lucký | skóre: 40 | Praha
Rozbalit Rozbalit vše Re: mail server postfix chyba
Odpovědět | | Sbalit | Link | Blokovat | Admin
Nepíše něco dovecot? Co je v konfiguračních souborech?
If you understand, things are just as they are; if you do not understand, things are just as they are.
25.3.2010 19:40 Koza newton
Rozbalit Rozbalit vše Re: mail server postfix chyba
devocot.conf
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:/var/vmail/%d/%u
mail_access_groups = mail
mail_debug = no
first_valid_uid = 500 
last_valid_uid = 0 
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
}
protocol lda {
postmaster_address = postmaster@mydomain.com
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
user = root
passdb sql {
args = /etc/dovecot/dovecot-sql.conf
}
userdb sql {
args = /etc/dovecot/dovecot-sql.conf
}

socket listen {
master {
path = /var/run/dovecot/auth-master
mode = 0660
user = mail
group = mail
}
client {
path = /var/spool/postfix/private/auth
mode = 0660
user = postfix
group = postfix
}
}
#
# If you want client certificates, use these lines
# ssl_require_client_cert = yes
# ssl_username_from_cert = yes
}
25.3.2010 19:42 Koza newton
Rozbalit Rozbalit vše Re: mail server postfix chyba
teda dovecot.conf
25.3.2010 20:44 svaca | skóre: 38
Rozbalit Rozbalit vše Re: mail server postfix chyba
jake jsou prava dovecot.conf ? Jak je nastaven transportdovecotu v main.cf ? a master.cf ?
Never give up ! Stay ATARI !
25.3.2010 20:48 Koza newton
Rozbalit Rozbalit vše Re: mail server postfix chyba
main.cf
smtpd_banner = $myhostname ESMTP $mail_name
biff = no
append_dot_mydomain = no
#delay_warning_time = 4h
myhostname = mojedomena.cz
myorigin = /etc/mailname
mydestination = mojedomena.cz, localhost.cz, , localhost
relayhost =
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases

# Virtual mailbox settings
virtual_mailbox_domains = proxy:mysql:$config_directory/mysql_virtual_domains_maps.cf
virtual_mailbox_base = /var/vmail
virtual_mailbox_maps = proxy:mysql:$config_directory/mysql_virtual_mailbox_maps.cf
virtual_alias_maps = proxy:mysql:$config_directory/mysql_virtual_alias_maps.cf
virtual_minimum_uid = 150
virtual_uid_maps = static:150
virtual_gid_maps = static:8
virtual_transport = dovecot
dovecot_destination_recipient_limit = 1 

# SASL Authentication

broken_sasl_auth_clients = yes
smtpd_sasl_auth_enable = yes
smtpd_sasl_security_options = noanonymous
smtpd_sasl_application_name = smtpd
smtpd_use_tls =                 yes
smtp_use_tls =                  yes


# TLS settings
smtpd_tls_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem
smtpd_tls_key_file=/etc/ssl/private/ssl-cert-snakeoil.key
smtpd_use_tls=yes
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache

master.cf
#
# Postfix master process configuration file.  For details on the format
# of the file, see the master(5) manual page (command: "man 5 master").
#
# Do not forget to execute "postfix reload" after editing this file.
#
# ==========================================================================
# service type  private unpriv  chroot  wakeup  maxproc command + args
#               (yes)   (yes)   (yes)   (never) (100)
# ==========================================================================
smtp      inet  n       -       -       -       -       smtpd
#submission inet n       -       -       -       -       smtpd
#  -o smtpd_tls_security_level=encrypt
#  -o smtpd_sasl_auth_enable=yes
#  -o smtpd_client_restrictions=permit_sasl_authenticated,reject
#  -o milter_macro_daemon_name=ORIGINATING
#smtps     inet  n       -       -       -       -       smtpd
#  -o smtpd_tls_wrappermode=yes
#  -o smtpd_sasl_auth_enable=yes
#  -o smtpd_client_restrictions=permit_sasl_authenticated,reject
#  -o milter_macro_daemon_name=ORIGINATING
#628      inet  n       -       -       -       -       qmqpd
pickup    fifo  n       -       -       60      1       pickup
cleanup   unix  n       -       -       -       0       cleanup
qmgr      fifo  n       -       n       300     1       qmgr
#qmgr     fifo  n       -       -       300     1       oqmgr
tlsmgr    unix  -       -       -       1000?   1       tlsmgr
rewrite   unix  -       -       -       -       -       trivial-rewrite
bounce    unix  -       -       -       -       0       bounce
defer     unix  -       -       -       -       0       bounce
trace     unix  -       -       -       -       0       bounce
verify    unix  -       -       -       -       1       verify
flush     unix  n       -       -       1000?   0       flush
proxymap  unix  -       -       n       -       -       proxymap
proxywrite unix -       -       n       -       1       proxymap
smtp      unix  -       -       -       -       -       smtp
# When relaying mail as backup MX, disable fallback_relay to avoid MX loops
relay     unix  -       -       -       -       -       smtp
	-o smtp_fallback_relay=
#       -o smtp_helo_timeout=5 -o smtp_connect_timeout=5
showq     unix  n       -       -       -       -       showq
error     unix  -       -       -       -       -       error
retry     unix  -       -       -       -       -       error
discard   unix  -       -       -       -       -       discard
local     unix  -       n       n       -       -       local
virtual   unix  -       n       n       -       -       virtual
lmtp      unix  -       -       -       -       -       lmtp
anvil     unix  -       -       -       -       1       anvil
scache    unix  -       -       -       -       1       scache
#
# ====================================================================
# Interfaces to non-Postfix software. Be sure to examine the manual
# pages of the non-Postfix software to find out what options it wants.
#
# Many of the following services use the Postfix pipe(8) delivery
# agent.  See the pipe(8) man page for information about ${recipient}
# and other message envelope options.
# ====================================================================
#
# maildrop. See the Postfix MAILDROP_README file for details.
# Also specify in main.cf: maildrop_destination_recipient_limit=1
#
maildrop  unix  -       n       n       -       -       pipe
  flags=DRhu user=vmail argv=/usr/bin/maildrop -d ${recipient}
#
# See the Postfix UUCP_README file for configuration details.
#
uucp      unix  -       n       n       -       -       pipe
  flags=Fqhu user=uucp argv=uux -r -n -z -a$sender - $nexthop!rmail ($recipient)
#
# Other external delivery methods.
#
ifmail    unix  -       n       n       -       -       pipe
  flags=F user=ftn argv=/usr/lib/ifmail/ifmail -r $nexthop ($recipient)
bsmtp     unix  -       n       n       -       -       pipe
  flags=Fq. user=bsmtp argv=/usr/lib/bsmtp/bsmtp -t$nexthop -f$sender $recipient
scalemail-backend unix	-	n	n	-	2	pipe
  flags=R user=scalemail argv=/usr/lib/scalemail/bin/scalemail-store ${nexthop} ${user} ${extension}
mailman   unix  -       n       n       -       -       pipe
  flags=FR user=list argv=/usr/lib/mailman/bin/postfix-to-mailman.py
  ${nexthop} ${user}
25.3.2010 21:22 svaca | skóre: 38
Rozbalit Rozbalit vše Re: mail server postfix chyba
Tohle je spravne:

virtual_transport = dovecot

Ale v master.cf ti chybi ten transport ... :-) tedy:

dovecot   unix  -       n       n       -       -       pipe
  flags=DRhu user=vmail:vmail argv=/usr/lib/dovecot/deliver -d ${recipient}

tvuj user je UD 150 (doufam, tady , ze je to vmail user jako mam ja (jinak uprav) a zkontroluj cesku : argv=
Never give up ! Stay ATARI !
25.3.2010 21:31 svaca | skóre: 38
Rozbalit Rozbalit vše Re: mail server postfix chyba
tak podle dovecota je tvuj "vmail" user : mai ... takze jestli je to tak, prepis vmail na mail...
Never give up ! Stay ATARI !
25.3.2010 21:47 Koza newton
Rozbalit Rozbalit vše Re: mail server postfix chyba
dík, neco jsem poresil s tim, ale v mail logu
Mar 25 20:43:43 crazyhost postfix/master[7871]: terminating on signal 15
Mar 25 20:43:44 crazyhost postfix/master[8069]: daemon started -- version 2.5.5, configuration /etc/postfix
Mar 25 20:43:44 crazyhost postfix/qmgr[8076]: 3E2578D8C: from=super@seznam.cz, size=1137, nrcpt=1 (queue active)
Mar 25 20:43:44 crazyhost deliver(super@dfse.cz): setgid(5002) failed with euid=150, gid=112, egid=112: Operation not permitted
Mar 25 20:43:44 crazyhost postfix/pipe[8079]: 3E2578D8C: to=super@dfse.cz, relay=dovecot, delay=349, delays=349/0.01/0/0.07, dsn=4.3.0, status=deferred (temporary failure)
Mar 25 20:43:50 crazyhost dovecot: imap-login: Login: user=super@dfse.cz, method=PLAIN, rip=89.185.247.166, lip=89.185.247.166, secured
Mar 25 20:43:50 crazyhost dovecot: IMAP(super@dfse.cz): Disconnected: Logged out
25.3.2010 23:48 svaca | skóre: 38
Rozbalit Rozbalit vše Re: mail server postfix chyba
Je to jednoduche,, porad mas spatne toho vitrualniho usera pro vybirani/dorucovani/ posty ..

jake prava ma /home/vmail ? A postni mi: getent passwd

dik
Never give up ! Stay ATARI !
26.3.2010 13:51 Koza newton
Rozbalit Rozbalit vše Re: mail server postfix chyba
s linuxem moc neumím, dělam dle navodu...jak zjistim ty prava ? jinak tady jsou ti useri
root:x:0:0:root:/root:/bin/bash
daemon:x:1:1:daemon:/usr/sbin:/bin/sh
bin:x:2:2:bin:/bin:/bin/sh
sys:x:3:3:sys:/dev:/bin/sh
sync:x:4:65534:sync:/bin:/bin/sync
games:x:5:60:games:/usr/games:/bin/sh
man:x:6:12:man:/var/cache/man:/bin/sh
lp:x:7:7:lp:/var/spool/lpd:/bin/sh
news:x:9:9:news:/var/spool/news:/bin/sh
uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh
proxy:x:13:13:proxy:/bin:/bin/sh
www-data:x:33:33:www-data:/var/www:/bin/sh
backup:x:34:34:backup:/var/backups:/bin/sh
list:x:38:38:Mailing List Manager:/var/list:/bin/sh
irc:x:39:39:ircd:/var/run/ircd:/bin/sh
gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh
nobody:x:65534:65534:nobody:/nonexistent:/bin/sh
libuuid:x:100:102::/var/lib/libuuid:/bin/sh
mysql:x:101:104:MySQL Server,,,:/var/lib/mysql:/bin/false
Debian-exim:x:102:105::/var/spool/exim4:/bin/false
postfix:x:103:106::/var/spool/postfix:/bin/false
sshd:x:104:65534::/var/run/sshd:/usr/sbin/nologin
popa3d:x:105:109::/var/lib/popa3d:/bin/false
dovecot:x:106:110:Dovecot mail server,,,:/usr/lib/dovecot:/bin/false
postgres:x:107:111:PostgreSQL administrator,,,:/var/lib/postgresql:/bin/bash
mail:x:150:112:.Mailman.:/var/mail:/sbin/nologin
26.3.2010 15:13 svaca | skóre: 38
Rozbalit Rozbalit vše Re: mail server postfix chyba
OK. Mas to tedy uplne blbe jak koukam .. porad, takze prikazy:

v consoli:
groupadd -g 1011 vmail
useradd -g 1011 -d /var/vmail -s /bin/false -u 1011 vmail
mkdir /var/vmail # POKUD NEEXISTUJE
chown -R vmail:vmail /var/vmail
chown root:vmail /etc/dovecot/dovecot.conf
v postfix main.cf:
virtual_mailbox_base       = /var/vmail
virtual_uid_maps           = static:1011
virtual_gid_maps           = static:1011
v master.cf:
dovecot   unix  -       n       n       -       -       pipe
  flags=DRhu user=vmail:vmail argv=/usr/lib/dovecot/deliver -d ${recipient}
v dovecot.conf:
mail_privileged_group = vmail
mail_access_groups = vmail
  socket listen {
    master {
      # Master socket provides access to userdb information. It's typically
      # used to give Dovecot's local delivery agent access to userdb so it
      # can find mailbox locations.
      path = /var/run/dovecot/auth-master
      mode = 0660
      user = vmail
      group = vmail
      # Default user/group is the one who started dovecot-auth (root)
      #user =
      #group =
    }
Ty prikazy v konzoli vykonej, ostatni mas, jen to prepis, jak ti tady pisu ja ...
Never give up ! Stay ATARI !
26.3.2010 15:22 Koza newton
Rozbalit Rozbalit vše Re: mail server postfix chyba
Píše,

dovecotError: Error in configuration file /etc/dovecot/dovecot.conf line 51: Unknown setting: mail_privileged_group Fatal: Invalid configuration in /etc/dovecot/dovecot.conf
26.3.2010 15:40 Koza newton
Rozbalit Rozbalit vše Re: mail server postfix chyba
a kdyz sem to smazal, tak se zda ze uz to nejak komunikuje, ale pise toto, maj tam byt na tech slozkach nejake artibuty ? D
Mar 26 14:37:36 crazyhost dovecot: IMAP(super@dfse.cz): opendir(/var/vmail/dfse.cz/super@dfse.cz/tmp) failed: Permission denied
Mar 26 14:37:36 crazyhost dovecot: imap-login: Login: user=super@dfse.cz>, method=PLAIN, rip=89.185.247.166, lip=89.185.247.166, secured
Mar 26 14:37:36 crazyhost dovecot: IMAP(super@dfse.cz): opendir(/var/vmail/dfse.cz/super@dfse.cz/tmp) failed: Permission denied
Mar 26 14:37:36 crazyhost dovecot: IMAP(super@dfse.cz): open() failed with index file /var/vmail/dfse.cz/super@dfse.cz/dovecot.index: Permission denied
Mar 26 14:37:36 crazyhost dovecot: IMAP(super@dfse.cz): open(/var/vmail/dfse.cz/super@dfse.cz/dovecot-uidlist) failed: Permission denied
Mar 26 14:37:36 crazyhost dovecot: IMAP(super@dfse.cz): opendir(/var/vmail/dfse.cz/super@dfse.cz/tmp) failed: Permission denied
Mar 26 14:37:36 crazyhost dovecot: IMAP(super@dfse.cz): open() failed with index file /var/vmail/dfse.cz/super@dfse.cz/dovecot.index: Permission denied
26.3.2010 15:43 svaca | skóre: 38
Rozbalit Rozbalit vše Re: mail server postfix chyba
aha ty mas overovani pres sql jeste .. postni dovecot-sql.conf ...
Never give up ! Stay ATARI !
26.3.2010 15:45 Koza newton
Rozbalit Rozbalit vše Re: mail server postfix chyba
dovecot-sql.conf
driver = mysql
connect = host=localhost dbname=spravne user=spravne password=spravne
default_pass_scheme = MD5
password_query = SELECT password FROM mailbox WHERE username = '%u' AND active = '1'
user_query = SELECT CONCAT(domain,'/',maildir) AS home, 5002 AS uid, 5002 AS gid FROM mailbox WHERE username = '%u' AND active = 1
26.3.2010 15:49 svaca | skóre: 38
Rozbalit Rozbalit vše Re: mail server postfix chyba
Doufam, ze vidis tu chybu :-) Pokud ne, prepis toto:
user_query = SELECT CONCAT(domain,'/',maildir) AS home, 1011 AS uid, 1011 AS gid FROM mailbox WHERE username = '%u' AND active = 1
Never give up ! Stay ATARI !
26.3.2010 15:55 Koza newton
Rozbalit Rozbalit vše Re: mail server postfix chyba
dík, jede to ale ted kdyz si poslu email, tak prijde mailer-deamon :D
This is the mail system at host mujweb.cz.

I'm sorry to have to inform you that your message could not
be delivered to one or more recipients. It's attached below.

For further assistance, please send mail to postmaster.

If you do so, please include this problem report. You can
delete your own text from the attached returned message.

                   The mail system

super@dfse.cz: local configuration error. Command output: Fatal:
    open(/etc/dovecot/dovecot.conf) failed: Permission denied
26.3.2010 16:06 svaca | skóre: 38
Rozbalit Rozbalit vše Re: mail server postfix chyba
ted nevim presne jak maji byt ty prava na dovecot.conf, nepouzivam dovecot jako LDA .. ... zkus jeste:
chown vmail:root /etc/dovecot/dovecot.conf 
to same i na adresar: chown vmail:root /etc/dovecot
Never give up ! Stay ATARI !
26.3.2010 16:09 Koza newton
Rozbalit Rozbalit vše Re: mail server postfix chyba
super jede, dík moc.
26.3.2010 16:16 svaca | skóre: 38
Rozbalit Rozbalit vše Re: mail server postfix chyba
Proste jsi se UPLNE utopil v tech pravech ...

Je to jednoduche, pokud mas dovecot + postfix + mysql nebo ldap vse se toci okolo JEDINEHO vitrualniho uzivatele se stejnym GID a UID (v nasem pripade 1011 a 1011) a ty hned na zacatku jsi mel chybu v dovecot-sql, kde jsi mel 5002 ale jinde jsi mel mail usera, tedy 150, atd .. :-)
Never give up ! Stay ATARI !
26.3.2010 16:12 svaca | skóre: 38
Rozbalit Rozbalit vše Re: mail server postfix chyba
jo a ZRUS tohle, to je taky NESMYSL:
first_valid_uid = 500 
last_valid_uid = 0 
Never give up ! Stay ATARI !

Založit nové vláknoNahoru

Tiskni Sdílej: Linkuj Jaggni to Vybrali.sme.sk Google Del.icio.us Facebook

ISSN 1214-1267, (c) 1999-2007 Stickfish s.r.o.