Primary Domains vs. Virtual Domains - what's the difference?

2019-11-17 Thread Implausibility
I'm reading the man pages for makemap, and there are two types of database maps 
described, as per $subject.

What are the functional / operational differences between Primary & Virtual 
Domains?  When when I choose one over the other?  Can I get examples of when 
I'd choose a table of primary domains, and when I'd choose a table of virtual 
domains?

Which one should I choose if I want to send *and* receive mail from domains 
that are not the same as my mail server's name?  (e.g... my business has many 
websites...  example.com, example.us, example.io - and I'd like to send and 
receive mail for each of them separately...  say, to route the eMail to the 
sales rep for a specific territory)

Thanks.


Re: pony express: smtpd: bind: Address already in use

2019-11-17 Thread Implausibility
Perfect.  Works!  Thanks for the amazingly fast response.  :D

> On Nov 17, 2019, at 10:52 AM, Archange  wrote:
> 
> Hi,
> 
> 
> Le 17 novembre 2019 16:37:38 GMT+01:00, Implausibility  a 
> écrit :
>> […]
>> 
>> # To accept external mail, replace with: listen on all
>> #
>> listen on all
>> 
>> […]
>> 
>> listen on all tls pki mail.EXAMPLE.ca \
>> filter { check_dyndns, check_rdns, check_fcrdns, senderscore, rspamd }
>> 
> 
> You are listening twice on all (implicitly default port 25), that’s the issue.
> 
> Remove the first instance above.
> 
> Regards,
> Archange
> 




Re: pony express: smtpd: bind: Address already in use

2019-11-17 Thread Archange
Hi,


Le 17 novembre 2019 16:37:38 GMT+01:00, Implausibility  a 
écrit :
>[…]
>
># To accept external mail, replace with: listen on all
>#
>listen on all
>
>[…]
>
>listen on all tls pki mail.EXAMPLE.ca \
> filter { check_dyndns, check_rdns, check_fcrdns, senderscore, rspamd }
>

You are listening twice on all (implicitly default port 25), that’s the issue.

Remove the first instance above.

Regards,
Archange



pony express: smtpd: bind: Address already in use

2019-11-17 Thread Implausibility
Hi.  I'm getting this error on a fresh install of OpenBSD 6.6 with the built-in 
OpenSMTPD.

I'm following Gilles' excellent 'setting up a mail server' guide, but have hit 
a wall that I don't seem to be able to fix.  Any assitance will be greatly 
appreciated.

Here's my config (domain name changed to EXAMPLE):

#   $OpenBSD: smtpd.conf,v 1.11 2018/06/04 21:10:58 jmc Exp $

# This is the smtpd server system-wide configuration file.
# See smtpd.conf(5) for more information.

table aliases file:/etc/mail/aliases

# To accept external mail, replace with: listen on all
#
listen on all

action "local_mail" mbox alias 
action "outbound" relay helo mail.EXAMPLE.ca

# Uncomment the following to accept external mail for domain "example.org"
match from any for domain "mail.EXAMPLE.ca" action "local_mail"
match for local action "local_mail"
match for any action "outbound"

pki mail.EXAMPLE.ca cert "/etc/ssl/mail.EXAMPLE.fullchain.pem"
pki mail.EXAMPLE.ca key "/etc/ssl/private/mail.EXAMPLE.key"

filter check_dyndns phase connect match rdns regex { '.*\.dyn\..*', 
'.*\.dsl\..*' } \
disconnect "550 you look like a spammer"

filter check_rdns phase connect match !rdns \
disconnect "550 you look like a spammer"

filter check_fcrdns phase connect match !fcrdns \
disconnect "550 you look like a spammer"

filter senderscore \
proc-exec "filter-senderscore -blockBelow 10 -junkBelow 70 -slowFactor 5000"

filter rspamd proc-exec "filter-rspamd"

#table aliases file:/etc/mail/aliases

listen on all tls pki mail.EXAMPLE.ca \
filter { check_dyndns, check_rdns, check_fcrdns, senderscore, rspamd }

listen on all port submission tls-require pki mail.EXAMPLE.ca auth filter rspamd

action "local_mail" maildir junk alias 

match from any for domain "mail.EXAMPLE.ca" action "local_mail"
match for local action "local_mail"

match from any auth for any action "outbound"
match for any action "outbound"

The only major changes I've made was moving the 'helo mail.EXAMPLE.ca' from the 
lower 'action' definition to the one above (it was duplicated and giving me 
problems) and commenting out the second 'table' and 'action' parameter as it 
was complaining it was a duplicate.

Here's the debug output:

mail# smtpd -f /etc/smtpd.conf -d -v


debug: init ssl-tree
info: loading pki information for mail.EXAMPLE.ca
debug: init ca-tree
debug: init ssl-tree
info: loading pki keys for mail.EXAMPLE.ca
debug: using "fs" queue backend
debug: using "ramqueue" scheduler backend
debug: using "ram" stat backend
info: OpenSMTPD 6.6.0 starting
debug: init ssl-tree
debug: init ssl-tree
info: loading pki information for mail.EXAMPLE.ca
debug: init ca-tree
debug: init ssl-tree
info: loading pki keys for mail.EXAMPLE.ca
debug: using "fs" queue backend
debug: using "ramqueue" scheduler backend
debug: using "ram" stat backend
debug: init ssl-tree
info: loading pki information for mail.EXAMPLE.ca
debug: init ca-tree
debug: init ssl-tree
info: loading pki keys for mail.EXAMPLE.ca
debug: using "fs" queue backend
debug: using "ramqueue" scheduler backend
debug: using "ram" stat backend
setup_peer: lookup -> control[87452] fd=4
setup_peer: lookup -> pony express[64675] fd=5
setup_peer: lookup -> queue[71335] fd=6
debug: init ssl-tree
info: loading pki information for mail.EXAMPLE.ca
debug: init ca-tree
debug: init ssl-tree
info: loading pki keys for mail.EXAMPLE.ca
debug: using "fs" queue backend
debug: using "ramqueue" scheduler backend
debug: using "ram" stat backend
setup_peer: pony express -> control[87452] fd=4
setup_peer: pony express -> klondike[46655] fd=5
setup_peer: pony express -> lookup[45363] fd=6
setup_peer: pony express -> queue[71335] fd=7
debug: init ssl-tree
info: loading pki information for mail.EXAMPLE.ca
setup_peer: klondike -> control[87452] fd=4
info: loading pki information for mail.EXAMPLE.ca
debug: init ca-tree
setup_peer: klondike -> pony express[64675] fd=5
debug: init ssl-tree
setup_done: ca[46655] done
debug: init ca-tree
info: loading pki keys for mail.EXAMPLE.ca
setup_proc: klondike done
debug: init ssl-tree
info: loading pki keys for mail.EXAMPLE.ca
debug: using "fs" queue backend
debug: using "ramqueue" scheduler backend
debug: using "fs" queue backend
debug: using "ram" stat backend
debug: using "ramqueue" scheduler backend
setup_peer: queue -> control[87452] fd=4
debug: using "ram" stat backend
setup_peer: queue -> pony express[64675] fd=5
setup_peer: queue -> lookup[45363] fd=6
setup_peer: scheduler -> control[87452] fd=4
setup_peer: queue -> scheduler[26366] fd=7
setup_peer: scheduler -> queue[71335] fd=5
debug: init ssl-tree
info: loading pki information for mail.EXAMPLE.ca
debug: init ca-tree
debug: init ssl-tree
info: loading pki keys for mail.EXAMPLE.ca
debug: using "fs" queue backend
debug: using "ramqueue" scheduler