> Am 08.05.2016 um 20:59 schrieb Peter Fraser <[email protected]>:
> 
> My confusions are several,
> 
> I believe I misunderstood how "virtual" worked, and I don't think the man 
> pages helped.
>      I started out with the believe that "virtual" would map the sender email 
> address  in the process of relaying
>      I now believe that "virtual" maps the senders email address, then 
> immediately behaves as if it was a new
>      email send from the local system.
> 
> As a result of this misunderstanding I spent several days trying to get past 
> the syntax error described below.
> 
> Not expecting the mapped email to be resubmitted as if it was local, I had no 
> rules to forward local messages.
> As a result you just end up with the message "command failed: 550 Invalid 
> recipient". It took me a while
> to realize that smtpctl could add some extra tracing information, nor does 
> the man page on OpenBSD  5.9 for smtpd 
> mention the "-T" option for additional tracing information

This has been fixed recently in -current.

> on OpenBSD
> 
> Also the man page says that
> 
>    forward-only
>                    Mail is accepted for local recipients ONLY if it is
>                         redirected to an external address via an alias or a
>                         ~/.forward file.
> 
> what "forward-only" appears to be do is only accepting emails that have an 
> entry in "virtual" table.
> It does not have to be an external address.
> And because of the resubmission described above a "accept" with a 
> "forward-only" will actually never
> accept any messages, but will resolve them to their final destination and 
> reprocess them.
> Which is what I actually wanted.
> 
> Part of my testing I had a ~/.forward that was owned by root. That was my 
> mistake. The mail then failed
> but the problem was very had to diagnose. You get the message " 550 Invalid 
> recipient". And there is nothing
> In the smtpd trace saying why the recipient is invalid.
> 
> On last thing the "man table" describes the "aliasing tables" without  the 
> use of ":" but the supplied /etc/mail/alias
> does have ":"'s. I assume that alias work with or with the use of ":"
> 
> -----Original Message-----
> From: Marcus MERIGHI [mailto:[email protected]] 
> Sent: Saturday, May 7, 2016 2:56 AM
> To: Peter Fraser <[email protected]>
> Cc: [email protected]
> Subject: Re: virtual user and forwarding
> 
> [email protected] (Peter Fraser), 2016.05.05 (Thu) 19:46 (CEST):
>> My scenario:
>> 
>> I have a OpenBSD  processing email for several domains, doing virus 
>> scanning, and spam processing.  The OpenBSD system was running 
>> sendmail and I would like to convert it to smtpd
>> 
>> All the incoming email is then forwarded on to one of two Microsoft 
>> Exchange servers,  depending upon the destination email address.
>> 
>> Several email incoming email address a mapped to a smaller number of 
>> target email addresses.
>> 
>> I have included a small  test example of what I naively thought the 
>> smtpd.conf should look like.  The example a simple configuration for 
>> outgoing email, and only tries to deal with one exchange server.
>> 
>> listen on all thinkageLan = "192.102.11.0/24" ksmartLan   =
>> "205.189.88.110/28"
>> 
>> table thinkageComputers         { $thinkageLan } 
>> table thinkageUsers { [email protected], [email protected] } table 
>> thinkageDomains { thinkage.ca, thinkage.com, mainboss.com } table 
>> thinkageVirtualMapping { [email protected][email protected],
>> [email protected][email protected] }
>> 
>> accept from source <thinkageComputers> for any virtual 
>> <thinkageVirtualMapping> recipient <thinkageUsers> relay via 
>> "smtp://exchange.thinkage.ca"
>> 
>> This configuration file generates.
>> 
>> /etc/mail/smtpd.conf:11: syntax error
>> 
>> after a lot of playing around I managed to figure out the syntax 
>> according to the man page is correct but actually is a statement that 
>> "virtual" cannot be used the "relay via".
>> 
>> I have tried various approaches to implement the effect I want, but so 
>> far no are satisfactory.  I am wonder what is the best method to 
>> create a working configuration.
> 
> Why doas your forwarding-only smtpd need to know about any address-to-user 
> mapping? It just needs to know for which addresses to relay (and for which 
> not). "recipients" is enough for that, isn't it?
> 
> Apart from that, this smtpd.conf(8) statement makes me think your accept line 
> does something different than you think it does:
> 
> for any virtual <vmap>
>        Make the rule match regardless of the domain it is sent to.  
>        The vmap table will be used as the virtual domain mapping.
>                                                   ^^^^^^
> 
> Is this a documentation bug? Shouldn't it say:
> "The vmap table will be used as the virtual user mapping"
> instead of:
> "The vmap table will be used as the virtual domain mapping"
> 
> Bye, Marcus
> 
>> !DSPAM:572b872e37301759011372!
> 
> --
> You received this mail because you are subscribed to [email protected] To 
> unsubscribe, send a mail to: [email protected]
> 
> 
> -- 
> You received this mail because you are subscribed to [email protected]
> To unsubscribe, send a mail to: [email protected]
> 


--
You received this mail because you are subscribed to [email protected]
To unsubscribe, send a mail to: [email protected]

Reply via email to