Re: dovecot-lmtp and postfix
On 2019-08-11 18:40, Alexander Dalloz via dovecot wrote: Am 11.08.2019 um 18:06 schrieb Coy Hile via dovecot: Your Postfix configuration makes Postfix think gmail.com to be a virtual(8) target domain. Thus it uses virtual_transport. So validate your virtual_alias_maps = pgsql:/opt/local/etc/postfix/postfix_virtual_aliases.cf virtual_mailbox_domains = pgsql:/opt/local/etc/postfix/postfix_virtual_domains.cf definitions. That was exactly it! I was missing a WHERE domain='%s' in that query, so it returned something (which is effectively "I am handled here" apparently) regardless of the domain. Thank you, -- Coy Hile coy.h...@coyhile.com
Re: dovecot-lmtp and postfix
Am 11.08.2019 um 18:06 schrieb Coy Hile via dovecot: And in syslog I see: 2019-08-11T15:37:57+00:00 81716ec5-bca4-6d53-ed81-bd1a55d46b4f postfix/smtpd[56103]: [ID 197553 mail.info] 12327F13D: client=ns1.coyhile.com[172.17.64.25] 2019-08-11T15:38:40+00:00 81716ec5-bca4-6d53-ed81-bd1a55d46b4f postfix/cleanup[56365]: [ID 197553 mail.info] 12327F13D: message-id=<> 2019-08-11T15:38:40+00:00 81716ec5-bca4-6d53-ed81-bd1a55d46b4f postfix/qmgr[56018]: [ID 197553 mail.info] 12327F13D: from=, size=354, nrcpt=1 (queue active) 2019-08-11T15:38:40+00:00 81716ec5-bca4-6d53-ed81-bd1a55d46b4f dovecot: [ID 702911 mail.info] lmtp(50179): Connect from local 2019-08-11T15:38:40+00:00 81716ec5-bca4-6d53-ed81-bd1a55d46b4f postfix/lmtp[56821]: [ID 197553 mail.info] 12327F13D: to=, relay=81716ec5-bca4-6d53-ed81-bd1a55d46b4f.localdomain[private/dovecot-lmtp], delay=55, delays=55/0.01/0/0.03, dsn=5.1.1, status=bounced (host 81716ec5-bca4-6d53-ed81-bd1a55d46b4f.localdomain[private/dovecot-lmtp] said: 550 5.1.1 User doesn't exist:coyh...@gmail.com (in reply to RCPT TO command)) Given both of those configurations, shouldn’t it see that gmail address and send it off to the relay host? Your Postfix configuration makes Postfix think gmail.com to be a virtual(8) target domain. Thus it uses virtual_transport. So validate your > virtual_alias_maps = pgsql:/opt/local/etc/postfix/postfix_virtual_aliases.cf > virtual_mailbox_domains = pgsql:/opt/local/etc/postfix/postfix_virtual_domains.cf definitions. Alexander
dovecot-lmtp and postfix
Hi all, I’ve got postfix setup to use dovecot-lmtp for (virtual) user delivery, and things to users or aliases that Dovecot knows about now get delivered correctly. However, I’ve done something wrong with postfix and/or the LMTP configuration because upon RCPT TO, instead of forwarding the mail off to the configured smartest, somehow dovecot-lmtp is ending up in the mix. (Perhaps this is more a postfix question than a dovecot one, but, I’ll start here.) Relevant postfix config: [root@81716ec5-bca4-6d53-ed81-bd1a55d46b4f /opt/local/etc/postfix]# postconf -n canonical_maps = hash:/opt/local/etc/postfix/canonical command_directory = /opt/local/sbin compatibility_level = 2 daemon_directory = /opt/local/libexec/postfix data_directory = /var/db/postfix debug_peer_level = 2 debugger_command = PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin ddd $daemon_directory/$process_name $process_id & sleep 5 default_database_type = hash home_mailbox = Maildir/ html_directory = no inet_interfaces = all inet_protocols = all mail_owner = postfix mailbox_size_limit = 10240 mailq_path = /opt/local/bin/mailq manpage_directory = /opt/local/man message_size_limit = 5120 meta_directory = /opt/local/libexec/postfix mynetworks = $myhostname, 127.0.0.0/8, 10.0.0.0/8, 172.16.0.0/12 192.168.0.0/16 newaliases_path = /opt/local/bin/newaliases owner_request_special = no queue_directory = /var/spool/postfix queue_minfree = 7680 readme_directory = /opt/local/share/doc/postfix recipient_canonical_maps = hash:/opt/local/etc/postfix/recipient_canonical recipient_delimiter = + relayhost = relay.svc.a4b01392-e48d-4cdf-cacf-f850d1800d45.basement.cns.coyhile.com sample_directory = /opt/local/share/examples/postfix sender_canonical_maps = hash:/opt/local/etc/postfix/sender_canonical sendmail_path = /opt/local/sbin/sendmail setgid_group = maildrop shlib_directory = /opt/local/lib/postfix smtpd_banner = $myhostname ESMTP smtpd_client_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unknown_reverse_client_hostname smtpd_data_restrictions = permit_mynetworks, reject_unauth_pipelining, permit_sasl_authenticated smtpd_helo_required = yes smtpd_helo_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_invalid_helo_hostname, reject_non_fqdn_helo_hostname smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unlisted_recipient, reject_non_fqdn_recipient, reject_unauth_destination, reject_unknown_recipient_domain, check_recipient_access hash:/opt/local/etc/postfix/filtered_domains smtpd_sasl_auth_enable = yes smtpd_sasl_path = private/auth smtpd_sasl_type = dovecot smtpd_sender_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unlisted_sender, reject_non_fqdn_sender, reject_unknown_sender_domain smtputf8_enable = no strict_rfc821_envelopes = yes unknown_local_recipient_reject_code = 550 virtual_alias_maps = pgsql:/opt/local/etc/postfix/postfix_virtual_aliases.cf virtual_mailbox_domains = pgsql:/opt/local/etc/postfix/postfix_virtual_domains.cf virtual_transport = lmtp:unix:private/dovecot-lmtp [root@81716ec5-bca4-6d53-ed81-bd1a55d46b4f /opt/local/etc/postfix]# And the dovecot config: doveconf -n # 2.3.6 (7eab80676): /opt/local/etc/dovecot/dovecot.conf # Pigeonhole version 0.5.6 (92dc263a) doveconf: Warning: NOTE: You can get a new clean config file with: doveconf -Pn > dovecot-new.conf doveconf: Warning: Obsolete setting in /opt/local/etc/dovecot/conf.d/10-ssl.conf:80: ssl_dh_parameters_length is no longer needed doveconf: Warning: Obsolete setting in /opt/local/etc/dovecot/conf.d/10-ssl.conf:81: ssl_protocols has been replaced by ssl_min_protocol doveconf: Warning: NOTE: You can get a new clean config file with: doveconf -Pn > dovecot-new.conf doveconf: Warning: Obsolete setting in /opt/local/etc/dovecot/conf.d/10-ssl.conf:80: ssl_dh_parameters_length is no longer needed doveconf: Warning: Obsolete setting in /opt/local/etc/dovecot/conf.d/10-ssl.conf:81: ssl_protocols has been replaced by ssl_min_protocol doveconf: Warning: service auth { client_limit=840 } is lower than required under max. load (1524) # OS: SunOS 5.11 i86pc # Hostname: 81716ec5-bca4-6d53-ed81-bd1a55d46b4f.coyhile.com auth_mechanisms = plain login auth_socket_path = /var/run/dovecot/auth-userdb imap_idle_notify_interval = 29 mins lda_mailbox_autocreate = yes lda_mailbox_autosubscribe = yes mail_attachment_dir = /var/mail/attachments mail_fsync = never mail_location = mdbox:~/mdbox mail_plugins = " acl" mail_privileged_group = vmail managesieve_notify_capability = mailto managesieve_sieve_capability = fileinto reject envelope encoded-character vacation subaddress comparator-i;ascii-numeric relational regex imap4flags copy include variables body enotify environment mailbox date index ihave duplicate mime foreverypart extracttext imapsieve vnd.dovecot.imapsieve namespace inbox { inbox = yes location = mailbox Drafts { special_use = \Drafts } mailbox Junk {
Re: LMTP and Postfix
> I am setting up a new system that will be using Dovecot with Postifx. I am > planning on using LMTP. I read the wiki and and found the > settings I need to make in Dovecot and the Postfix main.cf file. However, > I > saw nothing about the Postfix master.cf file. Do I need to make and > changes to > it also? > > Thanks > > -- > Jerry > There are several ways of telling postfix to use lmtp to deliver to dovecot. I went with a method that was setting just the *_transport variable in main.cf to a unix pipe, so I didn't need to setup a service in master.cf. Here are two methods (for mailbox, not virtual mailbox), that show that depending on what you put in main.cf, you may or may not need to update master.cf === method 1 === main.cf - mailbox_transport=dovecot dovecot_destination_recipient_limit=1 - master.cf - dovecot unix n n pipe flags=DRhu user=mail:mail argv=/usr/lib/dovecot/dovecot-lda -f ${sender} -d ${recipient} - === method 2 === main.cf - mailbox_transport = lmtp:unix:private/dovecot-lmtp - HTH, Ken
Re: LMTP and Postfix
On 22.08.2017 12:10, Jerry wrote: > I saw nothing about the Postfix master.cf file. Do I need to make > and changes to it also? No need. Assuming that you use a socket, the following combination should suffice: # Dovecot service lmtp { unix_listener /var/spool/postfix/private/dovecot-lmtp { user = postfix group = postfix mode = 0660 } } # Postfix mailbox_transport = lmtp:unix:private/dovecot-lmtp If you have further questions or a more exotic setup, you might want to consider asking on the Postfix mailing list. -Ralph
LMTP and Postfix
I am setting up a new system that will be using Dovecot with Postifx. I am planning on using LMTP. I read the wiki and and found the settings I need to make in Dovecot and the Postfix main.cf file. However, I saw nothing about the Postfix master.cf file. Do I need to make and changes to it also? Thanks -- Jerry
Re: Catch-all with LMTP and Postfix
On 08/22/2016 02:00 PM, Aki Tuomi wrote: Seems you accidentically replied to me only. Yup, whoops. Postfix uses the filename you provide as name for the db file, so running it against symlinks does follow the symlink, but it uses the symlink name as what it uses to create the .db file. You can test this by creating file and doing symlink for it and running postmap against the symlink. You'll see that it will create symlink-name.db file instead of file.db. Also good to know, although it seems like odd behavior. I would think that if Postfix followed the link then the corresponding .db would also be of the followed filename. No matter, I removed the link to simplify things.
Re: Catch-all with LMTP and Postfix
On 22.08.2016 21:53, Michael Starks wrote: On 08/22/2016 01:29 AM, Aki Tuomi wrote: It seems your postfix is misbehaving. Did you forget to run postmap? Aki Tuomi Dovecot oy Thanks for the response, Aki. I dug a little deeper and found this: lrwxrwxrwx. 1 root root20 Jul 24 01:37 virtual_alias_maps -> /etc/postfix/virtual I had been postmapping virtual_alias_maps, but not virtual. I guess postmap doesn't follow links. When I postmapped virtual and did a 'postfix reload' it started to work. Seems you accidentically replied to me only. Postfix uses the filename you provide as name for the db file, so running it against symlinks does follow the symlink, but it uses the symlink name as what it uses to create the .db file. You can test this by creating file and doing symlink for it and running postmap against the symlink. You'll see that it will create symlink-name.db file instead of file.db. Aki Tuomi Dovecot oy
Re: Catch-all with LMTP and Postfix
> On August 22, 2016 at 6:32 AM Michael Starks > wrote: > > > > Hidy-ho, > > I'm having a difficult time getting catch-all working when using Dovecot > LMTP. I would like *@example.com (everything) to go to > virt...@example.com, where virtual is a valid virtual user. It seems > that things are getting as far as LMTP, but then the mail gets bounced. > Thank you in advance for your assistance. It seems your postfix is misbehaving. Did you forget to run postmap? Aki Tuomi Dovecot oy
Catch-all with LMTP and Postfix
Hidy-ho, I'm having a difficult time getting catch-all working when using Dovecot LMTP. I would like *@example.com (everything) to go to virt...@example.com, where virtual is a valid virtual user. It seems that things are getting as far as LMTP, but then the mail gets bounced. To wit: Aug 21 08:02:50 hostname postfix/lmtp[4914]: 8DF8E9AFE6: to=, relay=mail.example.com[private/dovecot-lmtp], delay=0.07, delays=0.04/0.01/0.01/0.01, dsn=5.1.1, status=bounced (host mail.example.com[private/dovecot-lmtp] said: 550 5.1.1 User doesn't exist: t...@example.com (in reply to RCPT TO command)) In the previous log example, t...@example.com should have been forwarded (aliased) to the virtual mail user. Some config details: [root@hostname postfix]# cat /etc/postfix/virtual # Postmap this file after editing # # Person who should get root's mail. Don't receive mail as root! #root you # Basic system aliases -- these MUST be present MAILER-DAEMON postmaster postmaster root # General redirections for pseudo accounts binroot daemon root named root nobody root uucp root wwwroot ftp-bugs root postfixroot # Put your local aliases here. @example.comvirt...@example.com # Well-known aliases managerroot dumper root operator root abuse postmaster # trap decode to catch security attacks decode root [root@hostname postfix]# cat /etc/postfix/virtual_mailbox_domains Do NOT postmap this file after editing example.com [root@hostname postfix]# cat /etc/postfix/virtual_mailbox_maps # Postmap this file after editing # # From: http://wiki.dovecot.org/LDA/Postfix # Info: if you use the Dovecot LDA or LMTP it doesn't matter what you use behind the recipient address. Use "OK", the full name of the user or else. # I am using the Dovecot LMTP @example.com OK [root@hostname postfix]# dovecot --version 2.2.10 [root@hostname postfix]# dovecot -n # 2.2.10: /etc/dovecot/dovecot.conf # OS: Linux 3.10.0-327.22.2.el7.x86_64 x86_64 CentOS Linux release 7.2.1511 (Core) auth_verbose = yes login_greeting = What's crackalackin? mail_debug = yes mail_home = /var/mail/%d/%n mail_location = maildir:~/mail maildir_very_dirty_syncs = yes mbox_write_locks = fcntl namespace inbox { hidden = no inbox = yes location = mailbox Drafts { special_use = \Drafts } mailbox Junk { special_use = \Junk } mailbox Sent { special_use = \Sent } mailbox "Sent Messages" { special_use = \Sent } mailbox Trash { special_use = \Trash } prefix = separator = / type = private } passdb { args = scheme=SSHA512 /etc/dovecot/passdb driver = passwd-file } protocols = imap lmtp service auth { unix_listener /var/spool/postfix/private/auth { group = postfix mode = 0660 user = postfix } unix_listener auth-userdb { group = vmail mode = 0600 user = vmail } } service lmtp { unix_listener /var/spool/postfix/private/dovecot-lmtp { group = postfix mode = 0600 user = postfix } } ssl_cert = ssl_cipher_list = EDH+CAMELLIA:EDH+aRSA:EECDH+aRSA+AESGCM:EECDH+aRSA+SHA256:EECDH:+CAMELLIA128:+AES128:+SSLv3:!aNULL:!eNULL:!LOW:!3DES:!MD5:!EXP:!PSK:!DSS:!RC4:!SEED:!IDEA:!ECDSA:kEDH:CAMELLIA128-SHA:AES128-SHA ssl_dh_parameters_length = 2048 ssl_key = debugger_command = PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin ddd $daemon_directory/$process_name $process_id & sleep 5 disable_vrfy_command = yes header_checks = pcre:/etc/postfix/header_checks.pcre html_directory = no inet_protocols = all mail_owner = postfix mail_spool_directory = /var/spool/mail mailq_path = /usr/bin/mailq.postfix manpage_directory = /usr/share/man message_size_limit = 2048 mydestination = $myhostname, localhost.$mydomain, localhost myhostname = mail.example.com mynetworks_style = host newaliases_path = /usr/bin/newaliases.postfix notify_classes = resource, software, bounce queue_directory = /var/spool/postfix readme_directory = /usr/share/doc/postfix-2.10.1/README_FILES relay_domains = $mydestination sample_directory = /usr/share/doc/postfix-2.10.1/samples sendmail_path = /usr/sbin/sendmail.postfix setgid_group = postdrop smtp_header_checks = pcre:/etc/postfix/smtp_header_checks.pcre smtp_tls_note_starttls_offer = yes smtp_use_tls = yes smtpd_banner = $myhostname Microsoft ESMTP MAIL Service, Version: 6.0.3790.1830 ready. smtpd_data_restrictions = reject_unauth_pipelining, reject_multi_recipient_bounce permit smtpd_helo_required = yes smtpd_recipient_restrictions = permit_sasl_authenticated, permit_mynetworks, permit_sasl_authenticated, reject_invalid_hostname, reject_inv
Re: Postpone email delivery with LMTP and Postfix
Dne 30.4.2015 v 18:51 Thomas Leuxner napsal(a): * Miloslav Hůla 2015.04.29 22:47: is there any way, based on userdb/passwdb attribute, how to postpone an email delivery? The purpose is, I need to freeze an account (Maildir++) for a few minutes and new email must not be delivered. But emails must be delivered when account is unfrozen. You can put the messages on hold and then release them again: http://wiki2.dovecot.org/Migration/Online Thomas, in combination with SQL, that's exactly what I'm looking for. Thank you! Best regards, Milo
Re: Postpone email delivery with LMTP and Postfix
* Miloslav Hůla 2015.04.29 22:47: > is there any way, based on userdb/passwdb attribute, how to postpone an > email delivery? The purpose is, I need to freeze an account (Maildir++) for > a few minutes and new email must not be delivered. But emails must be > delivered when account is unfrozen. You can put the messages on hold and then release them again: http://wiki2.dovecot.org/Migration/Online signature.asc Description: Digital signature
Re: Postpone email delivery with LMTP and Postfix
On 04/29/2015 04:47 PM, Miloslav Hůla wrote: Hi, is there any way, based on userdb/passwdb attribute, how to postpone an email delivery? The purpose is, I need to freeze an account (Maildir++) for a few minutes and new email must not be delivered. But emails must be delivered when account is unfrozen. I found few things about Postfix filters, but I'm not sure it's a good way. Thank you, Milo The right way would probably be to use a transport map in postfix to defer deliveries for specific recipients.
Postpone email delivery with LMTP and Postfix
Hi, is there any way, based on userdb/passwdb attribute, how to postpone an email delivery? The purpose is, I need to freeze an account (Maildir++) for a few minutes and new email must not be delivered. But emails must be delivered when account is unfrozen. I found few things about Postfix filters, but I'm not sure it's a good way. Thank you, Milo