On Mon, 10 Oct 2011, Wietse Venema wrote:
On Mon, 10 Oct 2011, Wietse Venema wrote:
To deliver some users locally, see 
http://www.postfix.org/STANDARD_CONFIGURATION_README.html#some_local

You did not follow the instructions.

Why do you think so? The instructions in the linked section above do not mention the case I need: replace an arbitrary delivery address by a local one.

Do you mean, I should add domain "stefan-bertels.de" to something like $mydestination? As far as I can see that would change delivery of any recipient in this domain to "local delivery". Think about "gmail.com" instead of "stefan-bertels.de".

I tried adding domain part to the right side, too:

/etc/postfix/virtual
        p...@stefan-bertels.de stefan@localhost

and

/etc/postfix/virtual
        p...@stefan-bertels.de stefan@eos

and

/etc/postfix/virtual
        p...@stefan-bertels.de stefan@eos.bertels.local

On Mon, 10 Oct 2011, Viktor Dukhovni wrote:
0.      ALWAYS read your logs

I always do. Original delivery address shows up there every time I test
(p...@stefan-bertels.de). I tested using sendmail -bv, too. Same result.

and when asking questions, report the pertinent log entries. In this case the logs show the final delivery address.

Oct 11 13:04:40 eos postfix/smtpd[14672]: connect from unknown[192.168.1.67]
Oct 11 13:04:42 eos postfix/smtpd[14672]: D206818A2DA6: 
client=unknown[192.168.1.67]
Oct 11 13:04:43 eos postfix/cleanup[14675]: D206818A2DA6: 
message-id=<alpine.WNT.2.01.1110111304240.264@NFXYRCVBF>
Oct 11 13:04:43 eos postfix/qmgr[14655]: D206818A2DA6: 
from=<p...@stefan-bertels.de>, size=524, nrcpt=1 (queue active)
Oct 11 13:04:43 eos postfix/smtpd[14672]: disconnect from unknown[192.168.1.67]
Oct 11 13:04:43 eos postfix/smtp[14714]: D206818A2DA6: 
to=<p...@stefan-bertels.de>, relay=mail.bertels.org[194.117.254.42]:587, 
delay=0.61, delays=0.38/0.01/0.15/0.06, dsn=2.0.0, status=sent (250 ok 1318331083 qp 
22616)
Oct 11 13:04:43 eos postfix/qmgr[14655]: D206818A2DA6: removed

Note: "mail.bertels.org" is my smarthost, "eos.bertels.local" is my local machine running postfix.

$mydestination -> eos.bertels.local, localhost.bertels.local, localhost,     
bertels.local

1.      ALWAYS use a full address on the right side of virtual
        alias tables.

See above: I tried stefan, stefan@localhost and stefan@eos.bertels.local


2.      If you want local delivery for bare address forms, either
        add $myorigin to mydestination or virtual_mailbox_domains,
        or change $myorigin to some domain that is already there.

I do not think adding stefan-bertels.de oder gmail.com to $mydestination seems right because that would change delivery for addresses not listed in /etc/postfix/virtual. But maybe I'm wrong here? How do I get all non-local addresses not listed in /etc/postfix/virtual still delivered to my smarthost?

Regarding virtual_mailbox_domains the docs say: "The SMTP server validates recipient addresses with $virtual_mailbox_maps and rejects mail for non-existent recipients."

Any hints?

Stefan

Reply via email to