Thanks again Jasper. I have enabled local -v debug logging - and I think we can see in more detail where the problem arises - but I still can't figure it out.
I have included what I think is the relevant bit... Here it is:

8073]: relay: local
Sep 12 23:01:00 C5 postfix/local[28073]: exp_type: 0
Sep 12 23:01:00 C5 postfix/local[28073]: exp_from: null
Sep 12 23:01:00 C5 postfix/local[28073]: why: buffer
Sep 12 23:01:00 C5 postfix/local[28073]: deliver_switch[2]: local rchapman 
recip rchap...@c5.aardvark.com.au exten  deliver rchap...@c5.aardvark.com.au 
exp_from
Sep 12 23:01:00 C5 postfix/local[28073]: deliver_alias[3]: local rchapman recip 
rchap...@c5.aardvark.com.au exten  deliver rchap...@c5.aardvark.com.au exp_from
Sep 12 23:01:00 C5 postfix/local[28073]: deliver_alias: 
hash:/etc/aliases(0,lock|no_regsub|no_proxy|no_unauth|fold_fix): rchapman = 
richard
Sep 12 23:01:00 C5 postfix/local[28073]: deliver_alias[3]: reset user_attr
Sep 12 23:01:00 C5 postfix/local[28073]: maps_find: aliases: owner-rchapman: 
not found
Sep 12 23:01:00 C5 postfix/local[28073]: deliver_alias[3]: reset owner attr
Sep 12 23:01:00 C5 postfix/local[28073]: deliver_token_string: richard
Sep 12 23:01:00 C5 postfix/local[28073]: deliver_token: richard
Sep 12 23:01:00 C5 postfix/local[28073]: deliver_resolve_tree[4]: local 
rchapman recip rchap...@c5.aardvark.com.au exten  deliver 
rchap...@c5.aardvark.com.au exp_from rchapman
Sep 12 23:01:00 C5 postfix/local[28073]: tok822_rewrite: input: richard
Sep 12 23:01:00 C5 postfix/local[28073]: connect to subsystem private/rewrite
Sep 12 23:01:00 C5 postfix/local[28073]: send attr request = rewrite
Sep 12 23:01:00 C5 postfix/local[28073]: send attr rule = local
Sep 12 23:01:00 C5 postfix/local[28073]: send attr address = richard
Sep 12 23:01:00 C5 postfix/local[28073]: private/rewrite socket: wanted 
attribute: flags
Sep 12 23:01:00 C5 postfix/local[28073]: input attribute name: flags
Sep 12 23:01:00 C5 postfix/local[28073]: input attribute value: 0
Sep 12 23:01:00 C5 postfix/local[28073]: private/rewrite socket: wanted 
attribute: address
Sep 12 23:01:00 C5 postfix/local[28073]: input attribute name: address
Sep 12 23:01:00 C5 postfix/local[28073]: input attribute value: 
rich...@aardvark.com.au
Sep 12 23:01:00 C5 postfix/local[28073]: private/rewrite socket: wanted 
attribute: (list terminator)
Sep 12 23:01:00 C5 postfix/local[28073]: input attribute name: (end)
Sep 12 23:01:00 C5 postfix/local[28073]: rewrite_clnt: local: richard ->  
rich...@aardvark.com.au
Sep 12 23:01:00 C5 postfix/local[28073]: tok822_rewrite: result: 
rich...@aardvark.com.au
Sep 12 23:01:00 C5 postfix/local[28073]: send attr request = resolve
Sep 12 23:01:00 C5 postfix/local[28073]: send attr sender =
Sep 12 23:01:00 C5 postfix/local[2

See also below:

On 12/09/2010 10:13 PM, Jasper Jongmans wrote:
On 2010-09-12 05:53, Richard Chapman wrote:
Hi again Jasper..
I do appreciate your help - but have not solved the problem yet. Please see below.

On 9/09/2010 11:58 PM, Jasper Jongmans wrote:
On 2010-09-09 17:29, Richard Chapman wrote:
[snip]
Sep 9 22:43:50 C5 postfix/local[9259]: B3D401D2231D: to=<rchap...@c5.aardvark.com.au>, relay=local, delay=0.08, delays=0.06/0.01/0/0.01, dsn=2.0.0, status=sent (forwarded as )
Above line means local(8) was instructed by something like aliases or .forward to send to another address. The original message was B3D401D2231D, the new is C37ED1D2232B.
OK. I have checked there are no .forward files in the relevant users home directories. Is there anywhere else I should look? I am runnig postfix, dovecot, centos 5.5. Hopefully this is not relevant - but I think sendmail is still installed on this machine. I changed from sendmail to postfix some time back.
I have disabled masquerading, but the problem remains.
I have some user aliases - but have done tests on users with no obvious aliases - and emails to them are also rejected. Do you have any other suggestions as to where to look for unwanted aliases or forwards?

Edit master.cf and run local with -v for more verbose logging to find out what makes local decide to forward the message. I still suspect aliases or /home/richard/.forward are the culprit, run "postmap -q rchapman /etc/aliases" and repeat with whatever that returns, also run "cat /home/richard/.forward". You use procmail but local does not report delivering to procmail, this suggests the rewrite occurs before mailbox_command (check local man-page for delivery method precedence); check your procmail recipes anyway, just in case. You are also using virtual_alias_maps, check whether you really want this and that the contents of the file are correct. You didn't specify virtual_alias_domains so don't expect virtual aliases to work properly if at all.


*>  postmap -q rchapman /etc/aliases*
richard
*>  postmap -q richard /etc/aliases*
*>  cat /home/richard/.forward*
cat: /home/richard/.forward: No such file or directory


I'll double check the vitrtual domains tomorrow. I think they are working as intended. I have another domain with a small set of users - which forward to accounts on this machine. I'll check why I don't seem to have virtual_alias_domains. I wonder whether this could be my problem. More tests tomorrow...:-)

[snip]
The smtp-client connects to Google Apps and succesfully delivers the message. Some forward at Google Apps leads to another connection to your smtpd-server, which then rejects the email because it is addressed to the wrong domain. You probably have had this detour for a while, just didn't notice it before because your server accepted the email in the second phase.

Yes. That is how I was interpreting it too. The forward at google apps is intentional. I agree the problem is probably something lost in the mists of time..:-)

Do you know whether masquerading could case this problem? I understood that masquerading applied only to the sender address on outgoing email - but I may be wrong. I have certainly run tests with it disabled in main.cf - and I believe I have restarted postix. Is there anything else I would need to do to disable it properly? e.g. Would I need to run postmap on some file?

When exactly masquerading applies is a bit tricky, consult masquerade_classes and masquerade_domains documentation. You described earlier you want this server to receive only for c5.aardvark.com.au and not aardvark.com.au. With your current settings mail from local users will appear to come from aardvark.com.au and replies will go to Google Apps, is this how you intend it to work? Consult http://www.postfix.org/ADDRESS_REWRITING_README.html for other forms of address rewriting.

I'll look into masquerading tomorrow...Its late here... but I have disabled it - and the problem seems to persist. I do intend that replies go in the first instance to google apps - hen get forwarded (by google apps) to c5.aardvark...
I'll also try the rewrite readme tomorrow.

Thanks Jasper. I can see you are spending quite a bit of time to help me. It is greatly appreciated.

Richard.

Here is my postconf -n - in case you can see any clues in there. I have also included /etc/aliases content - though it looks fairly innocent to me. You will see that at the time of the postconf - I have re-enabled masquerading and domain receiving - because this is a live server - so I revert it to a working state after each test.

[config]


--
Richard Chapman

Reply via email to