[Dovecot] recipient_delimiter

Phil Howard ttiphil at gmail.com
Thu May 27 20:36:48 EEST 2010


On Thu, May 27, 2010 at 12:52, Gregory Finch <gfinch at ldmltd.ca> wrote:
> On 2010-05-27 8:27 AM, Phil Howard wrote:
>> On Thu, May 27, 2010 at 10:50, Gregory Finch <gfinch at ldmltd.ca> wrote:
>>
>>> I've never had to touch auth_username_chars to get this to work.
>>>
>>> In main.cf, I've set:
>>>
>>> mailbox_transport = dovecot
>>
>> I have virtual_transport = dovecot
>>
>>> recipient_delimiter = +
>>
>> I have that now (didn't when I initially set up the server assuming it
>> was a default, but later added it)
>>
>>
>>> And in master.cf:
>>>
>>> # Dovecot
>>> dovecot         unix    -       n       n       -       -       pipe
>>>        flags=DR user=vmail:vmail
>>> argv=/usr/local/libexec/dovecot/deliver -f ${sender} -d ${user} -a
>>> ${recipient} -n -m ${extension}
>>
>> Mine is a bit different:
>>
>> dovecot   unix        -       n       n       -       -       pipe
>>   flags=DRhu user=vmail:vmail argv=/usr/lib/dovecot/deliver -f
>> ${sender} -d ${user}@${nexthop}
>>
>> I'm still not sure what "nexthop" means but it seems to make it work.
>>
>>
>>> I may not need all the options to deliver, but this does work nice.
>>> One thing I did notice is that I needed to add the %L arg in my passdb
>>> and userdb definitions in my dovecot.conf in order to make the mailbox
>>> name case insensitive:
>>>
>>>  passdb:
>>>    driver: passwd-file
>>>    args: username_format=%Ln /etc/dovecot/passwd
>>>  userdb:
>>>    driver: static
>>>    args: uid=500 gid=500 home=/srv/dovecot/%Ln
>>
>> ================================================================
>> # 1.1.11: /etc/dovecot/dovecot.conf
>> # OS: Linux 2.6.31-19-server x86_64 Ubuntu 9.10 ext3
>> base_dir: /var/run/dovecot/
>> log_path: /var/log/dovecot/error.log
>> info_log_path: /var/log/dovecot/info.log
>> log_timestamp: %Y-%m-%d %H:%M:%S
>> protocols: imap pop3 imaps pop3s
>> listen: 172.30.0.24, [fc00::18], 127.0.0.1, [::1]
>> ssl_cert_file: /etc/ssl/certs/imap.example.com.crt
>> ssl_key_file: /etc/ssl/private/imap.example.com.key
>> ssl_parameters_regenerate: 24
>> ssl_cipher_list:
>> ALL:!LOW:!SSLv2:ALL:!aNULL:!ADH:!eNULL:!EXP:RC4+RSA:+HIGH:+MEDIUM
>> login_dir: /var/run/dovecot//login
>> login_executable(default): /usr/lib/dovecot/imap-login
>> login_executable(imap): /usr/lib/dovecot/imap-login
>> login_executable(pop3): /usr/lib/dovecot/pop3-login
>> login_greeting: AUTHORIZED USERS ONLY -- unauthorized access strictly prohibited
>> login_greeting_capability(default): yes
>> login_greeting_capability(imap): yes
>> login_greeting_capability(pop3): no
>> mail_max_userip_connections(default): 10
>> mail_max_userip_connections(imap): 10
>> mail_max_userip_connections(pop3): 3
>> verbose_proctitle: yes
>> first_valid_uid: 250
>> mail_privileged_group: mail
>> mail_uid: vmail
>> mail_gid: vmail
>> mail_location: maildir:/home/mail/%Ld/%Ln/mail
>> mail_debug: yes
>> mail_executable(default): /usr/lib/dovecot/imap
>> mail_executable(imap): /usr/lib/dovecot/imap
>> mail_executable(pop3): /usr/lib/dovecot/pop3
>> mail_process_size: 768
>> mail_plugin_dir(default): /usr/lib/dovecot/modules/imap
>> mail_plugin_dir(imap): /usr/lib/dovecot/modules/imap
>> mail_plugin_dir(pop3): /usr/lib/dovecot/modules/pop3
>> imap_client_workarounds(default): outlook-idle delay-newmail
>> imap_client_workarounds(imap): outlook-idle delay-newmail
>> imap_client_workarounds(pop3):
>> pop3_client_workarounds(default):
>> pop3_client_workarounds(imap):
>> pop3_client_workarounds(pop3): outlook-no-nuls oe-ns-eoh
>> auth default:
>>   mechanisms: plain login
>>   username_chars:
>> abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890.-_ at +
>>   username_format: %Ln@%Ld
>>   verbose: yes
>>   debug: yes
>>   debug_passwords: yes
>>   passdb:
>>     driver: passwd-file
>>     args: username_format=%Ln@%Ld /etc/mailauth/deny
>>     deny: yes
>>   passdb:
>>     driver: passwd-file
>>     args: username_format=%Ln /etc/mailauth/%Ld/deny
>>     deny: yes
>>   passdb:
>>     driver: passwd-file
>>     args: scheme=crypt username_format=%Ln@%Ld /etc/mailauth/passwd
>>   passdb:
>>     driver: passwd-file
>>     args: scheme=crypt username_format=%Ln /etc/mailauth/%Ld/passwd
>>   userdb:
>>     driver: passwd-file
>>     args: username_format=%Ln@%Ld /etc/mailauth/passwd
>>   userdb:
>>     driver: passwd-file
>>     args: username_format=%Ln /etc/mailauth/%Ld/passwd
>>   socket:
>>     type: listen
>>     client:
>>       path: /var/spool/postfix/private/dovecot-auth
>>       mode: 432
>>       user: postfix
>>       group: postfix
>>     master:
>>       path: /var/run/dovecot/auth-master
>>       mode: 384
>>       user: vmail
>>       group: vmail
>> ================================================================
>> alias_database = cdb:/etc/postfix/aliases
>> alias_maps = cdb:/etc/aliases
>> command_directory = /usr/sbin
>> config_directory = /etc/postfix
>> daemon_directory = /usr/lib/postfix
>> data_directory = /var/lib/postfix
>> default_destination_concurrency_limit = 2
>> default_privs = nobody
>> in_flow_delay = 1s
>> inet_protocols = ipv4, ipv6
>> local_destination_concurrency_limit = 2
>> mail_owner = postfix
>> mydomain = example.com
>> myhostname = mx.example.com
>> mynetworks = 127.0.0.0/8, 172.16.0.0/16, 172.20.0.0/16, 172.30.0.0/16,
>>  [::1]/128, [fc00::]/48, [fe80::]/48
>> myorigin = $mydomain
>> proxy_interfaces = MY OUTSIDE IP
>> queue_directory = /var/spool/postfix
>> recipient_delimiter = -
>                        ^^
> do you mean to have a + here instead?

Well, it is coded as a + in my master copy distributed to the servers.
 I didn't notice that and will need to check and see what is
happening.  Maybe it's coded twice or something.

> the errors in your other email suggest (to me, I could be way off base)
> that postfix isn't finding <phil+howard at example.com> as a local
> recipient. This might have to do with the delimiter though.

The messages suggest it is trying to send it to Dovecot.  That is
"local" as far as I'm concerned (but what is "local" ... some people
I've found insist that the only way something is local is if it is
delivered to a system shell user by the MTA itself, and not by an
alternate delivery agent even if it goes into the same filesystem).
So when someone says "local" I really don't know for sure what is
meant.


More information about the dovecot mailing list