Thanks Noel. The problem was surely in the logger. Postfix was working fine. My policy server implementation was also fine. It in fact seem to be a feature of the logger! I was so worried about it.
My implementation is Java based and I am reading the policy request key-value pairs into an instance of Properties class. Once loaded, I write to the log file using the 'list(PrintStream)' method of that class. I never knew that it summarizes the output. --- On Thu, 3/17/11, Noel Jones <njo...@megan.vbhcs.org> wrote: > From: Noel Jones <njo...@megan.vbhcs.org> > Subject: Re: SMTP Access Policy Delegation - issue with sender address > To: postfix-users@postfix.org > Date: Thursday, March 17, 2011, 12:57 AM > On 3/16/2011 1:27 PM, Kamal > Wickramanayake wrote: > > Hi, > > > > I have attempted implementing an access policy > delegation mechanism based on this document: > http://www.postfix.org/SMTPD_POLICY_README.html > > > > To test, I got the policy delegation requests logged > into a file. I see lines like this: > > > > sender=x...@yyyy.com > > > > OK. That's perfect. But I also see lines like this: > > > > sender=xxxxxx+xxx_=xxxxxxxxxxxx=xxxxx.yy@gma... > > > > As I realized, such sender addresses appear when a > gmail user has forwarded the mails to an account in my > server. The value of the 'sender' attribute has two '=' > signs. Is this how SMTP works when mails are auto forwarded? > I haven't gone through the RFC in full. > > > > My real problem lies with the last portion of that > value. I am interested in figuring out the sender domain. > But postfix seems to send '@gma...'. That truncation causes > me not to split the sender address into parts based on '@' > and correctly figure out the sender's domain. If I do, what > I end up with is 'gma...' as the domain. If the sender > address is lengthier, sometimes '@' might not even appear, > right? I am wondering if this is a bug in postfix or normal. > Any thoughts? > > > > Postfix-2.7.0-1, Ubuntu 10.04 > > > > Kamal > > > > > > > > > > > The equal sign "=" has no special meaning in the sender > address. The sender is free to use as many of them as > they > see fit. Often "=" is used as a delimiter for VERP > addresses, > but this is not a requirement nor is "=" reserved for that > > purpose. > > How many characters does your log display before the > "..."? > > Looking at my greylist DB (which uses the same postfix > policy > protocol), the longest sender address I have recorded is 89 > > characters. There are no entries containing "..." in > my DB. > > Absent further evidence, I'm inclined to think there is a > bug > in your logger. > > > -- Noel Jones >