Ahh, yes, much better idea, thanks!

    Den onsdag den 7. november 2018 09.18.40 CET skrev Viktor Dukhovni 
<postfix-us...@dukhovni.org>:  
 
 

> On Nov 7, 2018, at 3:08 AM, K F <fribse2...@yahoo.dk> wrote:
> 
> I can see in our outgoing mailqueue, that some users consistently spells 
> their email addresses wrong.
> Ie. gmail.dk instead of gmail.com

When you say "their email address", is that the user's own (sender) address,
or the addresses of remote recipients he/she is writing to?

> I've looked into the 'virtual' setup, but I'm not sure if that can be used,
> as it sounds like that is only for incoming domains?

No, virtual_alias_maps rewrites the *envelope* address of all recipients,
local or otherwise.  However it has no effect on the headers, and perhaps
you want to correct the same mistake also in the message headers?

> So our setup is:
> mail generator -> postfix -> public
> 
> But is it a question of entering
> @gmail.dk    @gmail.com
> in the virtual file, and then activate it for the postfix?

Such broad scope sounds rather unwise, what happens when there are
legitimate email addresses in gmail.dk?

Surely there are some specific addresses that account for most of the
problem?  I'd be hesitant to implement such a broad "solution"...

If "gmail.dk" gets no real email, best to just let it bounce promptly:

  transport:
    gmail.dk    error:5.1.2 Bad destination domain

and then the errant user can fix the problem at the source.  You'll
regret accommodating bad habits through rewrites, just be a good and
timely bearer of bad news.

-- 
    Viktor.
  

Reply via email to