On 03/06/16 13:39, Dickie Bennett wrote:
Edgar, thank you for the answer.
I don't think that I can use virtual <users> because there are some
aliases to external servers and according to the documentation (man
smtpd.conf) "virtual" must match system users.
Is is possible to make a single rule that matches both, users and domains?
man 5 table
You could try something like this:
accept from any for domain "example.com" recipient <recipients> relay
via etc...
/etc/mail/recipients
[email protected]
[email protected]
etc
I don't think this is the best way, but it may reduce some of the
problems you're having.
Thanks.
On Fri, Mar 4, 2016 at 8:41 PM, Edgar Pettijohn
<[email protected] <mailto:[email protected]>> wrote:
Sent from my iPhone
On Mar 4, 2016, at 10:50 AM, Dickie Bennett <[email protected]
<mailto:[email protected]>> wrote:
Hi,
I'm running OpenSMTPD + Dovecot + Amavis on FreeBSD and I made
some mistakes configuring that I am not sure how to fix. This is
my configuration:
pki example.com <http://example.com> certificate
"/etc/ssl/certs/example.pem"
pki example.com <http://example.com> key
"/etc/ssl/private/example.pem"
limit mta inet4
bounce-warn 15m
expire 2d
listen on re0 port 25 tls pki example.com <http://example.com>
hostname example.com <http://example.com> auth-optional
listen on re0 port 587 tls-require pki example.com
<http://example.com> hostname example.com <http://example.com>
auth mask-source
# Amavisd filters
listen on lo0 port 10025 tag Filtered
table aliases file:/etc/aliases
accept tagged Filtered for local alias <aliases> deliver to lmtp
"/var/run/dovecot/lmtp"
accept from any for domain “example.com <http://example.com>"
relay via "smtp://localhost:10024"
accept from local for any relay
accept from any for domain "example.com <http://example.com>"
virtual <users> relay via ...
There are a few options but basically just accept for users some
kind of way before you pass to amavis and it will probably help.
I might have misinterpreted your problems but i think this will
help. Also you may try the extras package and use the spam
assassin filter instead.
So the problems are: 1. this configuration allows to send
e-mails from [email protected] <mailto:[email protected]>
to any user of the example.com <http://example.com> domain
through port 25 without authentication. So. basically, OpenSMTPd
allows to received e-mails from spoofed accounts (but not sent to
external addresses, of course). This happens because of the rule
that relays to Amavisd. How may I fix that?
2. The other issue is that the mail queue is getting full of spam
because the Amavisd rule allows to receive emails to
non-existent users but the Filtered rule won't receive it and
tries to bounce the e-mail but of course, the spammers e-mail
address doesn't exist, so it stays for 2 days in the queue. How
can I specify to the Amavisd rule to accept for aliases given
that OpenSMTPd won't allow to use aliases in a relay rule?
Thanks for any suggestion.