Re: Trouble configuring OpenSMTPD - every incoming message rejected as 550 Invalid recipient.

2018-04-21 Thread Thomas Bohl
> I wasn't able to find a mailing list archive to review at the URL: 
> https://www.opensmtpd.org/list.html  If there is an archive, please direct me 
> to it, so I can benefit from other's misfortune.  :)

For example https://www.mail-archive.com/misc@opensmtpd.org/


> No matter who I address inbound eMails to (local users or aliases), I always 
> get 550: Invalid recipient in response on the sending server and in 
> /var/log/maillog.

Stop the smtpd daemon and a look that really no other smtpd processes
are running. Then run
# smtpd -d -v
Does it provide any additional output that isn't in /var/log/maillog?


> # Reject troublemakers
> reject from source 
> 
> # Add other filters here?  
> 
> # Accept from "whitelisted" IPs that are slightly misconfigured 
> accept from source 

Comment the lines out for now.


> # Receive eMails to addresses in the aliases table.
> accept from any for domain  alias  deliver to mbox
>
> # Receive eMails to addresses in the virtual account table.
> accept from any for domain  virtual  deliver to mbox
>
> # Receive eMails for local users
> accept from any for local deliver to mbox

Lets remove complexity a little by removing "from any".

What is the format of your /etc/mail/domains and /etc/mail/account?

Does local delivery via
# sendmail user1
work?

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



Trouble configuring OpenSMTPD - every incoming message rejected as 550 Invalid recipient.

2018-04-19 Thread Implausibility
Hi.

I originally sent this message to m...@openbsd.org, but was asked to post it 
here instead.  I wasn't able to find a mailing list archive to review at the 
URL: https://www.opensmtpd.org/list.html  If there is an archive, please direct 
me to it, so I can benefit from other's misfortune.  :)

I'm trying to build an OpenSMPTD mail server for the first time to replace my 
aging Postfix box.

No matter who I address inbound eMails to (local users or aliases), I always 
get 550: Invalid recipient in response on the sending server and in 
/var/log/maillog.  I've tried more than a dozen configs, and I can't get past 
this problem.

Domains & IPs anonymized for my comfort, but DNS is configured correctly.  I've 
tried to comment everything possible -- if my comment and configs don't match, 
please let me know where I've gone astray!

Here's my entire smtpd.conf file:

# Random global options
queue compression # Compress data in the queue
max-message-size 25M
expire 7d

# Cryptographic Keys and Certificates
pki mydomain.email certificate "/etc/ssl/mydomain.crt"
pki mydomain.email key "/etc/ssl/private/mydomain.key"
pki mydomain.email dhe auto 

# Define tables 
table blacklist file:/etc/mail/blacklist  # Blacklist of irritating IPs
table whitelist file:/etc/mail/whitelist  # Whitelist for misconfigured IPs
table aliases   file:/etc/mail/aliases# Aliases accepted for delivery
table account   file:/etc/mail/account# Virtual mail accounts
table domains   file:/etc/mail/domains# Domains to accept mail for
table users file:/etc/mail/users  # User names with their own mailboxes
table password  file:/etc/mail/password   # Passwords for users


# Allow specific users to send messages as specific eMail addresses
#table senders file:/etc/mail/senders

# Configure interface & standards - add 'verify' to tls-require in the future.
listen on egress tls-require hostname mydomain.email
listen on egress smtps hostname mydomain.email
listen on egress port submission tls-require auth 

# Reject troublemakers
reject from source 

# Add other filters here?  

# Accept from "whitelisted" IPs that are slightly misconfigured 
accept from source 

# Receive eMails to addresses in the aliases table.
accept from any for domain  alias  deliver to mbox

# Receive eMails to addresses in the virtual account table.
accept from any for domain  virtual  deliver to mbox

# Receive eMails for local users
accept from any for local deliver to mbox

# Forward incoming eMails (from authenticated users) to their destination.
accept for any relay


The messages from my existing postfix server:

Apr 18 23:31:08 sybil postfix/smtp[71679]: 55462205F0CD9: 
to=, relay=mydomain.email[98.76.54.32]:25, delay=2, 
delays=0.01/0.06/1.9/0.05, dsn=5.0.0, status=bounced (host 
mydomain.email[98.76.54.32] said: 550 Invalid recipient (in reply to RCPT TO 
command))
Apr 18 23:31:08 sybil postfix/smtp[71679]: 55462205F0CD9: 
to=, relay=mydomain.email[98.76.54.32]:25, delay=2, 
delays=0.01/0.06/1.9/0.06, dsn=5.0.0, status=bounced (host 
mydomain.email[98.76.54.32] said: 550 Invalid recipient (in reply to RCPT TO 
command))

And the messages from /var/log/maillog:

Apr 19 03:31:06 leclerc smtpd[6384]: 8d44a173e36ff947 smtp event=connected 
address=12.34.56.78 host=olddomain.com
Apr 19 03:31:08 leclerc smtpd[6384]: 8d44a173e36ff947 smtp event=starttls 
address=12.34.56.78 host=olddomain.com ciphers="version=TLSv1, 
cipher=DHE-RSA-AES256-SHA, bits=256"
Apr 19 03:31:08 leclerc smtpd[6384]: 8d44a173e36ff947 smtp event=failed-command 
address=12.34.56.78 host=olddomain.com command="RCPT TO: 
ORCPT=rfc822;user1@mydomain.email" result="550 Invalid recipient"
Apr 19 03:31:08 leclerc smtpd[6384]: 8d44a173e36ff947 smtp event=failed-command 
address=12.34.56.78 host=olddomain.com command="RCPT 
TO: ORCPT=rfc822;webmaster@mydomain.email" 
result="550 Invalid recipient"
Apr 19 03:31:08 leclerc smtpd[6384]: 8d44a173e36ff947 smtp event=closed 
address=12.34.56.78 host=olddomain.com reason=quit

Any assistance and insight would be greatly appreciated, as well as some 
information on how OpenSMTPD treats local users different from aliases and 
virtual accounts.

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