Chris Watson, Open Systems
ch...@open-systems.net
CEO, Owner
316-558-0440
PGP Fingerprint: BE67 ED60 6BB0 6B1E 2EB8 95D0 4A35 6B4D F529 1D0D
PGP Key ID: F5291D0D
> On May 18, 2016, at 2:14 PM, Joerg Jung <m...@umaxx.net> wrote:
>
> On Wed, May 18, 2016 at 01:48:11PM -0500, Chris Watson wrote:
>> So I’ve been brought up on Sendmail, then later Postfix. Yesterday I decided
>> to try moving from Postfix to OpenSMTPD. The main reason was because with
>> Postfix for a remote user you have to install and configure a bunch of other
>> things to auth before SMTP posting. So when I read OpenSMTPD supported that
>> internally I jumped. That and I had heard it was much simpler and easier to
>> maintain.
>>
>> So a couple of issues have hit me in the face like a sledge hammer. First
>> let me describe my setup:
>>
>> I have a virtual host @ rootbsd.net <http://rootbsd.net/>. It hosts my
>> business website. All web and email goes there.
>> I use a MBP at home to connect to the RootBSD VPS hosting my mail server,
>> which is now OpenSMTPD. It also hosts Archiveopteryx to act as my IMAP
>> server and email storage archive. So mail leaves my MBP connects to
>> OpenSMTPD and then Archiveopteryx to handle outgoing mail. Incoming mail I
>> connect right to archiveopteryx via IMAP.
>> So my fist issue is virtual aliases. I have tried everything under the sun
>> to get them to work with OpenSMTPD and clearly I am not understanding the
>> docs at all.
>> This is such an easy thing to do yet I can’t seem to grasp it with OpenSMTPD.
>>
>> Here is my config:
>>
>> # This is the smtpd server system-wide configuration file.
>> # See smtpd.conf(5) for more information.
>>
>> # To accept external mail, replace with: listen on all
>> listen on localhost
>> #listen on all
>>
>> # filters and filter chains setup
>> filter filter-pause pause
>> filter filter-regex regex
>> filter filter-dnsbl-sorbs dnsbl
>> filter filter-dnsbl-spamcop dnsbl "-h bl.spamcop.net"
>> filter filter-dnsbl-spamhaus dnsbl "-h sbl-xbl.spamhaus.org"
>> filter filter-spamassassin spamassassin "-s reject"
>> filter filter-clamav clamav
>> filter all chain filter-pause filter-regex filter-dnsbl-sorbs
>> filter-dnsbl-spamcop filter-dnsbl-spamhaus filter-spamassassin filter-clamav
>> filter sub chain filter-pause filter-spamassassin filter-clamav
>>
>> # Enable TLS encryption
>> pki -systems.net certificate "/etc/ssl/certs/mail.-systems.net.pem"
>> pki -systems.net key "/etc/ssl/private/mail.-systems.net.key"
>>
>> # listen on 204.109.61.174 tls pki -systems.net
>> listen on xn0 tls-require pki -systems.net
>>
>> # If you edit the file, you have to run "smtpctl update table aliases"
>> table aliases file:/etc/mail/aliases
>> table virtuals file:/etc/mail/virtuals
>> table passwd passwd:/etc/mail/passwd
>>
>> # Allow Archiveopteryx to get sent mail.
>> accept from any for domain “-systems.net" relay via lmtp://127.0.0.1:2026
>> # accept from any for domain “-systems.net" alias deliver to
>> mbox
>>
>> accept for local alias deliver to mbox
>> accept for any relay
>>
>> So thing’s seem to work ok as long as the user I am emailing @
>> -systems.net <http://-systems.net/> is a valid local user.
>> For instance ch...@-systems.net <mailto:ch...@-systems.net> works
>> fine, because it is a real user, but chris.wat...@-systems.net
>> <mailto:chris.wat...@-systems.net>, a virtual user, does not.
>> Obviously because it’s not a local user, it’s an alias. I have beaten my
>> head senseless trying to grasp how to add virtual users.
>
> Your config seems to follow the FAQ example. But you missed the need to
> setup /etc/mail/virtuals table and the use of this table, e.g a:
> ... virtual
> You also missed the rcpt-to keyword.
>
Thank you. So the table is defined, table virtuals file:/etc/mail/virtuals.
Then I can get it half working i think using the following:
accept from any for domain “-systems.net" virtual . It won’t work
with “relay via lmtp” like the line below it does.
So I can’t figure out how to get it to pass virtual users into Archiveopteryx
via lmtp, as the valid local users mail does.
And the “rcpt-to” keyword is no where in my documentation for smtpd.conf.
FreeBSD 10.3, OpenSMTPD 5.7.3.
So I am not sure of it’s syntax or function. But so far I was able to deduce
the following to use lmtp:
accept from any for domain