Haraka
Haraka copied to clipboard
Oubound only / inbound only
Maybe this is a pretty newbie question:
I want Haraka be able to receive emails from any configured domain. This is working as expected. For the sake of simplicity I'm using port 25.
But, as I'm creating an API for sending mails, I want to deny any access that attempts to send anything. Only outbound access should be done from localhost.
But even if I'm using auth/flat_file with no users or any random user and password, this is accepted:
swaks -s localhost -t to@inbounddomain -f from@outbounddomain
I'm thinking about using two instances: one for inbound (standard ports) and other for outbound (alt ports), but It's no clear to me how to configure Haraka as "outbound only" or "inbound only".
I went with the approach of two instances. It's working. But now I'm not able to sending emails (queue/smtp_forward) and I can't get to work DKIM signing.
[NOTICE] [51C7D7D5-5B44-44C4-9E13-A786DA6508A9] [core] connect ip=127.0.0.1 port=51318 local_ip=127.0.1.1 local_port=25
[NOTICE] [51C7D7D5-5B44-44C4-9E13-A786DA6508A9.1] [core] sender <[email protected]> code=CONT msg=""
[NOTICE] [51C7D7D5-5B44-44C4-9E13-A786DA6508A9.1] [core] recipient <[email protected]> code=OK msg="" [email protected]
[NOTICE] [E6484952-205E-472A-83CB-A66AB232BD64.1.1] [outbound] recipient <[email protected]> rejected: 550 I cannot deliver mail for <[email protected]>
[NOTICE] [-] [dkim_sign] skipped: no private key
[ERROR] [-] [core] missing key data for undefined.undefined
invalid IP address: alt2.aspmx.l.google.com
No offense, but documentation is pretty frustrating.
I'd suggest using exim
, postfix
, etc.