[Dovecot] LDA not being called by postfix?
Hello,
I'm using Postfix with virtual domains (MySQL), Dovecot 1.0beta7 and CVS LDA. I've set up postfix to use the LDA for maildir delivery and defined a global sieve script.
-- master.cf --
...
dovecot unix - n n - - pipe flags=DRhu user=vmail:vmail argv=/usr/local/libexec/dovecot/deliver -d ${recipient}
...
-- main.cf --
smtpd_banner = $myhostname ESMTP append_dot_mydomain = no relayhost = mailbox_size_limit = 0 recipient_delimiter = + inet_interfaces = all program_directory = /usr/lib/postfix command_directory = /usr/sbin daemon_directory = /usr/lib/postfix mail_owner = postfix soft_bounce = yes message_size_limit = 15728640 biff = no myhostname = mail.example.com mydomain = example.com myorigin = /etc/mailname mynetworks = 127.0.0.0/8 1.2.3.8/29 192.168.0.0/24 mydestination = $myhostname localhost localhost.localdomain alias_maps = hash:/etc/aliases alias_database = hash:/etc/aliases local_recipient_maps = proxy:unix:passwd.byname $alias_maps local_transport = local virtual_mailbox_base = /var/vmail virtual_mailbox_domains = proxy:mysql:/etc/postfix/maps/mysql_virtual_domains_maps.cf virtual_mailbox_maps = mysql:/etc/postfix/maps/mysql_virtual_mailbox_maps.cf virtual_alias_maps = proxy:mysql:/etc/postfix/maps/mysql_virtual_alias_maps.cf proxy:mysql:/etc/postfix/maps/mysql_virtual_mailbox_maps.cf virtual_uid_maps = static:1234 virtual_gid_maps = static:1234 virtual_minimum_uid = 1001 dovecot_destination_recipient_limit = 1 virtual_transport = dovecot relay_domains = proxy:mysql:/etc/postfix/maps/mysql_relay_domains_maps.cf relay_transport = relay transport_maps = proxy:mysql:/etc/postfix/maps/mysql_transport_maps.cf relocated_maps = proxy:mysql:/etc/postfix/maps/mysql_virtual_relocated_maps.cf smtpd_helo_required = yes disable_vrfy_command = yes strict_rfc821_envelopes = yes smtpd_recipient_restrictions = reject_unknown_sender_domain, permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination, reject_rbl_client sbl.spamhaus.org, reject_rbl_client cbl.abuseat.org, reject_rbl_client dul.dnsbl.sorbs.net smtpd_sasl_auth_enable = yes smtpd_sasl_local_domain = $myhostname smtpd_sasl_security_options = noanonymous broken_sasl_auth_clients = yes smtpd_use_tls = yes smtpd_tls_cert_file = /etc/postfix/smtpd.cert smtpd_tls_key_file = /etc/postfix/smtpd.key content_filter = smtp-amavis:[127.0.0.1]:10024
-- dovecot.conf --
protocols = imap imaps pop3 pop3s ssl_cert_file = /etc/postfix/smtpd.cert ssl_key_file = /etc/postfix/smtpd.key disable_plaintext_auth = no syslog_facility = mail login_greeting = Server ready. default_mail_env = maildir:/var/vmail/%d/%n/Maildir protocol lda { module_dir = /usr/local/lib/dovecot/lda postmaster_address = postmaster@example.com global_script_path = /var/vmail/sieve.script auth_socket_path = /var/run/dovecot-auth-master } protocol imap { login_executable = /usr/local/libexec/dovecot/imap-login mail_executable = /usr/local/libexec/dovecot/imap login_greeting_capability = yes imap_client_workarounds = outlook-idle delay-newmail }
protocol pop3 { login_executable = /usr/local/libexec/dovecot/pop3-login mail_executable = /usr/local/libexec/dovecot/pop3
pop3_uidl_format = %08Xu%08Xv pop3_client_workarounds = outlook-no-nuls oe-ns-eoh } auth_executable = /usr/local/libexec/dovecot/dovecot-auth auth_default_realm = example.com auth default { mechanisms = plain digest-md5 cram-md5 socket listen { master { path = /var/run/dovecot-auth-master mode = 0660 user = vmail group = vmail } } passdb sql { args = /usr/local/etc/dovecot-sql.conf } userdb static { args = uid=1234 gid=1234 home=/var/vmail/%d/%n/Maildir } }
-- sieve.script --
require [ "fileinto" ];
if headers :contains "To" "luca@example.com" { fileinto "Spam"; }
In my postfix logs I get
May 11 00:59:50 ns1 postfix/virtual[9675]: 5E114847BC: to=luca@example.com, relay=virtual, delay=0, status=sent (delivered to maildir)
and the message is there but no filtering is done and the sieve script is not compiled.
-- Luca Corti PGP Key ID 1F38C091 Adesso dico: "Amore."
Hi Luca.
Luca Corti wrote:
-- sieve.script --
require [ "fileinto" ];
if headers :contains "To" "luca@example.com" { ^ fileinto "Spam"; }
I think the problem is your sieve script. It should be "header" an not "headers".
and the message is there but no filtering is done and the sieve script is not compiled.
There should be a file "sieve.script.err" (in the same directory as your "sieve.script") which contains rudimental error messages.
Regards
Andreas
On Thu, 2006-05-11 at 09:14 +0200, Andreas Martin wrote:
I think the problem is your sieve script. It should be "header" an not "headers".
Corrected, it makes no difference.
There should be a file "sieve.script.err" (in the same directory as your "sieve.script") which contains rudimental error messages.
There is no "sieve.script.err".
-- Luca Corti PGP Key ID 1F38C091 BOFH excuse of the moment: static buildup
On Thu, 2006-05-11 at 10:28 +0200, Andreas Martin wrote:
[snip] dovecot_destination_recipient_limit = 1 ^^^^^^^ This should be default_destination_recipient_limit = 1. ^^^^^^^
I've changed it, but nothing new happens.
-- Luca Corti PGP Key ID 1F38C091 BOFH excuse of the moment: filesystem not big enough for Jumbo Kernel Patch
Luca Corti wrote:
On Thu, 2006-05-11 at 10:28 +0200, Andreas Martin wrote:
[snip] dovecot_destination_recipient_limit = 1 ^^^^^^^ This should be default_destination_recipient_limit = 1. ^^^^^^^
I've changed it, but nothing new happens.
Could you post the output of "postconf -n", please?
Thanks
Andreas
On Thu, 2006-05-11 at 11:10 +0200, Andreas Martin wrote:
Could you post the output of "postconf -n", please?
alias_database = hash:/etc/aliases alias_maps = hash:/etc/aliases append_dot_mydomain = no biff = no broken_sasl_auth_clients = yes command_directory = /usr/sbin config_directory = /etc/postfix content_filter = smtp-amavis:[127.0.0.1]:10024 daemon_directory = /usr/lib/postfix default_destination_recipient_limit = 1 disable_vrfy_command = yes inet_interfaces = all local_recipient_maps = proxy:unix:passwd.byname $alias_maps local_transport = local mail_owner = postfix mailbox_size_limit = 0 message_size_limit = 15728640 mydestination = $myhostname localhost localhost.localdomain mydomain = example.com myhostname = mail.example.com mynetworks = 127.0.0.0/8 1.2.3.8/29 192.168.0.0/24 myorigin = /etc/mailname recipient_delimiter = + relay_domains = proxy:mysql:/etc/postfix/maps/mysql_relay_domains_maps.cf relay_transport = relay relayhost = relocated_maps = proxy:mysql:/etc/postfix/maps/mysql_virtual_relocated_maps.cf smtpd_banner = $myhostname ESMTP smtpd_helo_required = yes smtpd_recipient_restrictions = reject_unknown_sender_domain, permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination, reject_rbl_client sbl.spamhaus.org, reject_rbl_client cbl.abuseat.org, reject_rbl_client dul.dnsbl.sorbs.net smtpd_sasl_auth_enable = yes smtpd_sasl_local_domain = $myhostname smtpd_sasl_security_options = noanonymous smtpd_tls_cert_file = /etc/postfix/smtpd.cert smtpd_tls_key_file = /etc/postfix/smtpd.key smtpd_use_tls = yes soft_bounce = yes strict_rfc821_envelopes = yes transport_maps = proxy:mysql:/etc/postfix/maps/mysql_transport_maps.cf virtual_alias_maps = proxy:mysql:/etc/postfix/maps/mysql_virtual_alias_maps.cf proxy:mysql:/etc/postfix/maps/mysql_virtual_mailbox_maps.cf virtual_gid_maps = static:1234 virtual_mailbox_base = /var/vmail virtual_mailbox_domains = proxy:mysql:/etc/postfix/maps/mysql_virtual_domains_maps.cf virtual_mailbox_maps = mysql:/etc/postfix/maps/mysql_virtual_mailbox_maps.cf virtual_minimum_uid = 1001 virtual_transport = dovecot virtual_uid_maps = static:1234
-- Luca Corti PGP Key ID 1F38C091 BOFH excuse of the moment: The static electricity routing is acting up...
Luca Corti wrote:
On Thu, 2006-05-11 at 11:10 +0200, Andreas Martin wrote:
Could you post the output of "postconf -n", please?
[snip] transport_maps = proxy:mysql:/etc/postfix/maps/mysql_transport_maps.cf virtual_alias_maps = proxy:mysql:/etc/postfix/maps/mysql_virtual_alias_maps.cf proxy:mysql:/etc/postfix/maps/mysql_virtual_mailbox_maps.cf virtual_gid_maps = static:1234 virtual_mailbox_base = /var/vmail virtual_mailbox_domains = proxy:mysql:/etc/postfix/maps/mysql_virtual_domains_maps.cf virtual_mailbox_maps = mysql:/etc/postfix/maps/mysql_virtual_mailbox_maps.cf virtual_minimum_uid = 1001 virtual_transport = dovecot virtual_uid_maps = static:1234
Well...
If you never use the Postfix virtual to deliver Mail, you can omit virtual_gid_maps = static:1234 virtual_mailbox_base = /var/vmail virtual_minimum_uid = 1001 virtual_uid_maps = static:1234 since these setting are not used by Dovecot-LDA.
Furthermore, I could imagine an entry in your transport-table, which redirects this mailaddress/domain to virtual, or the entry in your postfix/master.cf, which defines another virtual transport for the return from amavisd-new.
I don't see an error in your configfiles (that doesn't necessarily mean that there aren't any...) and I use Postfix && amavisd-new && Dovecot-LDA with a similar configuration (I use LDAP instead of SQL for the lookups, but that shouldn't bother). So, this combination is known to work.
Greetings
Andreas
On Thu, 2006-05-11 at 13:21 +0200, Andreas Martin wrote:
If you never use the Postfix virtual to deliver Mail, you can omit virtual_gid_maps = static:1234 virtual_mailbox_base = /var/vmail virtual_minimum_uid = 1001 virtual_uid_maps = static:1234 since these setting are not used by Dovecot-LDA.
These should not do any harm anyway right?
Furthermore, I could imagine an entry in your transport-table, which redirects this mailaddress/domain to virtual, or the entry in your postfix/master.cf, which defines another virtual transport for the return from amavisd-new.
I have the transport maps in MySQL:
user = myuser password = mypass hosts = localhost dbname = postfix table = domain select_field = transport where_field = domain additional_conditions = and active = 1
and in the db:
+----+-------------+-------------+---------+-----------+----------+-----------+----------+---------------------+---------------------+--------+ | id | domain | description | aliases | mailboxes | maxquota | transport | backupmx | created | modified | active | +----+-------------+-------------+---------+-----------+----------+-----------+----------+---------------------+---------------------+--------+ | 2 | example.com | example.com | 5 | 10 | 20 | virtual | 0 | 2006-05-08 01:30:58 | 2006-05-08 11:42:55 | 1 | +----+-------------+-------------+---------+-----------+----------+-----------+----------+---------------------+---------------------+--------+
In my master.cf I have
# Amavis smtp-amavis unix - - n - 2 smtp -o smtp_data_done_timeout=1200 -o smtp_send_xforward_command=yes -o disable_dns_lookups=yes -o max_use=20
127.0.0.1:10025 inet n - n - - smtpd -o content_filter= -o local_recipient_maps= -o relay_recipient_maps= -o smtpd_restriction_classes= -o smtpd_client_restrictions= -o smtpd_helo_restrictions= -o smtpd_sender_restrictions= -o smtpd_recipient_restrictions=permit_mynetworks,reject -o mynetworks=127.0.0.0/8 -o strict_rfc821_envelopes=yes -o smtpd_error_sleep_time=0 -o smtpd_soft_error_limit=1001 -o smtpd_hard_error_limit=1000 -o smtpd_client_connection_count_limit=0 -o smtpd_client_connection_rate_limit=0 -o receive_override_options=no_header_body_checks,no_unknown_recipient_checks
The transport gets correctly selected upon mail delivery:
May 11 13:09:47 ns1 postfix/virtual[9797]: 7C4D4847BC: to=luca@example.com, relay=virtual, delay=0, status=sent (delivered to maildir)
but it seems the LDA does not work or is not called. SHould the log look different if the lda was used for delivery? I've also updated to dovecot stable cvs.
I really do not understand what is wrong with my setup.
-- Luca Corti PGP Key ID 1F38C091 BOFH excuse of the moment: multicasts on broken packets
Luca Corti wrote:
On Thu, 2006-05-11 at 13:21 +0200, Andreas Martin wrote:
If you never use the Postfix virtual to deliver Mail, you can omit virtual_gid_maps = static:1234 virtual_mailbox_base = /var/vmail virtual_minimum_uid = 1001 virtual_uid_maps = static:1234 since these setting are not used by Dovecot-LDA.
These should not do any harm anyway right?
I think so, but I never tried to keep these settings in my main.cf while I didn't use virtual.
Furthermore, I could imagine an entry in your transport-table, which redirects this mailaddress/domain to virtual, or the entry in your postfix/master.cf, which defines another virtual transport for the return from amavisd-new.
I have the transport maps in MySQL:
user = myuser password = mypass hosts = localhost dbname = postfix table = domain select_field = transport where_field = domain additional_conditions = and active = 1
and in the db:
+----+-------------+-------------+---------+-----------+----------+-----------+----------+---------------------+---------------------+--------+ | id | domain | description | aliases | mailboxes | maxquota | transport | backupmx | created | modified | active | +----+-------------+-------------+---------+-----------+----------+-----------+----------+---------------------+---------------------+--------+ | 2 | example.com | example.com | 5 | 10 | 20 | virtual | 0 | 2006-05-08 01:30:58 | 2006-05-08 11:42:55 | ^^^^^^^ 1 | +----+-------------+-------------+---------+-----------+----------+-----------+----------+---------------------+---------------------+--------+
This should be "dovecot" - corresponding to your master.cf:
dovecot unix - n n - - pipe flags=DRhu user=vmail:vmail argv=/usr/local/libexec/dovecot/deliver -d ${recipient}
The transport gets correctly selected upon mail delivery:
Nope...
May 11 13:09:47 ns1 postfix/virtual[9797]: 7C4D4847BC: ^^^^^^^ to=luca@example.com, relay=virtual, delay=0, status=sent ^^^^^^^
This should be something like:
May 11 13:09:47 ns1 postfix/pipe[9797]: 7C4D4847BC: ^^^^ to=luca@example.com, relay=dovecot, delay=0, status=sent ^^^^^^^
On Thu, 2006-05-11 at 10:28 +0200, Andreas Martin wrote:
Also if you are correct this needs to be updated in
-- Luca Corti PGP Key ID 1F38C091 BOFH excuse of the moment: sticktion
On Thu, 2006-05-11 at 01:02 +0200, Luca Corti wrote:
May 11 00:59:50 ns1 postfix/virtual[9675]: 5E114847BC: to=luca@example.com, relay=virtual, delay=0, status=sent (delivered to maildir)
Well, this looks like it's not even trying to use the dovecot transport, so your problem is in Postfix configuration. I'm not too good with Postfix configuration though, so can't help you there. Maybe try postfix-users list instead if no-one can help you here.
participants (3)
-
Andreas Martin
-
Luca Corti
-
Timo Sirainen