Re: opensmtpd 6.0.3: redirect outgoing EMails to an internal account

2019-05-10 Thread Harald Dunkel

Hi Gilles,

On 5/10/19 11:30 AM, Gilles Chehade wrote:


without your configuration it's hard to determine what's wrong



Config file was attached. You can find it in the archive as well,
e.g. on

https://www.mail-archive.com/misc@opensmtpd.org/msg04343.html


Regards
Harri

--
You received this mail because you are subscribed to misc@opensmtpd.org
To unsubscribe, send a mail to: misc+unsubscr...@opensmtpd.org



Re: opensmtpd 6.0.3: redirect outgoing EMails to an internal account

2019-05-10 Thread Gilles Chehade
May 10, 2019 10:55 AM, "Harald Dunkel"  wrote:

> Hi folks,
> 
> for testing purposes I have to setup opensmtpd 6.0.3 to
> redirect all outgoing EMails from a list of stage systems to a
> dedicated internal account. smtpd.conf is attached.
> 
> Problem is, there is an invalid recipient error for sending
> an EMail from such a stage system:
> 
> [...]
> 
> If I replace the "deliver to mda ..." by a usual relay statement,
> then the EMail is relayed, so I have to assume that the "deliver
> to mda" somehow affects filtering EMails.
> 

without your configuration it's hard to determine what's wrong


-- 
Gilles Chehade

https://www.poolp.org  @poolpOrg

--
You received this mail because you are subscribed to misc@opensmtpd.org
To unsubscribe, send a mail to: misc+unsubscr...@opensmtpd.org



opensmtpd 6.0.3: redirect outgoing EMails to an internal account

2019-05-10 Thread Harald Dunkel

Hi folks,

for testing purposes I have to setup opensmtpd 6.0.3 to
redirect all outgoing EMails from a list of stage systems to a
dedicated internal account. smtpd.conf is attached.

Problem is, there is an invalid recipient error for sending
an EMail from such a stage system:

% netcat 10.0.0.115 25
220 example.de ESMTP OpenSMTPD
EHLO stage
250-example.com Hello stage [10.0.0.238], pleased to meet you
250-8BITMIME
250-ENHANCEDSTATUSCODES
250-SIZE 36700160
250-DSN
250-STARTTLS
250 HELP
MAIL from: 
250 2.0.0: Ok
RCPT to: 
550 Invalid recipient
^C

If I replace the "deliver to mda ..." by a usual relay statement,
then the EMail is relayed, so I have to assume that the "deliver
to mda" somehow affects filtering EMails.

Unfortunately opensmtpd 6.4 is not an option.


Every insightful comment is highly appreciated.
Harri
xname="mp2.example.com"

pki $xname key "/etc/ssl/private/smtpd.key.pem"
pki $xname certificate "/etc/ssl/public/mailproxy.example.com.pem"

limit mta inet4
listen on lo inet4 tls pki $xname
listen on eth0 inet4 tls pki $xname

table aliases file:/etc/aliases

table lan   { 10.0.0.0/24 } # hosts allowed 
to send emails
table stage_hosts   { 10.0.0.238 10.0.0.240 10.0.0.245 }# stage hosts 
*not* allowed to send emails
table at_example_com{ "@example.com" }  # From address

accept for local aliasdeliver to 
mbox
accept from source   sender  for any  deliver to 
mda "/usr/bin/procmail -f -" as gotcha
accept from source   sender  for any  relay 
hostname "mailproxy.example.com" pki $xname