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: <u...@example.com>
250 2.0.0: Ok
RCPT to: <u...@somebody.out.there.com>
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 alias <aliases>                                   deliver to 
mbox
accept from source <stage_hosts>  sender <at_example_com> for any  deliver to 
mda "/usr/bin/procmail -f -" as gotcha
accept from source <lan>          sender <at_example_com> for any  relay 
hostname "mailproxy.example.com" pki $xname

Reply via email to