[Dovecot] Address extensions

2012-07-29 Thread Armistead, Kurt
Hi guys,

I'm trying to set up in-mailbox routing for messages using the +
delimiter. The server runs postfix and dovecot 1.2.15.
I have re-defined the delivery service in master.cf as -f ${sender} -d
${user}@${nexthop} -n -m INBOX.${extension} (server was formerly courier)
but the routing only works when the destination folder has no uppercase
characters. Folder1 doesn't deliver correctly while folder2 does.

What am I doing wrong?

Kurt



Re: [Dovecot] Address Extensions with System Users

2009-04-18 Thread Bill Cole

Scott Silva wrote, On 4/17/09 1:27 PM:
[...]

AFAIR the RFC's state that all e-mail addresses are acted on in lowercase when
being manipulated. The upper case parts are left intact only for human beings
to read.


That is very wrong. Email address local-parts MUST be treated as 
case-sensitive in SMTP because historically many hosts (including most 
systems resembling Unix) have treated usernames as case-sensitive and used 
local-parts that map to directories on case-sensitive filesystems. So RFC's 
821, 822, 2821, and 5321 all explicitly state that local-parts are 
case-sensitive and RFC's 2822 and 5322 say it indirectly by way of the ABNF 
spec. The one exception is postmaster, which gets special treatment as the 
only address that has to exist in every domain.


Note that the transport and header case-sensitivity does not automatically 
translate into how delivery agents and mailstore agents work. In this case, 
the case-folding is being done by Postfix's local component, which is its 
documented behavior.






Re: [Dovecot] Address Extensions with System Users

2009-04-18 Thread Timo Sirainen

On Apr 18, 2009, at 2:05 AM, Bill Cole wrote:


Scott Silva wrote, On 4/17/09 1:27 PM:
[...]
AFAIR the RFC's state that all e-mail addresses are acted on in  
lowercase when
being manipulated. The upper case parts are left intact only for  
human beings

to read.


That is very wrong. Email address local-parts MUST be treated as  
case-sensitive in SMTP because historically many hosts (including  
most systems resembling Unix) have treated usernames as case- 
sensitive and used local-parts that map to directories on case- 
sensitive filesystems. So RFC's 821, 822, 2821, and 5321 all  
explicitly state that local-parts are case-sensitive and RFC's 2822  
and 5322 say it indirectly by way of the ABNF spec. The one  
exception is postmaster, which gets special treatment as the only  
address that has to exist in every domain.


I have no strong opinions about this, but 
http://mailman2.u.washington.edu/pipermail/imap-uw/2008-September/002190.html



Re: [Dovecot] Address Extensions with System Users

2009-04-17 Thread Scott Silva
on 4-16-2009 6:10 PM Jeff Grossman spake the following:
 On 4/16/2009 5:18 PM, Jeff Grossman wrote:
 On 4/16/2009 2:08 PM, Timo Sirainen wrote:
 On Thu, 2009-04-16 at 11:14 -0700, Jeff Grossman wrote:
 Everything I can find about setting this up applies to virtual users
 which
 I do not have.  How do I get Deliver to recognize the address
 extension.
 I am sure it is easy, and I apologize for not finding the answer out
 myself.
 Nope. Actually deliver doesn't currently support that feature at all
 internally. You could always write a wrapper script that split the
 extension part and feed it separately to deliver..
 I was messing around with making this work, and I almost got it, but
 ran into a problem.  I changed the line in main.cf to:

 mailbox_command = /usr/local/libexec/dovecot/deliver -n -m $EXTENSION

 Now, in my logs it displays this:

 Apr 16 17:02:34 apple postfix/local[5990]: 3BFF77B8F24:
 to=jeff+...@stikman.com, relay=local, delay=0.06,
 delays=0.01/0.03/0/0.02, dsn=2.0.0, status=sent (delivered to command:
 /usr/local/libexec/dovecot/deliver -n -m $EXTENSION)

 and tries to save the message in the dad folder.  The only problem is
 the dad folder is listed as Dad and no matter what I put in the
 e-mail address, capital D or lowecase D, it always tries to save
 it do dad which does not exist.

 deliver(jeff): msgid=49e7c710.7060...@stikman.com: save failed to
 dad: Mailbox doesn't exist: dad

 Do I have to change all of my folder names to lowercase, or is there a
 easier fix I am missing?

 Also, a different problem in regards to this also.  Now I am getting
 the following lines in my maillog file:

 Apr 16 17:02:34 apple dovecot: deliver(jeff): sieve runtime error:
 Keep: Generic
  Error
 Apr 16 17:02:34 apple dovecot: deliver(jeff):
 sieve_execute_bytecode(/home/jeff/sievec) failed

 This only started after I changed the deliver line in main.cf.  If I
 can get + addressing working, I don't need the sieve script so I will
 remove it.

 Thanks,
 Jeff
 It works if I change the folder name to lowercase.  But, it seems to be
 delivering the message twice to the folder.  Not sure why that is yet. 
 Plus, I am no longer getting the sieve errors.  Must be something to do
 with the folder name mismatch.
 
 Jeff
 
AFAIR the RFC's state that all e-mail addresses are acted on in lowercase when
being manipulated. The upper case parts are left intact only for human beings
to read.



signature.asc
Description: OpenPGP digital signature


[Dovecot] Address Extensions with System Users

2009-04-16 Thread Jeff Grossman
I am using Dovecot 1.2RC2 with Postfix 2.5.5.  Everything is running fine.
 I would like to start using address extensions and have e-mail
automatically filtered into folders based on the folder name after the +
in the e-mail address.  I only use system users, no virtual users.  I have
Deliver configured in main.cf as:

mailbox_command = /usr/local/libexec/dovecot/deliver

Everything I can find about setting this up applies to virtual users which
I do not have.  How do I get Deliver to recognize the address extension. 
I am sure it is easy, and I apologize for not finding the answer out
myself.  Here is a copy of my dovecot -n output:

# 1.2.rc2: /usr/local/etc/dovecot.conf
# OS: Linux 2.6.29-1-amd64 x86_64 Debian squeeze/sid
base_dir: /var/run/dovecot/
protocols: imap imaps pop3 pop3s
ssl_cert_file: /etc/ssl/certs/stikman-godaddy.crt
ssl_key_file: /etc/ssl/private/stikman-godaddy.key
ssl_cipher_list: ALL:!LOW:!SSLv2
disable_plaintext_auth: no
login_dir: /var/run/dovecot//login
login_executable(default): /usr/local/libexec/dovecot/imap-login
login_executable(imap): /usr/local/libexec/dovecot/imap-login
login_executable(pop3): /usr/local/libexec/dovecot/pop3-login
mail_location: maildir:~/Maildir
mail_executable(default): /usr/local/libexec/dovecot/imap
mail_executable(imap): /usr/local/libexec/dovecot/imap
mail_executable(pop3): /usr/local/libexec/dovecot/pop3
mail_plugin_dir(default): /usr/local/lib/dovecot/imap
mail_plugin_dir(imap): /usr/local/lib/dovecot/imap
mail_plugin_dir(pop3): /usr/local/lib/dovecot/pop3
auth default:
  mechanisms: plain login
  passdb:
driver: pam
  userdb:
driver: passwd
plugin:
  sieve: sieve



Re: [Dovecot] Address Extensions with System Users

2009-04-16 Thread Timo Sirainen
On Thu, 2009-04-16 at 11:14 -0700, Jeff Grossman wrote:
 Everything I can find about setting this up applies to virtual users which
 I do not have.  How do I get Deliver to recognize the address extension. 
 I am sure it is easy, and I apologize for not finding the answer out
 myself.

Nope. Actually deliver doesn't currently support that feature at all
internally. You could always write a wrapper script that split the
extension part and feed it separately to deliver..


signature.asc
Description: This is a digitally signed message part


Re: [Dovecot] Address Extensions with System Users

2009-04-16 Thread Jeff Grossman
Timo Sirainen wrote:
 On Thu, 2009-04-16 at 11:14 -0700, Jeff Grossman wrote:
 Everything I can find about setting this up applies to virtual users
 which
 I do not have.  How do I get Deliver to recognize the address extension.
 I am sure it is easy, and I apologize for not finding the answer out
 myself.

 Nope. Actually deliver doesn't currently support that feature at all
 internally. You could always write a wrapper script that split the
 extension part and feed it separately to deliver..

Well doesn't that suck.  I have no idea how to create a wrapper script.  I
guess I need to figure something else out.

So, if I was create virtual users I would be able to use the +ext filter
method?



Re: [Dovecot] Address Extensions with System Users

2009-04-16 Thread Timo Sirainen
On Thu, 2009-04-16 at 14:25 -0700, Jeff Grossman wrote:
 So, if I was create virtual users I would be able to use the +ext filter
 method?

Yeah, because Postfix is the one doing all the work then.


signature.asc
Description: This is a digitally signed message part


Re: [Dovecot] Address Extensions with System Users

2009-04-16 Thread Jeff Grossman

On 4/16/2009 2:08 PM, Timo Sirainen wrote:

On Thu, 2009-04-16 at 11:14 -0700, Jeff Grossman wrote:
   

Everything I can find about setting this up applies to virtual users which
I do not have.  How do I get Deliver to recognize the address extension.
I am sure it is easy, and I apologize for not finding the answer out
myself.
 

Nope. Actually deliver doesn't currently support that feature at all
internally. You could always write a wrapper script that split the
extension part and feed it separately to deliver..
   
I was messing around with making this work, and I almost got it, but ran 
into a problem.  I changed the line in main.cf to:


mailbox_command = /usr/local/libexec/dovecot/deliver -n -m $EXTENSION

Now, in my logs it displays this:

Apr 16 17:02:34 apple postfix/local[5990]: 3BFF77B8F24: 
to=jeff+...@stikman.com, relay=local, delay=0.06, 
delays=0.01/0.03/0/0.02, dsn=2.0.0, status=sent (delivered to command: 
/usr/local/libexec/dovecot/deliver -n -m $EXTENSION)


and tries to save the message in the dad folder.  The only problem is 
the dad folder is listed as Dad and no matter what I put in the e-mail 
address, capital D or lowecase D, it always tries to save it do 
dad which does not exist.


deliver(jeff): msgid=49e7c710.7060...@stikman.com: save failed to dad: 
Mailbox doesn't exist: dad


Do I have to change all of my folder names to lowercase, or is there a 
easier fix I am missing?


Also, a different problem in regards to this also.  Now I am getting the 
following lines in my maillog file:


Apr 16 17:02:34 apple dovecot: deliver(jeff): sieve runtime error: Keep: 
Generic

 Error
Apr 16 17:02:34 apple dovecot: deliver(jeff): 
sieve_execute_bytecode(/home/jeff/sievec) failed


This only started after I changed the deliver line in main.cf.  If I can 
get + addressing working, I don't need the sieve script so I will remove it.


Thanks,
Jeff


Re: [Dovecot] Address Extensions with System Users

2009-04-16 Thread Jeff Grossman

On 4/16/2009 5:18 PM, Jeff Grossman wrote:

On 4/16/2009 2:08 PM, Timo Sirainen wrote:

On Thu, 2009-04-16 at 11:14 -0700, Jeff Grossman wrote:
Everything I can find about setting this up applies to virtual users 
which
I do not have.  How do I get Deliver to recognize the address 
extension.

I am sure it is easy, and I apologize for not finding the answer out
myself.

Nope. Actually deliver doesn't currently support that feature at all
internally. You could always write a wrapper script that split the
extension part and feed it separately to deliver..
I was messing around with making this work, and I almost got it, but 
ran into a problem.  I changed the line in main.cf to:


mailbox_command = /usr/local/libexec/dovecot/deliver -n -m $EXTENSION

Now, in my logs it displays this:

Apr 16 17:02:34 apple postfix/local[5990]: 3BFF77B8F24: 
to=jeff+...@stikman.com, relay=local, delay=0.06, 
delays=0.01/0.03/0/0.02, dsn=2.0.0, status=sent (delivered to command: 
/usr/local/libexec/dovecot/deliver -n -m $EXTENSION)


and tries to save the message in the dad folder.  The only problem is 
the dad folder is listed as Dad and no matter what I put in the 
e-mail address, capital D or lowecase D, it always tries to save 
it do dad which does not exist.


deliver(jeff): msgid=49e7c710.7060...@stikman.com: save failed to 
dad: Mailbox doesn't exist: dad


Do I have to change all of my folder names to lowercase, or is there a 
easier fix I am missing?


Also, a different problem in regards to this also.  Now I am getting 
the following lines in my maillog file:


Apr 16 17:02:34 apple dovecot: deliver(jeff): sieve runtime error: 
Keep: Generic

 Error
Apr 16 17:02:34 apple dovecot: deliver(jeff): 
sieve_execute_bytecode(/home/jeff/sievec) failed


This only started after I changed the deliver line in main.cf.  If I 
can get + addressing working, I don't need the sieve script so I will 
remove it.


Thanks,
Jeff
It works if I change the folder name to lowercase.  But, it seems to be 
delivering the message twice to the folder.  Not sure why that is yet.  
Plus, I am no longer getting the sieve errors.  Must be something to do 
with the folder name mismatch.


Jeff


Re: [Dovecot] Address Extensions with System Users

2009-04-16 Thread Timo Sirainen
On Thu, 2009-04-16 at 17:18 -0700, Jeff Grossman wrote:
 Apr 16 17:02:34 apple postfix/local[5990]: 3BFF77B8F24: 
 to=jeff+...@stikman.com, relay=local, delay=0.06, 
 delays=0.01/0.03/0/0.02, dsn=2.0.0, status=sent (delivered to command: 
 /usr/local/libexec/dovecot/deliver -n -m $EXTENSION)
 
 and tries to save the message in the dad folder.  The only problem is 
 the dad folder is listed as Dad and no matter what I put in the e-mail 
 address, capital D or lowecase D, it always tries to save it do 
 dad which does not exist.

deliver doesn't lowercase it, so Postfix must be doing that for
$EXTENSION. No idea if you can change it.



signature.asc
Description: This is a digitally signed message part


Re: [Dovecot] Address Extensions with System Users

2009-04-16 Thread Jeff Grossman

On 4/16/2009 7:12 PM, Timo Sirainen wrote:

On Thu, 2009-04-16 at 17:18 -0700, Jeff Grossman wrote:
   

Apr 16 17:02:34 apple postfix/local[5990]: 3BFF77B8F24:
to=jeff+...@stikman.com, relay=local, delay=0.06,
delays=0.01/0.03/0/0.02, dsn=2.0.0, status=sent (delivered to command:
/usr/local/libexec/dovecot/deliver -n -m $EXTENSION)

and tries to save the message in the dad folder.  The only problem is
the dad folder is listed as Dad and no matter what I put in the e-mail
address, capital D or lowecase D, it always tries to save it do
dad which does not exist.
 

deliver doesn't lowercase it, so Postfix must be doing that for
$EXTENSION. No idea if you can change it.

   
Thanks for your help.  I have left a message on the postfix list to see 
if they can help with the lowercase issue.  I seem to be getting two 
messages for any e-mail that has the plus addressing in it.  Is this a 
Deliver problem or a Postfix problem?  Where would I start to 
troubleshoot it?


Jeff


[Dovecot] Address extensions with dovecot LDA

2007-05-26 Thread Nick Kartsioukas
Greetings!  I'm using Dovecot and Postfix with virtual mailboxes, the
mailbox data is contained in a MySQL database.  I'd like to use the
Dovecot delivery agent so I can support Sieve filters.  However, I'm
not sure how to get the delivery agent to work with the Dovecot auth
mechanism and MySQL to do proper lookups of email addresses with
address extensions (such as [EMAIL PROTECTED]).  Does anyone have
a similar setup that can tell me how I might get this to work?

-- 
Nick Kartsioukas|  KF6UZB
[EMAIL PROTECTED]   |  NK2694


Re: [Dovecot] Address extensions with dovecot LDA SOLVED

2007-05-26 Thread Nick Kartsioukas
Okay...I thought I had done enough searching before posting, but I guess
I was wrong :)

In Postfix's master.cf file I changed the dovecot delivery command to:
/usr/lib/dovecot/deliver -d [EMAIL PROTECTED]

That was much easier than what I was trying before :)

(note to others...the list software munges email addresses to read
blah at blah.com, so you'll want to reformat the above to have no
spaces and an actual at symbol in place of at, otherwise deliver
will give an error!)

(further gah...it's even in the wiki, how did I miss that?  Sorry, folks!)

-- 
Nick Kartsioukas|  KF6UZB
[EMAIL PROTECTED]   |  NK2694