Wietse Venema wrote:
Ed W:
Wietse Venema wrote:
If you don't want to receive mail for domain-less addresses then
say so, instead of coming up with the wrong solution for the wrong
problem.
OK, "I want to accept most emails over smtp and then later bounce emails with domain-less addresses"

That will not be supported.  Adding a separate code path for
domain-less envelope adresses would open a giant hole in the
defenses.

Instead, you can try to 1) configure Postfix smtpd to use an
"invalid" myorigin value, 2) configure Postfix smtpd with a
non-default rewrite_service_name setting that invokes a trivial-rewrite
server that also uses that "invalid" myorigin value and no transport
map, 3) configure the normal trivial-rewrite server with a transport
map that routes mail for the invalid domain to "error: pebcak".


I'm going to give that a whirl - couple of questions:

- What are the implications of setting myorigin to something invalid? Will this leak out in any other mail headers from locally generated email (I believe it's all submitted over smtp - possibly except cron..)? Will other bounces/errors suddenly get the invalid domain as the sender address?

- Why do I need 2), ie the custom rewrite_service? For other common domain typos I have just used a normal transport map mapped to some useful "error: learn to smell correctly" message? What am I missing?

- What bad things happen if I set append_at_myorigin=no ?? The docs hint at dire consequences, but not specifically what will break?

- For my own edification can you please point out what part of postfix is actually rewriting these domain-less emails (presumed trivial-rewrite called from cleanup?) - I have read through ADDRESS_REWRITING_README and it implies that $myorigin is appended to "local" messages and $remote_header_rewrite_domain is appended to incomplete remote addresses. Since I have the later set to blank then this implies that either this "remote" email is being treated as local (why?) or that postfix further falls back to using myorigin to complete domainless address on remote emails also?



I think the core of this is that I'm confused as to what counts as a "local" generated message - I have tried quite hard to make sure that almost everything becomes a "remote" submitted message - I accept that postfix really wants email addresses with a domain, but from the docs it's not clear what path it's following here to complete the domain?

Dec 8 11:28:28 mail1 postfix/smtpd[22673]: < office.nippynetworks.com[94.194.201.187]: RCPT TO: <asdf>
Dec  8 11:28:28 mail1 postfix/smtpd[22673]: extract_addr: input: <asdf>
Dec  8 11:28:28 mail1 postfix/smtpd[22673]: smtpd_check_addr: addr=asdf
Dec  8 11:28:28 mail1 postfix/smtpd[22673]: send attr request = rewrite
Dec  8 11:28:28 mail1 postfix/smtpd[22673]: send attr rule = local
Dec  8 11:28:28 mail1 postfix/smtpd[22673]: send attr address = asdf


^^ Why does it think it's a "local" lookup? This seems to prevent me using $remote_header_rewrite_domain to add "domain.invalid"?

Thanks

Ed W

Reply via email to