Vitaly Shishakov wrote:
Dear all,
I have a problem setting up an E-mail service using cyrus and postfix on SuSE 10.1 (RC3). all my user's accounts info is in the MYSQL database ( a table with "login" and "pass" string columns), and i tryed pam_mysql and sasl_sql plugin, both with the same result.
Okay, so far so good.
The cyrus itself looks OK, i can even successfully log into a users mailbox, and the postfix seems to understand that config too -- i set up SASL authentication for smtpd server, and it lets me to send mail outside only if i provide correct users login and password. But: posfix refuses to deliver local mail for my domain (see log quotations below) ragardless whatever local_transprot i use: cyrus or lmtp.
Now, that is a bit strange. Though you should probably leave local_transport alone and use mailbox_transport instead.
however: when i issue the same command that is specified in master.cf file manually as "cyrus" user, like
su cyrus /usr/lib/cyrus/bin/deliver -r user@mail.com user5
where user5 is one of my accounts defined in DB, and then type in a message, like
From: user@mail.com To: user5@mydomain.ru Subject: Test
TEST .
Contrl^D
I get the message delivered into user's INBOX just fine. (and the user's INBOX get autocreated as well)
That smells like a permission problem. Starting with Suse 10 Novell has included AppArmor to prevent applications from using files not defined in their profile. The other possibility is that the user that is configured in master.cf does not have the right to use the transport cyrus. Though that would be a bit strange.
Any help will be appreciated!!!
well, below are quitations from logfiles and configs: mydomain.ru -- replaces my domain name.
here is what i have in logfiles, when postfix tries local delivery: /var/log/mail: -------------------------------------------------------------------------------- May 1 17:44:03 server postfix/qmgr[5146]: BCCFB3E51C: from=<user@somedomain.com>, size=537, nrcpt=1 (queue active) May 1 17:44:03 server postfix/local[5151]: warning: connect #1 to subsystem private/lmtp: Operation not permitted
Try to deactivate AppArmor, then "postfix stop; postfix start;" Try to send another mail after that. Does this mail end up in Cyrus? Another possibility is that you have configured postfix/local in a chroot.
/usr/lib64/sasl2/Cyrus.conf (symlinks: imapd.conf imap.conf) ---------------------------------------------------------------- auxprop_plugin: sql sql_engine: mysql sql_user: mail sql_passwd: gtxrby sql_hostnames: localhost sql_database: lanbilling sql_statement: select pass from vgroups where login = '%u' sql_usessl: no password_format: plaintext
I hope this is not your real password, otherwise change it, fast!
/etc/postfix/main.cf ---------------------------------------------------------------- mail_spool_directory = /var/mail canonical_maps = hash:/etc/postfix/canonical virtual_alias_maps = hash:/etc/postfix/virtual virtual_alias_domains = hash:/etc/postfix/virtual relocated_maps = hash:/etc/postfix/relocated transport_maps = hash:/etc/postfix/transport sender_canonical_maps = hash:/etc/postfix/sender_canonical local_recipient_maps = mysql:/etc/postfix/mysql-local.cf $alias_maps masquerade_exceptions = root masquerade_classes = envelope_sender, header_sender, header_recipient myhostname = server.mydomain.ru daemon_directory = /usr/lib/postfix program_directory = /usr/lib/postfix readme_directory = /usr/share/doc/packages/postfix/README_FILES html_directory = /usr/share/doc/packages/postfix/html sample_directory = /usr/share/doc/packages/postfix/samples sendmail_path = /usr/sbin/sendmail setgid_group = maildrop manpage_directory = /usr/share/man newaliases_path = /usr/bin/newaliases mailq_path = /usr/bin/mailq inet_protocols = all inet_interfaces = all masquerade_domains = mydestination = mydomain.ru defer_transports = mynetworks_style = subnet disable_dns_lookups = no relayhost = mailbox_command = # mailbox_transport = cyrus -- same result !!! mailbox_transport = lmtp:unix:/var/lib/imap/socket/lmtp
Can postfix access that socket? Probably not. Please disable AppArmor and chroot for local. Sandy -- List replies only please! Please address PMs to: news-reply2 (@) japantest (.) homelinux (.) com