[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

PROBLEMAS DE PERMISOS



Hola, listeros!!

Vengo a vosotros para intentar resolver un problema que me lleva loco desde hace una semana.
Estoy configurando un sistema de correo IMAP con Cyrus IMAP y ESMTP con Postfix.
Tanto Cyrus como Postfix autentifican con SASL con nivel de seguridad PLAIN (de momento).
La parte de IMAP está configurada y funciona perfectamente. El que me está dando quebraderos de cabeza es Postfix. Utilizo LMTP para evitar el manejo de colas en los correos locales. El tema está en que no es capaz de acceder al socket de LMTP por problemas de permisos:

Jul  6 09:37:46 localhost postfix/qmgr[25940]: B5832B3B61: from=<root@arenysensefils.org>, size=636, nrcpt=1 (queue active)
Jul  6 09:37:46 localhost postfix/qmgr[25940]: 4A63DB3950: from=<hector@localhost>, size=405, nrcpt=1 (queue active)
Jul  6 09:37:46 localhost postfix/qmgr[25940]: 9B2C8B3B5A: from=<>, size=2436, nrcpt=1 (queue active)
Jul  6 09:37:46 localhost postfix/lmtp[409]: 4A63DB3950: to=<hector@localhost>, relay=none, delay=44071, status=deferred (connect to /var/run/cyrus/socket/lmtp[/var/run/cyrus/socket/lmtp]: Permission denied)
Jul  6 09:37:46 localhost postfix/lmtp[412]: B5832B3B61: to=<hector@arenysensefils.org>, orig_to=<root>, relay=none, delay=11461, status=deferred (connect to /var/run/cyrus/socket/lmtp[/var/run/cyrus/socket/lmtp]: Permission denied)
Jul  6 09:37:46 localhost postfix/lmtp[410]: 9B2C8B3B5A: to=<hector@localhost>, relay=none, delay=29129, status=deferred (connect to /var/run/cyrus/socket/lmtp[/var/run/cyrus/socket/lmtp]: Permission denied)

Otro problema que tengo es la propia autenticacion del SMTP. Postfix no es capaz de conectar con el socket de saslauthd también por problemas de permisos o de que el usuario postfix es incapaz de acceder al socket.

Jul  6 01:21:11 localhost postfix/master[25447]: daemon started -- version 2.1.5
Jul  6 01:21:42 localhost postfix/smtpd[25453]: connect from localhost.localdomain[127.0.0.1]
Jul  6 01:22:04 localhost postfix/smtpd[25453]: warning: SASL authentication failure: cannot connect to saslauthd server: Permission denied


Aquí va mi /etc/postfix/main.cf

# See /usr/share/postfix/main.cf.dist for a commented, more complete version

setgid_group = postdrop

smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
biff = no

# appending .domain is the MUA's job.
append_dot_mydomain = no

# Uncomment the next line to generate "delayed mail" warnings
delay_warning_time = 4h

myhostname = mail.arenysensefils.org
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
mydestination = arenysensefils.org, Sovietic.arenysensefils.org, localhost.arenysensefils.org , localhost
relayhost =
mynetworks = 127.0.0.0/8, 172.16.102.0/24
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all

local_recipient_maps =

mailbox_transport = lmtp:unix:/var/run/cyrus/socket/lmtp
smtp_sasl_auth_enable = no
smtpd_sasl_auth_enable = yes
smtpd_sasl_local_domain = Sovietic
smtpd_recipient_restrictions =
        permit_mynetworks,
        permit_sasl_authenticated,
        reject_unauth_destination
smtpd_sasl_security_options = noanonymous

y mi /etc/postfix/master.cf

# ==========================================================================
# service type  private unpriv  chroot  wakeup  maxproc command + args
#               (yes)   (yes)   (yes)   (never) (100)
# ==========================================================================
smtp      inet  n       -       n       -       -       smtpd -v
#submission inet n      -       -       -       -       smtpd
#       -o smtpd_etrn_restrictions=reject
#628      inet  n       -       -       -       -       qmqpd
pickup    fifo  n       -       -       60      1       pickup
cleanup   unix  n       -       -       -       0       cleanup
qmgr      fifo  n       -       -       300     1       qmgr
#qmgr     fifo  n       -       -       300     1       oqmgr
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
smtp      unix  -       -       -       -       -       smtp
relay     unix  -       -       -       -       -       smtp
#       -o smtp_helo_timeout=5 -o smtp_connect_timeout=5
showq     unix  n       -       -       -       -       showq
error     unix  -       -       -       -       -       error
local     unix  -       n       n       -       -       local
virtual   unix  -       n       n       -       -       virtual
lmtp      unix  -       -       n       -       -       lmtp
anvil     unix  -       -       n       -       1       anvil
#
# Interfaces to non-Postfix software. Be sure to examine the manual
# pages of the non-Postfix software to find out what options it wants.
#
# maildrop. See the Postfix MAILDROP_README file for details.
#
maildrop  unix  -       n       n       -       -       pipe
  flags=DRhu user=vmail argv=/usr/local/bin/maildrop -d ${recipient}
uucp      unix  -       n       n       -       -       pipe
  flags=Fqhu user=uucp argv=uux -r -n -z -a$sender - $nexthop!rmail ($recipient)
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 -d -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}

# only used by postfix-tls

Para la autenticacion he definido /etc/postfix/sasl/smtpd.conf

pwcheck_method: saslauthd
mech_list: plain login

Y esos son todos los ficheros que he modificado.

Los permisos:
srwxrwxrwx  1 root root 0 Jul  5 19:29 /var/run/cyrus/socket/lmtp
srwxrwxrwx  1 root root 0 Jul  6 01:34 /var/run/saslauthd/mux
-rw-------  1 root root 0 Jul  6 01:34 /var/run/saslauthd/mux.accept

Sospecho que con mux.accept se le han de dar otros permisos puesto que solo puede acceder el root o incluso añadir algo para definir quien puede acceder pero no lo tengo claro. Quien ejecuta el Postfix es el usuario postfix (que pertenece al grupo root).

Grácias por adelantado!

Un saludo!!
--
1. La libertad y el progreso son el objeto, tanto del arte, como de la vida en general
2. La libertad es la necesidad comprendida
3. La libertad es un conjunto de pequeñas restricciones
Reply to: