Author Topic: [SOLVED] Zentyal / Zarafa Mail issues  (Read 5330 times)

stephan_b

  • Zen Apprentice
  • *
  • Posts: 14
  • Karma: +1/-0
    • View Profile
[SOLVED] Zentyal / Zarafa Mail issues
« on: January 02, 2013, 11:26:45 am »
Hello everyone and a happy new year!
my Zentyal server doesn't deliver the mails to the mailboxes of the users (i can't see them in the Zarafa webaccess).
also, I cannot send mails from zarafa.
can anyone please help?

Thank you very much in advance

Stephan

This is my postconf -n

Code: [Select]
alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
append_dot_mydomain = no
biff = no
broken_sasl_auth_clients = yes
config_directory = /etc/postfix
disable_vrfy_command = yes
dovecot_destination_recipient_limit = 1
inet_interfaces = all
ldapvirtualmap_bind = yes
ldapvirtualmap_bind_dn = cn=zentyalro,dc=ss150,dc=local
ldapvirtualmap_bind_pw = 123456789
ldapvirtualmap_query_filter = (&(mail=%s)(!(quota=-1))(objectClass=CourierMailAccount))
ldapvirtualmap_result_attribute = mailbox
ldapvirtualmap_search_base = ou=Users,dc=ss150,dc=local
ldapvirtualmap_server_host = localhost:390
ldapvirtualmap_version = 3
local_recipient_maps = proxy:unix:passwd.byname $alias_maps
mailbox_size_limit = 0
message_size_limit = 0
mydestination = $myorigin,$myhostname,localhost,localhost.$mydomain
myhostname = SS150-DC1.ss150.local
mynetworks = 127.0.0.0/8
myorigin = /etc/mailname
recipient_delimiter = +
relayhost = smtp.blasch.de
senderlogin_bind = yes
senderlogin_bind_dn = cn=zentyalro,dc=ss150,dc=local
senderlogin_bind_pw = 123456789
senderlogin_query_filter = (&(mail=%s)(objectClass=CourierMailAccount))
senderlogin_result_attribute = mail
senderlogin_search_base = ou=Users,dc=ss150,dc=local
senderlogin_server_host = localhost:390
senderlogin_version = 3
smtp_helo_name = blasch.de
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
smtp_sasl_security_options = noanonymous
smtp_tls_cert_file = /etc/postfix/sasl/postfix.pem
smtp_tls_key_file = /etc/postfix/sasl/postfix.pem
smtp_tls_security_level = may
smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
smtpd_delay_reject = yes
smtpd_helo_required = yes
smtpd_recipient_restrictions = permit_sasl_authenticated, permit_mynetworks, reject_unauth_destination, reject_non_fqdn_sender, reject_unknown_sender_domain, reject_invalid_helo_hostname, reject_non_fqdn_helo_hostname, check_helo_access pcre:/etc/postfix/helo_checks.pcre
smtpd_restriction_classes = submission_recipient_restrictions
smtpd_sasl_auth_enable = yes
smtpd_sasl_local_domain = $myorigin
smtpd_sasl_path = private/auth
smtpd_sasl_security_options = noanonymous
smtpd_sasl_type = dovecot
smtpd_sender_login_maps = ldap:senderlogin
smtpd_sender_restrictions = reject_authenticated_sender_login_mismatch
smtpd_tls_auth_only = yes
smtpd_tls_cert_file = /etc/postfix/sasl/postfix.pem
smtpd_tls_key_file = /etc/postfix/sasl/postfix.pem
smtpd_tls_loglevel = 0
smtpd_use_tls = yes
strict_rfc821_envelopes = yes
submission_recipient_restrictions = reject_non_fqdn_sender, reject_non_fqdn_recipient, permit_sasl_authenticated, permit_mynetworks, reject
transport_maps = hash:/etc/postfix/transport
valiases_bind = yes
valiases_bind_dn = cn=zentyalro,dc=ss150,dc=local
valiases_bind_pw = 123456789
valiases_query_filter = (&(|(mail=%s)(mail=@%s))(objectClass=CourierMailAlias))
valiases_result_attribute = maildrop
valiases_search_base = ou=mailalias,ou=postfix,dc=ss150,dc=local
valiases_server_host = localhost:390
valiases_version = 3
virtual_alias_domains = $virtual_alias_maps
virtual_alias_maps = ldap:valiases
virtual_gid_maps = static:113
virtual_mailbox_base = /var/vmail/
virtual_mailbox_domains = ldap:vmaildomains
virtual_mailbox_limit = 0
virtual_mailbox_maps = ldap:ldapvirtualmap
virtual_minimum_uid = 100
virtual_transport = dovecot
virtual_uid_maps = static:108
vmaildomains_bind = yes
vmaildomains_bind_dn = cn=zentyalro,dc=ss150,dc=local
vmaildomains_bind_pw = 123456789
vmaildomains_query_filter = (&(objectclass=domain)(dc=%s))
vmaildomains_result_attribute = dc, maildrop
vmaildomains_search_base = ou=vdomains,ou=postfix,dc=ss150,dc=local
vmaildomains_server_host = localhost:390
vmaildomains_version = 3
zarafa_destination_recipient_limit = 1
« Last Edit: January 04, 2013, 09:54:12 am by stephan_b »

robb

  • Guest
Re: Zentyal / Zarafa Mail issues
« Reply #1 on: January 02, 2013, 10:10:14 pm »
Where is your zentyal server situated in the network? Internal/external? Is it also Gateway? Are ports correctly forwarded? Did you configure DNS correctly? Is NTP setup ok? Is subnetting correctly configured?

Just a few basic questions that could make things more clear.

stephan_b

  • Zen Apprentice
  • *
  • Posts: 14
  • Karma: +1/-0
    • View Profile
Re: Zentyal / Zarafa Mail issues
« Reply #2 on: January 03, 2013, 08:54:17 am »
Hi robb,
thanks for your reply, the server is internal, it is not a gateway, ntp and dns are working the server is also configured as a pdc with samba4.

christian

  • Guest
Re: Zentyal / Zarafa Mail issues
« Reply #3 on: January 03, 2013, 09:30:48 am »
More than conf files, error message or extract from syslog or mail.log will be, at least at the beginning, more helpful.

I think you should distinguish between potentially Zarafa related errors and SMTP related errors (this also includes DNS and MX record, e.g.)

Can you send mail using mail client ?
Are incoming mails accepted by Postfix ?

stephan_b

  • Zen Apprentice
  • *
  • Posts: 14
  • Karma: +1/-0
    • View Profile
Re: Zentyal / Zarafa Mail issues
« Reply #4 on: January 03, 2013, 10:59:59 am »
No, i can't send mail per webapp incoming mails are accepted i think, but are not delivered, this is the mail.log for one sent and one received mail:

Code: [Select]
Jan  3 10:34:09 mydomain-DC1 postfix/smtpd[16367]: connect from localhost.localdomain[127.0.0.1]
Jan  3 10:34:09 mydomain-DC1 postfix/smtpd[16367]: 4EF8419004D8: client=localhost.localdomain[127.0.0.1]
Jan  3 10:34:09 mydomain-DC1 postfix/cleanup[16372]: 4EF8419004D8: message-id=<zarafa.50e55091.3fed.530db5b867cdac25@mydomain-DC1.local>
Jan  3 10:34:09 mydomain-DC1 postfix/qmgr[2079]: 4EF8419004D8: from=<stephan@mydomain.local>, size=994, nrcpt=1 (queue active)
Jan  3 10:34:09 mydomain-DC1 postfix/smtpd[16367]: disconnect from localhost.localdomain[127.0.0.1]
Jan  3 10:34:10 mydomain-DC1 postfix/smtp[16373]: 4EF8419004D8: to=<stephan.blasch@hochbahn.de>, relay=smtp.extern.de[85.13.140.8]:25,                 delay=1.3, delays=0.16/0.22/0.76/0.18, dsn=2.0.0, status=sent (250 2.0.0 Ok: queued as 6CC8D8E069E)
Jan  3 10:34:10 mydomain-DC1 postfix/qmgr[2079]: 4EF8419004D8: removed
Jan  3 10:37:17 mydomain-DC1 fetchmail[5683]: timeout after 300 seconds waiting for server extern.mailserver.com.
Jan  3 10:37:17 mydomain-DC1 fetchmail[5683]: socket error while fetching from username@extern.mailserver.com
Jan  3 10:37:17 mydomain-DC1 fetchmail[5683]: Query status=2 (SOCKET)
Jan  3 10:38:18 mydomain-DC1 fetchmail[5683]: Warning: the connection is insecure, continuing anyways. (Better use --sslcertck!)
Jan  3 10:38:18 mydomain-DC1 fetchmail[5683]: 26 messages (25 seen) for user at pop3.extern.de (11917901 octets).
Jan  3 10:38:18 mydomain-DC1 postfix/smtpd[16875]: connect from localhost.localdomain[127.0.0.1]
Jan  3 10:38:18 mydomain-DC1 postfix/smtpd[16875]: A9C8A1900D3A: client=localhost.localdomain[127.0.0.1]
Jan  3 10:38:18 mydomain-DC1 postfix/cleanup[16878]: A9C8A1900D3A: message-id=<OF5B804C1D.D423576E-ONC1257AE8.0034B3A4-C1257AE8.0034BBB9@Hansesender.com>
Jan  3 10:38:18 mydomain-DC1 postfix/qmgr[2079]: A9C8A1900D3A: from=<stephan.comp@test.de>, size=2077, nrcpt=1 (queue active)
Jan  3 10:38:18 mydomain-DC1 fetchmail[5683]: reading message user@mailserver.com:26 of 26 (1726 octets) not flushed
Jan  3 10:38:18 mydomain-DC1 dovecot: lda: Error: userdb lookup: connect(/var/run/dovecot/auth-master) failed: Permission denied (euid=                108(ebox) egid=113(ebox) missing +r perm: /var/run/dovecot/auth-master, dir owned by 0:0 mode=0755)
Jan  3 10:38:18 mydomain-DC1 dovecot: lda: Fatal: Internal error occurred. Refer to server log for more information.
Jan  3 10:38:18 mydomain-DC1 postfix/smtpd[16875]: disconnect from localhost.localdomain[127.0.0.1]
Jan  3 10:38:18 mydomain-DC1 postfix/pipe[16879]: A9C8A1900D3A: to=<stephan@mydomain.local>, relay=dovecot, delay=0.3, delays=0.17/0.01/0/0.12, dsn=4.3.0, status=deferred (temporary failure)

And this is a part of the mail.err:

Code: [Select]
Jan  3 10:56:21 mydomain-DC1 fetchmail[5683]: Warning: the connection is insecure, continuing anyways. (Better use --sslcertck!)
Jan  3 10:56:22 mydomain-DC1 dovecot: lda: Error: userdb lookup: connect(/var/run/dovecot/auth-master) failed: Permission denied (euid=108(ebox) egid=113(ebox) missing +r perm: /var/run/dovecot/auth-master, dir owned by 0:0 mode=0755)
Jan  3 10:56:22 mydomain-DC1 dovecot: lda: Fatal: Internal error occurred. Refer to server log for more information.
Jan  3 10:56:22 mydomain-DC1 dovecot: lda: Error: userdb lookup: connect(/var/run/dovecot/auth-master) failed: Permission denied (euid=108(ebox) egid=113(ebox) missing +r perm: /var/run/dovecot/auth-master, dir owned by 0:0 mode=0755)
Jan  3 10:56:22 mydomain-DC1 dovecot: lda: Fatal: Internal error occurred. Refer to server log for more information.

christian

  • Guest
Re: Zentyal / Zarafa Mail issues
« Reply #5 on: January 03, 2013, 11:12:48 am »
in attached logs, it mixes fetchmail and postfix messages plus I suppose you edited log file (in order to obstruct real mail domains ?)
I can't distinguish between Zentyal mail domains you may have configured and real life (mydomain-DC1.local, test.de, Hansesender.com, mydomain.local)

I don't use Zarafa but I'm surprised fetchmail (user's mail retrieval) uses dovecot. I though fetchmail would forward top local postfix like any incoming mail to be send to Zarafa. I hope someone used to configure Zarafa will intervene here.

stephan_b

  • Zen Apprentice
  • *
  • Posts: 14
  • Karma: +1/-0
    • View Profile
Re: Zentyal / Zarafa Mail issues
« Reply #6 on: January 03, 2013, 11:58:29 am »
Hi christian, sorry ihad to explain. "hansesender is an external mailserver, where i've sent my testmail with. mydomain.local is my domain at home (internal) and the mydomain-dc1.local is my zentyal server (I changed the name erroneously it should have been mydomain-dc1.mydomain.local ).
The lines at 10:37:17 can be ignored, this was a fetch from another useraccount.


Is there an option to start the mail and/or zarafa configuration from scratch?
« Last Edit: January 03, 2013, 12:03:11 pm by stephan_b »

christian

  • Guest
Re: Zentyal / Zarafa Mail issues
« Reply #7 on: January 03, 2013, 12:24:22 pm »
Sorry, I don't know about Zarafa and its configuration.
fetchmail related error is an interesting one however because I suspect, mail configuration being global on Zentyal server, that error with fetchmail also impacts Zarafa: I mean to say that once mail will work properly, it will work for both fetchmail and Zarafa.

Let's wait for some Zarafa guru to jump in and tell us how fetchmail feed it.

jsalamero

  • Zentyal Staff
  • Zen Hero
  • *****
  • Posts: 1419
  • Karma: +45/-1
    • View Profile
Re: Zentyal / Zarafa Mail issues
« Reply #8 on: January 03, 2013, 02:44:01 pm »
Make sure that /etc/postfix/transport has domain.tld zarafa: and then than dovecot-auth is running. sudo /etc/init.d/zentyal mail restart should start it but check syslog and ps auxwf | grep dovecot.

stephan_b

  • Zen Apprentice
  • *
  • Posts: 14
  • Karma: +1/-0
    • View Profile
Re: Zentyal / Zarafa Mail issues
« Reply #9 on: January 03, 2013, 05:23:58 pm »
Thank you guys! it was a stupid fault of me. now receiving mails works. i've added another user for testing purposes but it was the fourth user and so my license didn't work anymore. when I deleted this user, zarafa get the mails. but sending mails doesn't work yet.
do you know, if there is an option to switch a verbose mode in the logs?
my mail.log shows only:
Code: [Select]
Jan  3 17:20:35 SS150-DC1 postfix/smtpd[7347]: connect from localhost.localdomain[127.0.0.1]
Jan  3 17:20:35 SS150-DC1 postfix/smtpd[7347]: B30AC190119F: client=localhost.localdomain[127.0.0.1]
Jan  3 17:20:35 SS150-DC1 postfix/cleanup[7350]: B30AC190119F: message-id=<zarafa.50e5afd3.1cec.03a967396679e466@SS150-DC1.ss150.local>
Jan  3 17:20:35 SS150-DC1 postfix/qmgr[27477]: B30AC190119F: from=<stephan@ss150.local>, size=1004, nrcpt=1 (queue active)
Jan  3 17:20:35 SS150-DC1 postfix/smtpd[7347]: disconnect from localhost.localdomain[127.0.0.1]
Jan  3 17:20:36 SS150-DC1 postfix/smtp[7351]: B30AC190119F: to=<stephan@extmail.de>, relay=smtp.mailservice.de[85.13.140.8]:25, delay=0.86, delays=0.09/0/0.59/0.18, dsn=2.0.0, status=sent (250 2.0.0 Ok: queued as 6ABE18E07D0)
Jan  3 17:20:36 SS150-DC1 postfix/qmgr[27477]: B30AC190119F: removed

but i dont get any mail at my account stephan@extmail.de

stephan_b

  • Zen Apprentice
  • *
  • Posts: 14
  • Karma: +1/-0
    • View Profile
Re: Zentyal / Zarafa Mail issues
« Reply #10 on: January 04, 2013, 09:53:14 am »
...and also my last big problem (by now) is solved. the name of the virtual domain was set to my internal domain name so that outgoing mails where send with this domainname and the smarthost rejected those.

many thanks to robb, christian and jsalamero for helping me!