[ Trying this again as I think I sent to the wrong address the first time ]

Greetings,

First I'd like to say thank you to all of the developers and contributors to 
Postfix. I've used it for many years with great success and happiness. :)

I'm on Ubuntu Server 16.04 (up to date) and using the stock postfix package 
(3.10-3).

I have a working installation with postfix and dovecot, and I want to add sieve 
to it, so I am trying to configure postfix to use lmtp for its delivery 
service. However it is ignoring that request, and for every message I get 
"status=sent (delivered to maildir)" and it shows up in my Inbox.

On my mail host I have 1 normal user. I have postfix configured to accept mail 
for several different domains, and each domain has a lot of different mail 
usernames (I use this for mailing lists and such). I use the virtual_maps 
feature of postfix, and have a map file that looks like this:

ab...@dougbarton.us normaluser
hostmas...@dougbarton.us normaluser
do...@dougbarton.us normaluser
...

All of this works great, and mail for all the different usernames and domains 
gets delivered into my one real user's Maildir, and I can see the mail with my 
IMAP clients.

I've configured sieve in dovecot, and I can see the socket for lmtp in 
/var/spool/postfix/private/.

So according to all the tutorials I've read my assumption is that my next step 
is this in postfix' main.cf:

virtual_transport = lmtp:unix:private/dovecot-lmtp

which I did, and postfix restarts with no errors. But, it seems to avoid lmtp 
altogether, and it delivers straight to my Maildir Inbox every time.

I have since learned that I probably don't want virtual_transport for this, but 
I probably do want local_transport. The problem is that if I put in 
local_transport = lmtp:unix:private/dovecot-lmtp I get a bounce every time:

Mar 15 18:01:20 dougbarton postfix/lmtp[11793]: 8BCD38F: 
to=<do...@dougbarton.us>, relay=dougbarton.us[private/dovecot-lmtp], 
delay=0.03, delays=0.01/0/0/0.01, dsn=5.1.1, status=bounced (host 
dougbarton.us[private/dovecot-lmtp] said: 550 5.1.1 <do...@dougbarton.us> User 
doesn't exist: do...@dougbarton.us (in reply to RCPT TO command))

>From further reading it seems that I need to add some sort of additional 
>mapping, but it's not clear to me what. Adding my virtual_maps file to 
>local_recipient_maps didn't work. I also tried 'local_recipient_maps = ' to 
>see if I could rule out a chroot issue, but that didn't work either.

I tried adding logging to the lmtp process, and the only thing I get in the log 
is this:
Mar 15 17:57:57 lmtp(11397): Info: Connect from local
Mar 15 17:57:57 lmtp(11397): Info: Disconnect from local: Successful quit

That happens twice per delivery attempt.

I've been working on this for two days, and I'm probably missing something 
really obvious, but I would appreciate your assistance. Testing has been 
difficult because the messages bounce hard and I get a lot of mail every day.

Here is postconf -n with security-related and boring items removed.

alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
compatibility_level = 2
home_mailbox = Maildir/
local_recipient_maps = proxy:unix:passwd.byname $alias_maps
milter_default_action = accept
mydestination = $mydomain, localhost.$mydomain, localhost
mydomain = dougbarton.us
myhostname = dougbarton.us
smtpd_delay_reject = yes
smtpd_helo_required = yes
smtpd_helo_restrictions = permit_mynetworks permit_sasl_authenticated 
reject_non_fqdn_helo_hostname reject_invalid_helo_hostname permit
smtpd_relay_restrictions = permit_mynetworks permit_sasl_authenticated 
reject_unauth_pipelining reject_unauth_destination reject_unverified_recipient 
reject_rbl_client zen.spamhaus.org check_policy_service inet:127.0.0.1:10023 
check_policy_service unix:private/spf-policy
smtpd_sender_restrictions = permit_mynetworks permit_sasl_authenticated 
reject_non_fqdn_sender reject_unknown_sender_domain permit
unverified_recipient_reject_code = 550
virtual_maps = hash:/etc/postfix/virtual_addresses
virtual_transport = lmtp:unix:private/dovecot-lmtp

I'm sorry that this message is so long, but apparently my situation is somewhat 
unusual (I wasn't able to find any similar configurations after a lot of 
searching) and I wasn't sure what to include.

Any help will be greatly appreciated.

Doug

Reply via email to